window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode&&"a"!==E.activeElement.tagName.toLowerCase())return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o<i;o++)(n=d[o]).addEventListener("touchstart",a),n.addEventListener("click",a)}}function l(e){var t,n,d=g(b.temporaryFormId);d&&h&&(g(b.parentIdFieldId).value="0",t=d.textContent,d.parentNode.replaceChild(h,d),this.style.display="none",n=(d=(d=g(b.commentReplyTitleId))&&d.firstChild)&&d.nextSibling,d&&d.nodeType===Node.TEXT_NODE&&t&&(n&&"A"===n.nodeName&&n.id!==b.cancelReplyId&&(n.style.display=""),d.textContent=t),e.preventDefault())}function a(e){var t=g(b.commentReplyTitleId),t=t&&t.firstChild.textContent,n=this,d=m(n,"belowelement"),o=m(n,"commentid"),i=m(n,"respondelement"),r=m(n,"postid"),n=m(n,"replyto")||t;d&&o&&i&&r&&!1===v.addComment.moveForm(d,o,i,r,n)&&e.preventDefault()}function o(e){for(var t=e.length;t--;)if(e[t].addedNodes.length)return void d()}function m(e,t){return n?e.dataset[t]:e.getAttribute("data-"+t)}function g(e){return E.getElementById(e)}return r&&"loading"!==E.readyState?t():r&&v.addEventListener("DOMContentLoaded",t,!1),{init:d,moveForm:function(e,t,n,d,o){var i,r,l,a,m,c,s,e=g(e),n=(h=g(n),g(b.parentIdFieldId)),y=g(b.postIdFieldId),p=g(b.commentReplyTitleId),u=(p=p&&p.firstChild)&&p.nextSibling;if(e&&h&&n){void 0===o&&(o=p&&p.textContent),a=h,m=b.temporaryFormId,c=g(m),s=(s=g(b.commentReplyTitleId))?s.firstChild.textContent:"",c||((c=E.createElement("div")).id=m,c.style.display="none",c.textContent=s,a.parentNode.insertBefore(c,a)),d&&y&&(y.value=d),n.value=t,I.style.display="",e.parentNode.insertBefore(h,e.nextSibling),p&&p.nodeType===Node.TEXT_NODE&&(u&&"A"===u.nodeName&&u.id!==b.cancelReplyId&&(u.style.display="none"),p.textContent=o),I.onclick=function(){return!1};try{for(var f=0;f<C.elements.length;f++)if(i=C.elements[f],r=!1,"getComputedStyle"in v?l=v.getComputedStyle(i):E.documentElement.currentStyle&&(l=i.currentStyle),(i.offsetWidth<=0&&i.offsetHeight<=0||"hidden"===l.visibility)&&(r=!0),"hidden"!==i.type&&!i.disabled&&!r){i.focus();break}}catch(e){}return!1}}}}(window);
(function($){
var body=$('body'),
_window=$(window);
(function(){
var nav=$('#site-navigation'), button, menu;
if(! nav){
return;
}
button=nav.find('.menu-toggle');
if(! button){
return;
}
menu=nav.find('.mega-menu');
if(! menu||! menu.children().length){
button.hide();
return;
}
$('.menu-toggle').on('click.templatemela', function(){
nav.toggleClass('toggled-on');
});
})();
_window.on('hashchange.templatemela', function(){
var element=document.getElementById(location.hash.substring(1));
if(element){
if(! /^(?:a|select|input|button|textarea)$/i.test(element.tagName)){
element.tabIndex=-1;
}
element.focus();
window.scrollBy(0, -80);
}});
$(function(){
/*$('.search-toggle').on('click.templatemela', function(event){
var that=$(this),
wrapper=$('.search-box-wrapper');
that.toggleClass('active');
wrapper.toggleClass('hide');
if(that.is('.active')||$('.search-toggle .screen-reader-text')[0]===event.target){
wrapper.find('.search-field').focus();
}});*/
if(_window.width() > 781){
var mastheadHeight=$('#masthead').height(),
toolbarOffset, mastheadOffset;
if(mastheadHeight > 48){
body.removeClass('masthead-fixed');
}
if(body.is('.header-image')){
toolbarOffset=body.is('.admin-bar') ? $('#wpadminbar').height():0;
mastheadOffset=$('#masthead').offset().top - toolbarOffset;
_window.on('scroll.templatemela', function(){
if(( window.scrollY > mastheadOffset)&&(mastheadHeight < 49)){
body.addClass('masthead-fixed');
}else{
body.removeClass('masthead-fixed');
}});
}}
$('.primary-navigation, .secondary-navigation').find('a').on('focus.templatemela blur.templatemela', function(){
$(this).parents().toggleClass('focus');
});
});
if($.isFunction($.fn.masonry)){
$('#footer-sidebar').masonry({
itemSelector: '.widget',
columnWidth: function(containerWidth){
return containerWidth / 4;
},
gutterWidth: 0,
isResizable: true,
isRTL: $('body').is('.rtl')
});
}
_window.load(function(){
if(body.is('.slider')){
$('.featured-content').featuredslider({
selector: '.featured-content-inner > article',
controlsContainer: '.featured-content'
});
}});
})(jQuery);
(function(){
var nav=document.getElementById('menu-header_main_menu'), button, menu;
if(! nav)
return;
button=nav.getElementsByTagName('h3')[0];
menu=nav.getElementsByTagName('ul')[0];
if(! button)
return;
if(! menu||! menu.childNodes.length){
button.style.display='none';
return;
}
button.onclick=function(){
if(-1==menu.className.indexOf('nav-menu'))
menu.className='nav-menu';
if(-1!=button.className.indexOf('toggled-on')){
button.className=button.className.replace(' toggled-on', '');
menu.className=menu.className.replace(' toggled-on', '');
}else{
button.className +=' toggled-on';
menu.className +=' toggled-on';
}};})();
(function($){
var defaultOptions={preloadImg:true};
var jqTransformImgPreloaded=false;
var jqTransformPreloadHoverFocusImg=function(strImgUrl){
strImgUrl=strImgUrl.replace(/^url\((.*)\)/,'$1').replace(/^\"(.*)\"$/,'$1');
var imgHover=new Image();
imgHover.src=strImgUrl.replace(/\.([a-zA-Z]*)$/,'-hover.$1');
var imgFocus=new Image();
imgFocus.src=strImgUrl.replace(/\.([a-zA-Z]*)$/,'-focus.$1');
};
var jqTransformGetLabel=function(objfield){
var selfForm=$(objfield.get(0).form);
var oLabel=objfield.next();
if(!oLabel.is('label')){
oLabel=objfield.prev();
if(oLabel.is('label')){
var inputname=objfield.attr('id');
if(inputname){
oLabel=selfForm.find('label[for="'+inputname+'"]');
}}
}
if(oLabel.is('label')){return oLabel.css('cursor','pointer');}
return false;
};
var jqTransformHideSelect=function(oTarget){
var ulVisible=$('.jqTransformSelectWrapper ul:visible');
ulVisible.each(function(){
var oSelect=$(this).parents(".jqTransformSelectWrapper:first").find("select").get(0);
if(!(oTarget&&oSelect.oLabel&&oSelect.oLabel.get(0)==oTarget.get(0))){$(this).hide();}});
};
var jqTransformCheckExternalClick=function(event){
if($(event.target).parents('.jqTransformSelectWrapper').length===0){ jqTransformHideSelect($(event.target)); }};
var jqTransformAddDocumentListener=function (){
$(document).mousedown(jqTransformCheckExternalClick);
};
var jqTransformReset=function(f){
var sel;
$('.jqTransformSelectWrapper select', f).each(function(){sel=(this.selectedIndex<0) ? 0:this.selectedIndex; $('ul', $(this).parent()).each(function(){$('a:eq('+ sel +')', this).click();});});
$('a.jqTransformCheckbox, a.jqTransformRadio', f).removeClass('jqTransformChecked');
$('input:checkbox, input:radio', f).each(function(){if(this.checked){$('a', $(this).parent()).addClass('jqTransformChecked');}});
};
$.fn.jqTransInputButton=function(){
return this.each(function(){
var newBtn=$('<button id="'+ this.id +'" name="'+ this.name +'" type="'+ this.type +'" class="'+ this.className +' jqTransformButton"><span><span>'+ $(this).attr('value') +'</span></span>')
.hover(function(){newBtn.addClass('jqTransformButton_hover');},function(){newBtn.removeClass('jqTransformButton_hover')})
.mousedown(function(){newBtn.addClass('jqTransformButton_click')})
.mouseup(function(){newBtn.removeClass('jqTransformButton_click')})
;
$(this).replaceWith(newBtn);
});
};
$.fn.jqTransInputText=function(){
return this.each(function(){
var $input=$(this);
if($input.hasClass('jqtranformdone')||!$input.is('input')){return;}
$input.addClass('jqtranformdone');
var oLabel=jqTransformGetLabel($(this));
oLabel&&oLabel.bind('click',function(){$input.focus();});
var inputSize=$input.width();
if($input.attr('size')){
inputSize=$input.attr('size')*10;
$input.css('width',inputSize);
}
$input.addClass("jqTransformInput").wrap('<div class="jqTransformInputWrapper"><div class="jqTransformInputInner"><div></div></div></div>');
var $wrapper=$input.parent().parent().parent();
$wrapper.css("width", inputSize+10);
$input
.focus(function(){$wrapper.addClass("jqTransformInputWrapper_focus");})
.blur(function(){$wrapper.removeClass("jqTransformInputWrapper_focus");})
.hover(function(){$wrapper.addClass("jqTransformInputWrapper_hover");},function(){$wrapper.removeClass("jqTransformInputWrapper_hover");})
;
$.browser.safari&&$wrapper.addClass('jqTransformSafari');
$.browser.safari&&$input.css('width',$wrapper.width()+16);
this.wrapper=$wrapper;
});
};
$.fn.jqTransCheckBox=function(){
return this.each(function(){
if($(this).hasClass('jqTransformHidden')){return;}
var $input=$(this);
var inputSelf=this;
var oLabel=jqTransformGetLabel($input);
oLabel&&oLabel.click(function(){aLink.trigger('click');});
var aLink=$('<a href="#" class="jqTransformCheckbox"></a>');
$input.addClass('jqTransformHidden').wrap('<span class="jqTransformCheckboxWrapper"></span>').parent().prepend(aLink);
$input.change(function(){
this.checked&&aLink.addClass('jqTransformChecked')||aLink.removeClass('jqTransformChecked');
return true;
});
aLink.click(function(){
if($input.attr('disabled')){return false;}
$input.trigger('click').trigger("change");
return false;
});
this.checked&&aLink.addClass('jqTransformChecked');
});
};
$.fn.jqTransRadio=function(){
return this.each(function(){
if($(this).hasClass('jqTransformHidden')){return;}
var $input=$(this);
var inputSelf=this;
oLabel=jqTransformGetLabel($input);
oLabel&&oLabel.click(function(){aLink.trigger('click');});
var aLink=$('<a href="#" class="jqTransformRadio" rel="'+ this.name +'"></a>');
$input.addClass('jqTransformHidden').wrap('<span class="jqTransformRadioWrapper"></span>').parent().prepend(aLink);
$input.change(function(){
inputSelf.checked&&aLink.addClass('jqTransformChecked')||aLink.removeClass('jqTransformChecked');
return true;
});
aLink.click(function(){
if($input.attr('disabled')){return false;}
$input.trigger('click').trigger('change');
$('input[name="'+$input.attr('name')+'"]',inputSelf.form).not($input).each(function(){
$(this).attr('type')=='radio'&&$(this).trigger('change');
});
return false;
});
inputSelf.checked&&aLink.addClass('jqTransformChecked');
});
};
$.fn.jqTransTextarea=function(){
return this.each(function(){
var textarea=$(this);
if(textarea.hasClass('jqtransformdone')){return;}
textarea.addClass('jqtransformdone');
oLabel=jqTransformGetLabel(textarea);
oLabel&&oLabel.click(function(){textarea.focus();});
var strTable='<table cellspacing="0" cellpadding="0" border="0" class="jqTransformTextarea">';
strTable +='<tr><td id="jqTransformTextarea-tl"></td><td id="jqTransformTextarea-tm"></td><td id="jqTransformTextarea-tr"></td></tr>';
strTable +='<tr><td id="jqTransformTextarea-ml">&nbsp;</td><td id="jqTransformTextarea-mm"><div></div></td><td id="jqTransformTextarea-mr">&nbsp;</td></tr>';
strTable +='<tr><td id="jqTransformTextarea-bl"></td><td id="jqTransformTextarea-bm"></td><td id="jqTransformTextarea-br"></td></tr>';
strTable +='</table>';
var oTable=$(strTable)
.insertAfter(textarea)
.hover(function(){
!oTable.hasClass('jqTransformTextarea-focus')&&oTable.addClass('jqTransformTextarea-hover');
},function(){
oTable.removeClass('jqTransformTextarea-hover');
})
;
textarea
.focus(function(){oTable.removeClass('jqTransformTextarea-hover').addClass('jqTransformTextarea-focus');})
.blur(function(){oTable.removeClass('jqTransformTextarea-focus');})
.appendTo($('#jqTransformTextarea-mm div',oTable))
;
this.oTable=oTable;
if($.browser.safari){
$('#jqTransformTextarea-mm',oTable)
.addClass('jqTransformSafariTextarea')
.find('div')
.css('height',textarea.height())
.css('width',textarea.width())
;
}});
};
$.fn.jqTransSelect=function(){
return this.each(function(index){
var $select=$(this);
if($select.hasClass('jqTransformHidden')){return;}
if($select.attr('multiple')){return;}
var oLabel=jqTransformGetLabel($select);
var $wrapper=$select
.addClass('jqTransformHidden')
.wrap('<div class="jqTransformSelectWrapper"></div>')
.parent()
.css({zIndex: 10-index})
;
$wrapper.prepend('<div><span></span><a href="#" class="jqTransformSelectOpen"></a></div><ul></ul>');
var $ul=$('ul', $wrapper).css('width',$select.width()).hide();
$('option', this).each(function(i){
var oLi=$('<li><a href="#" index="'+ i +'">'+ $(this).html() +'</a></li>');
$ul.append(oLi);
});
$ul.find('a').click(function(){
$('a.selected', $wrapper).removeClass('selected');
$(this).addClass('selected');
if($select[0].selectedIndex!=$(this).attr('index')&&$select[0].onchange){ $select[0].selectedIndex=$(this).attr('index'); $select[0].onchange(); }
$select[0].selectedIndex=$(this).attr('index');
$('span:eq(0)', $wrapper).html($(this).html());
$ul.hide();
return false;
});
$('a:eq('+ this.selectedIndex +')', $ul).click();
$('span:first', $wrapper).click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
oLabel&&oLabel.click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
this.oLabel=oLabel;
var oLinkOpen=$('a.jqTransformSelectOpen', $wrapper)
.click(function(){
if($ul.css('display')=='none'){jqTransformHideSelect();}
if($select.attr('disabled')){return false;}
$ul.slideToggle('fast', function(){
var offSet=($('a.selected', $ul).offset().top - $ul.offset().top);
$ul.animate({scrollTop: offSet});
});
return false;
})
;
var iSelectWidth=$select.outerWidth();
var oSpan=$('span:first',$wrapper);
var newWidth=(iSelectWidth > oSpan.innerWidth())?iSelectWidth+oLinkOpen.outerWidth():$wrapper.width();
$wrapper.css('width',newWidth);
$ul.css('width',newWidth-2);
oSpan.css({width:iSelectWidth});
$ul.css({display:'block',visibility:'hidden'});
var iSelectHeight=($('li',$ul).length)*($('li:first',$ul).height());
(iSelectHeight < $ul.height())&&$ul.css({height:iSelectHeight,'overflow':'hidden'});
$ul.css({display:'none',visibility:'visible'});
});
};
$.fn.jqTransform=function(options){
var opt=$.extend({},defaultOptions,options);
return this.each(function(){
var selfForm=$(this);
if(selfForm.hasClass('jqtransformdone')){return;}
selfForm.addClass('jqtransformdone');
$('input:submit, input:reset, input[type="button"]', this).jqTransInputButton();
$('input:text, input:password', this).jqTransInputText();
$('input:checkbox', this).jqTransCheckBox();
$('input:radio', this).jqTransRadio();
$('textarea', this).jqTransTextarea();
if($('select', this).jqTransSelect().length > 0){jqTransformAddDocumentListener();}
selfForm.bind('reset',function(){var action=function(){jqTransformReset(this);}; window.setTimeout(action, 10);});
/*if(opt.preloadImg&&!jqTransformImgPreloaded){
jqTransformImgPreloaded=true;
var oInputText=$('input:text:first', selfForm);
if(oInputText.length > 0){
var strWrapperImgUrl=oInputText.get(0).wrapper.css('background-image');
jqTransformPreloadHoverFocusImg(strWrapperImgUrl);
var strInnerImgUrl=$('div.jqTransformInputInner',$(oInputText.get(0).wrapper)).css('background-image');
jqTransformPreloadHoverFocusImg(strInnerImgUrl);
}
var oTextarea=$('textarea',selfForm);
if(oTextarea.length > 0){
var oTable=oTextarea.get(0).oTable;
$('td',oTable).each(function(){
var strImgBack=$(this).css('background-image');
jqTransformPreloadHoverFocusImg(strImgBack);
});
}}*/
});
};
})(jQuery);
var $k=jQuery.noConflict();
$k(function($){
$k('.cformselect').jqTransform();
});
(function(a){a.fn.extend({customSelect:function(c){if(typeof document.body.style.maxHeight==="undefined"){return this}var e={customClass:"customSelect",mapClass:true,mapStyle:true},c=a.extend(e,c),d=c.customClass,f=function(h,k){var g=h.find(":selected"),j=k.children(":first"),i=g.html()||"&nbsp;";j.html(i);if(g.attr("disabled")){k.addClass(b("DisabledOption"))}else{k.removeClass(b("DisabledOption"))}setTimeout(function(){k.removeClass(b("Open"));a(document).off("mouseup."+b("Open"))},60)},b=function(g){return d+g};return this.each(function(){var g=a(this),i=a("<span />").addClass(b("Inner")),h=a("<span />");g.after(h.append(i));h.addClass(d);if(c.mapClass){h.addClass(g.attr("class"))}if(c.mapStyle){h.attr("style",g.attr("style"))}g.addClass("hasCustomSelect").on("update",function(){f(g,h);var k=parseInt(g.outerWidth(),10)-(parseInt(h.outerWidth(),10)-parseInt(h.width(),10));h.css({display:"inline-block"});var j=h.outerHeight();if(g.attr("disabled")){h.addClass(b("Disabled"))}else{h.removeClass(b("Disabled"))}i.css({width:k,display:"inline-block"});g.css({"-webkit-appearance":"menulist-button",width:h.outerWidth(),position:"absolute",opacity:0,height:j,fontSize:h.css("font-size")})}).on("change",function(){h.addClass(b("Changed"));f(g,h)}).on("keyup",function(j){if(!h.hasClass(b("Open"))){g.blur();g.focus()}else{if(j.which==13||j.which==27){f(g,h)}}}).on("mousedown",function(j){h.removeClass(b("Changed"))}).on("mouseup",function(j){if(!h.hasClass(b("Open"))){if(a("."+b("Open")).not(h).length>0&&typeof InstallTrigger!=="undefined"){g.focus()}else{h.addClass(b("Open"));j.stopPropagation();a(document).one("mouseup."+b("Open"),function(k){if(k.target!=g.get(0)&&a.inArray(k.target,g.find("*").get())<0){g.blur()}else{f(g,h)}})}}}).focus(function(){h.removeClass(b("Changed")).addClass(b("Focus"))}).blur(function(){h.removeClass(b("Focus")+" "+b("Open"))}).hover(function(){h.addClass(b("Hover"))},function(){h.removeClass(b("Hover"))}).trigger("update")})}})})(jQuery);
!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a,b){function c(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function d(){}function e(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=h.length;c>b;b++){var d=h[b];a[d]=0}return a}function f(b){function d(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||g("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=b("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var f=document.body||document.documentElement;f.appendChild(e);var h=j(e);l=200===c(h.width),f.removeChild(e)}}}function f(a){if(d(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var b=j(a);if("none"===b.display)return e();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var g=f.isBorderBox=!(!k||!b[k]||"border-box"!==b[k]),m=0,n=h.length;n>m;m++){var o=h[m],p=b[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=g&&l,y=c(b.width);y!==!1&&(f.width=y+(x?0:r+v));var z=c(b.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return f}var g="undefined"==typeof console?d:function(a){console.error(a)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],f):"object"==typeof exports?module.exports=f(require("desandro-get-style-property")):a.getSize=f(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){"use strict";function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"use strict";"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){"use strict";function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){"use strict";function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.Item=b(a.Outlayer))}(window,function(a){"use strict";function b(){a.Item.apply(this,arguments)}b.prototype=new a.Item,b.prototype._create=function(){this.id=this.layout.itemGUID++,a.Item.prototype._create.call(this),this.sortData={}},b.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var a=this.layout.options.getSortData,b=this.layout._sorters;for(var c in a){var d=b[c];this.sortData[c]=d(this.element,this)}}};var c=b.prototype.destroy;return b.prototype.destroy=function(){c.apply(this,arguments),this.css({display:""})},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("get-size"),require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.LayoutMode=b(a.getSize,a.Outlayer))}(window,function(a,b){"use strict";function c(a){this.isotope=a,a&&(this.options=a.options[this.namespace],this.element=a.element,this.items=a.filteredItems,this.size=a.size)}return function(){function a(a){return function(){return b.prototype[a].apply(this.isotope,arguments)}}for(var d=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],e=0,f=d.length;f>e;e++){var g=d[e];c.prototype[g]=a(g)}}(),c.prototype.needsVerticalResizeLayout=function(){var b=a(this.isotope.element),c=this.isotope.size&&b;return c&&b.innerHeight!=this.isotope.size.innerHeight},c.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},c.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},c.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},c.prototype.getSegmentSize=function(a,b){var c=a+b,d="outer"+b;if(this._getMeasurement(c,d),!this[c]){var e=this.getFirstItemSize();this[c]=e&&e[d]||this.isotope.size["inner"+b]}},c.prototype.getFirstItemSize=function(){var b=this.isotope.filteredItems[0];return b&&b.element&&a(b.element)},c.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},c.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},c.modes={},c.create=function(a,b){function d(){c.apply(this,arguments)}return d.prototype=new c,b&&(d.options=b),d.prototype.namespace=a,c.modes[a]=d,d},c}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],b):"object"==typeof exports?module.exports=b(require("../layout-mode"),require("masonry-layout")):b(a.Isotope.LayoutMode,a.Masonry)}(window,function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}var d=a.create("masonry"),e=d.prototype._getElementOffset,f=d.prototype.layout,g=d.prototype._getMeasurement;
c(d.prototype,b.prototype),d.prototype._getElementOffset=e,d.prototype.layout=f,d.prototype._getMeasurement=g;var h=d.prototype.measureColumns;d.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,h.call(this)};var i=d.prototype._manageStamp;return d.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,i.apply(this,arguments)},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("fitRows");return b.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth+this.gutter,c=this.isotope.size.innerWidth+this.gutter;0!==this.x&&b+this.x>c&&(this.x=0,this.y=this.maxY);var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,d},b.prototype._getContainerSize=function(){return{height:this.maxY}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("vertical",{horizontalAlignment:0});return b.prototype._resetLayout=function(){this.y=0},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=(this.isotope.size.innerWidth-a.size.outerWidth)*this.options.horizontalAlignment,c=this.y;return this.y+=a.size.outerHeight,{x:b,y:c}},b.prototype._getContainerSize=function(){return{height:this.y}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(c,d,e,f,g,h){return b(a,c,d,e,f,g,h)}):"object"==typeof exports?module.exports=b(a,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):a.Isotope=b(a,a.Outlayer,a.getSize,a.matchesSelector,a.fizzyUIUtils,a.Isotope.Item,a.Isotope.LayoutMode)}(window,function(a,b,c,d,e,f,g){function h(a,b){return function(c,d){for(var e=0,f=a.length;f>e;e++){var g=a[e],h=c.sortData[g],i=d.sortData[g];if(h>i||i>h){var j=void 0!==b[g]?b[g]:b,k=j?1:-1;return(h>i?1:-1)*k}}return 0}}var i=a.jQuery,j=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")},k=document.documentElement,l=k.textContent?function(a){return a.textContent}:function(a){return a.innerText},m=b.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});m.Item=f,m.LayoutMode=g,m.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),b.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var a in g.modes)this._initLayoutMode(a)},m.prototype.reloadItems=function(){this.itemGUID=0,b.prototype.reloadItems.call(this)},m.prototype._itemize=function(){for(var a=b.prototype._itemize.apply(this,arguments),c=0,d=a.length;d>c;c++){var e=a[c];e.id=this.itemGUID++}return this._updateItemsSortData(a),a},m.prototype._initLayoutMode=function(a){var b=g.modes[a],c=this.options[a]||{};this.options[a]=b.options?e.extend(b.options,c):c,this.modes[a]=new b(this)},m.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},m.prototype._layout=function(){var a=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,a),this._isLayoutInited=!0},m.prototype.arrange=function(a){function b(){d.reveal(c.needReveal),d.hide(c.needHide)}this.option(a),this._getIsInstant();var c=this._filter(this.items);this.filteredItems=c.matches;var d=this;this._bindArrangeComplete(),this._isInstant?this._noTransition(b):b(),this._sort(),this._layout()},m.prototype._init=m.prototype.arrange,m.prototype._getIsInstant=function(){var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=a,a},m.prototype._bindArrangeComplete=function(){function a(){b&&c&&d&&e.dispatchEvent("arrangeComplete",null,[e.filteredItems])}var b,c,d,e=this;this.once("layoutComplete",function(){b=!0,a()}),this.once("hideComplete",function(){c=!0,a()}),this.once("revealComplete",function(){d=!0,a()})},m.prototype._filter=function(a){var b=this.options.filter;b=b||"*";for(var c=[],d=[],e=[],f=this._getFilterTest(b),g=0,h=a.length;h>g;g++){var i=a[g];if(!i.isIgnored){var j=f(i);j&&c.push(i),j&&i.isHidden?d.push(i):j||i.isHidden||e.push(i)}}return{matches:c,needReveal:d,needHide:e}},m.prototype._getFilterTest=function(a){return i&&this.options.isJQueryFiltering?function(b){return i(b.element).is(a)}:"function"==typeof a?function(b){return a(b.element)}:function(b){return d(b.element,a)}},m.prototype.updateSortData=function(a){var b;a?(a=e.makeArray(a),b=this.getItems(a)):b=this.items,this._getSorters(),this._updateItemsSortData(b)},m.prototype._getSorters=function(){var a=this.options.getSortData;for(var b in a){var c=a[b];this._sorters[b]=n(c)}},m.prototype._updateItemsSortData=function(a){for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.updateSortData()}};var n=function(){function a(a){if("string"!=typeof a)return a;var c=j(a).split(" "),d=c[0],e=d.match(/^\[(.+)\]$/),f=e&&e[1],g=b(f,d),h=m.sortDataParsers[c[1]];return a=h?function(a){return a&&h(g(a))}:function(a){return a&&g(a)}}function b(a,b){var c;return c=a?function(b){return b.getAttribute(a)}:function(a){var c=a.querySelector(b);return c&&l(c)}}return a}();m.sortDataParsers={parseInt:function(a){return parseInt(a,10)},parseFloat:function(a){return parseFloat(a)}},m.prototype._sort=function(){var a=this.options.sortBy;if(a){var b=[].concat.apply(a,this.sortHistory),c=h(b,this.options.sortAscending);this.filteredItems.sort(c),a!=this.sortHistory[0]&&this.sortHistory.unshift(a)}},m.prototype._mode=function(){var a=this.options.layoutMode,b=this.modes[a];if(!b)throw new Error("No layout mode: "+a);return b.options=this.options[a],b},m.prototype._resetLayout=function(){b.prototype._resetLayout.call(this),this._mode()._resetLayout()},m.prototype._getItemLayoutPosition=function(a){return this._mode()._getItemLayoutPosition(a)},m.prototype._manageStamp=function(a){this._mode()._manageStamp(a)},m.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},m.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},m.prototype.appended=function(a){var b=this.addItems(a);if(b.length){var c=this._filterRevealAdded(b);this.filteredItems=this.filteredItems.concat(c)}},m.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){this._resetLayout(),this._manageStamps();var c=this._filterRevealAdded(b);this.layoutItems(this.filteredItems),this.filteredItems=c.concat(this.filteredItems),this.items=b.concat(this.items)}},m.prototype._filterRevealAdded=function(a){var b=this._filter(a);return this.hide(b.needHide),this.reveal(b.matches),this.layoutItems(b.matches,!0),b.matches},m.prototype.insert=function(a){var b=this.addItems(a);if(b.length){var c,d,e=b.length;for(c=0;e>c;c++)d=b[c],this.element.appendChild(d.element);var f=this._filter(b).matches;for(c=0;e>c;c++)b[c].isLayoutInstant=!0;for(this.arrange(),c=0;e>c;c++)delete b[c].isLayoutInstant;this.reveal(f)}};var o=m.prototype.remove;return m.prototype.remove=function(a){a=e.makeArray(a);var b=this.getItems(a);o.call(this,a);var c=b&&b.length;if(c)for(var d=0;c>d;d++){var f=b[d];e.removeFrom(this.filteredItems,f)}},m.prototype.shuffle=function(){for(var a=0,b=this.items.length;b>a;a++){var c=this.items[a];c.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},m.prototype._noTransition=function(a){var b=this.options.transitionDuration;this.options.transitionDuration=0;var c=a.call(this);return this.options.transitionDuration=b,c},m.prototype.getFilteredItemElements=function(){for(var a=[],b=0,c=this.filteredItems.length;c>b;b++)a.push(this.filteredItems[b].element);return a},m});
(function(b){var a="waitForImages";b.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"]};b.expr[":"].uncached=function(d){if(!b(d).is('img[src!=""]')){return false}var c=new Image();c.src=d.src;return !c.complete};b.fn.waitForImages=function(f,d,e){var g=0;var c=0;if(b.isPlainObject(arguments[0])){e=arguments[0].waitForAll;d=arguments[0].each;f=arguments[0].finished}f=f||b.noop;d=d||b.noop;e=!!e;if(!b.isFunction(f)||!b.isFunction(d)){throw new TypeError("An invalid callback was supplied.")}return this.each(function(){var j=b(this);var k=[];var h=b.waitForImages.hasImageProperties||[];var i=/url\(\s*(['"]?)(.*?)\1\s*\)/g;if(e){j.find("*").addBack().each(function(){var l=b(this);if(l.is("img:uncached")){k.push({src:l.attr("src"),element:l[0]})}b.each(h,function(o,p){var m=l.css(p);var n;if(!m){return true}while(n=i.exec(m)){k.push({src:n[2],element:l[0]})}})})}else{j.find("img:uncached").each(function(){k.push({src:this.src,element:this})})}g=k.length;c=0;if(g===0){f.call(j[0])}b.each(k,function(m,l){var n=new Image();b(n).on("load."+a+" error."+a,function(o){c++;d.call(l.element,c,g,o.type=="load");if(c==g){f.call(j[0]);return false}});n.src=l.src})})}}(jQuery));(function(a){a.fn.smartColumnsRows=function(b){var c=a.extend({defWidthClss:"grid_default_width",subElement:"li",subClass:"product-block",firstClass:"first_item_tm",lastClass:"last_item_tm"},b);return this.each(function(){var f=a(this);var k=a(this).attr("id");var g=parseInt(a("."+c.defWidthClss).css("width"));f.css("width","auto");var j=f.width();var i=g;var d=Math.floor(j/i);var e=g*100/Math.floor(j/d);if(e<=75&&e>=50){d=d+1}if(a(window).width()<380){d=1}var h=Math.floor(j/d);f.css("width",j);a("#"+k+" > "+c.subElement).css("width",h);a("#"+k+" > "+c.subElement).removeClass(c.firstClass);a("#"+k+" > "+c.subElement+":nth-child("+d+"n+1)").addClass(c.firstClass);a("#"+k+" > "+c.subElement).removeClass(c.lastClass);a("#"+k+" > "+c.subElement+":nth-child("+d+"n)").addClass(c.lastClass);f.waitForImages(function(){var l=0;a("#"+k+" > "+c.subElement+" ."+c.subClass).each(function(){a(this).css("height","auto");l=Math.max(l,a(this).height())});if(l==0){l="auto"}else{l=l+"px"}a("#"+k+" > "+c.subElement+" ."+c.subClass).css("height",l)})})}}(jQuery));(function(a){a.fn.tmMark=function(b){var c=a.extend({checkboxCls:"tm-checkbox",radioCls:"tm-radio",checkedCls:"tm-checked",selectedCls:"tm-selected",hideCls:"tm-hide"},b);return this.each(function(){var e=a(this);var d=e.attr("type")=="checkbox"?'<div class="'+c.checkboxCls+'">':'<div class="'+c.radioCls+'">';if(e.attr("type")=="checkbox"){e.addClass(c.hideCls).wrap(d).change(function(){if(a(this).is(":checked")){a(this).parent().addClass(c.checkedCls)}else{a(this).parent().removeClass(c.checkedCls)}});if(e.is(":checked")){e.parent().addClass(c.checkedCls)}}else{if(e.attr("type")=="radio"){e.addClass(c.hideCls).wrap(d).change(function(){a('input[name="'+a(this).attr("name")+'"]').each(function(){if(a(this).is(":checked")){a(this).parent().addClass(c.selectedCls)}else{a(this).parent().removeClass(c.selectedCls)}})});if(e.is(":checked")){e.parent().addClass(c.selectedCls)}}}})}}(jQuery));(function(a){a.fn.responsiveTable=function(b){var c=a.extend({},{prefix:"tg",target:""},b);return this.each(function(){var f="";var e="";var h="";var d="";c.prefix=c.prefix+"_";columns=[];table_target=a(this);var g=0;var i=0;a(table_target).find("tr").each(function(){if(a(this).parent().attr("class")=="table-foot"){var j=0;d+='<div class="'+c.prefix+"row "+columns[j].replace(/\s+/g,"")+'">\n';a(this).find("th,td").each(function(){var k=a(this).html();if(j%2==0){d+="<label>"+k.replace(/^\s\s*/,"").replace(/\s\s*$/,"")+"</label>\n"}else{d+="<span>"+k.replace(/^\s\s*/,"").replace(/\s\s*$/,"")+"</span>\n"}j++});d+="</div>\n"}else{var j=0;a(this).find("th,td").each(function(){var k=a(this).html();if(g==0){columns.push(a(this).html())}else{h+='<div class="'+c.prefix+"row "+columns[j].replace(/\s+/g,"")+'">\n';h+="<label>"+columns[j]+"</label>\n";h+="<span>"+k.replace(/^\s\s*/,"").replace(/\s\s*$/,"")+"</span>\n";h+="</div>\n"}j++});if(g!=0){f+='<div class="'+c.prefix+"group "+c.prefix+g+'">\n';f+=h;f+="</div>\n";h=""}}g++});f='<div class="'+c.prefix+'container">\n'+f+"</div>\n";if(g!=0){e+='<div class="'+c.prefix+"group "+c.prefix+g+'">\n';e+=d;e+="</div>\n";d=""}if(i!=0){f+='<div class="'+c.prefix+'container_footer">\n'+e+"</div>\n"}if(c.target.length>0){a(c.target).html(f)}else{a(table_target).before(f)}})}})(jQuery);
if(typeof Object.create!=="function"){Object.create=function(b){function a(){}a.prototype=b;return new a()}}(function(c,b,a,e){var d={init:function(g,h){var j=this;j.options=c.extend({},c.fn.sliderCarousel.options,g);var i=h;var f=c(h);j.$elem=f;j.loadContent()},loadContent:function(){var h=this;if(typeof h.options.beforeInit==="function"){h.options.beforeInit.apply(this,[h.$elem])}if(typeof h.options.jsonPath==="string"){var g=h.options.jsonPath;function f(l){if(typeof h.options.jsonSuccess==="function"){h.options.jsonSuccess.apply(this,[l])}else{var k="";for(var j in l.owl){k+=l.owl[j]["item"]}h.$elem.html(k)}h.logIn()}c.getJSON(g,f)}else{h.logIn()}},logIn:function(){var f=this;f.baseClass();f.$elem.css({opacity:0});f.checkTouch();f.eventTypes();f.support3d();f.wrapperWidth=0;f.currentSlide=0;f.userItems=f.$elem.children();f.itemsAmount=f.userItems.length;f.wrapItems();f.owlItems=f.$elem.find(".slider-item");f.owlWrapper=f.$elem.find(".slider-wrapper");f.orignalItems=f.options.items;f.playDirection="next";f.checkVisible;f.onStartup();f.customEvents()},onStartup:function(){var f=this;f.updateItems();f.calculateAll();f.buildControls();f.updateControls();f.response();f.moveEvents();f.stopOnHover();if(f.options.autoPlay===true){f.options.autoPlay=5000}f.play();f.$elem.find(".slider-wrapper").css("display","block");if(!f.$elem.is(":visible")){f.watchVisibility()}else{setTimeout(function(){f.$elem.animate({opacity:1},200)},10)}f.onstartup=false;f.eachMoveUpdate();if(typeof f.options.afterInit==="function"){f.options.afterInit.apply(this,[f.$elem])}},eachMoveUpdate:function(){var f=this;if(f.options.lazyLoad===true){f.lazyLoad()}if(f.options.autoHeight===true){f.autoHeight()}if(f.options.addClassActive===true){f.addClassActive()}if(typeof f.options.afterAction==="function"){f.options.afterAction.apply(this,[f.$elem])}},updateVars:function(){var f=this;f.watchVisibility();f.updateItems();f.calculateAll();f.updatePosition();f.updateControls();f.eachMoveUpdate()},reload:function(g){var f=this;setTimeout(function(){f.updateVars()},0)},watchVisibility:function(){var f=this;clearInterval(f.checkVisible);if(!f.$elem.is(":visible")){f.$elem.css({opacity:0});clearInterval(f.autoPlaySpeed)}else{return false}f.checkVisible=setInterval(function(){if(f.$elem.is(":visible")){f.reload();f.$elem.animate({opacity:1},200);clearInterval(f.checkVisible)}},500)},wrapItems:function(){var f=this;f.userItems.wrapAll('<div class="slider-wrapper">');f.$elem.find(".slider-wrapper").wrap('<div class="slider-wrapper-outer">');f.wrapperOuter=f.$elem.find(".slider-wrapper-outer");f.$elem.css("display","block")},baseClass:function(){},updateItems:function(){var k=this;if(k.options.responsive===false){return false}var h=parseInt(c("."+k.options.defWidthClss).css("width"));var j=k.$elem.width();var i=h;var f=Math.floor(j/i);var g=h*100/Math.floor(j/f);if(g<=75&&g>=50){f=f+1}k.options.items=f;if(c(b).width()<380){k.options.items=1}if(k.options.items>k.itemsAmount){k.options.items=k.itemsAmount}k.tmClasses()},tmClasses:function(){var h=this;var g=h.currentSlide+1;var f=h.currentSlide+h.options.items;h.$elem.find(h.options.subElement).removeClass(h.options.firstClass);h.$elem.find(h.options.subElement+":nth-child("+h.options.items+"n+"+g+")").addClass(h.options.firstClass);h.$elem.find(h.options.subElement).removeClass(h.options.lastClass);h.$elem.find(h.options.subElement+":nth-child("+f+"n)").addClass(h.options.lastClass)},response:function(){var h=this,g;if(h.options.responsive!==true){return false}var f=c(b).width();c(b).bind("resize",function(){if(c(b).width()!==f){if(h.options.autoPlay!==false){clearInterval(h.autoPlaySpeed)}clearTimeout(g);g=setTimeout(function(){f=c(b).width();h.updateVars()},h.options.responsiveRefreshRate)}})},updatePosition:function(){var f=this;if(f.support3d===true){if(f.positionsInArray[f.currentSlide]>f.maximumPixels){f.transition3d(f.positionsInArray[f.currentSlide])}else{f.transition3d(0);f.currentSlide=0}}else{if(f.positionsInArray[f.currentSlide]>f.maximumPixels){f.css2slide(f.positionsInArray[f.currentSlide])}else{f.css2slide(0);f.currentSlide=0}}if(f.options.autoPlay!==false){f.checkAp()}},appendItemsSizes:function(){var h=this;var f=0;var g=h.itemsAmount-h.options.items;h.owlItems.each(function(i){c(this).css({width:h.itemWidth}).data("slider-item",Number(i));if(i%h.options.items===0||i===g){if(!(i>g)){f+=1}}c(this).data("slider-roundPages",f)})},appendWrapperSizes:function(){var g=this;var f=0;var f=g.owlItems.length*g.itemWidth;g.owlWrapper.css({width:f*2,left:0});g.appendItemsSizes()},calculateAll:function(){var f=this;f.calculateWidth();f.appendWrapperSizes();f.loops();f.max()},calculateWidth:function(){var f=this;f.itemWidth=Math.round(f.$elem.width()/f.options.items)},max:function(){var f=this;f.maximumSlide=f.itemsAmount-f.options.items;var g=(f.itemsAmount*f.itemWidth)-f.options.items*f.itemWidth;g=g*-1;f.maximumPixels=g;return g},min:function(){return 0},loops:function(){var h=this;h.positionsInArray=[0];var g=0;for(var f=0;f<h.itemsAmount;f++){g+=h.itemWidth;h.positionsInArray.push(-g)}},buildControls:function(){var f=this;if(f.options.navigation===true||f.options.pagination===true){f.owlControls=c('<div class="slider-controls"/>').toggleClass("clickable",!f.isTouch).appendTo(f.$elem)}if(f.options.pagination===true){f.buildPagination()}if(f.options.navigation===true){f.buildButtons()}},buildButtons:function(){var g=this;var f=c('<div class="slider-buttons"/>');g.owlControls.append(f);g.buttonPrev=c("<div/>",{"class":"slider-prev",html:g.options.navigationText[0]||""});g.buttonNext=c("<div/>",{"class":"slider-next",html:g.options.navigationText[1]||""});f.append(g.buttonPrev).append(g.buttonNext);f.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(h){h.preventDefault();if(c(this).hasClass("slider-next")){g.next()}else{g.prev()}})},buildPagination:function(){var f=this;f.paginationWrapper=c('<div class="slider-pagination"/>');f.owlControls.append(f.paginationWrapper);f.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".slider-page",function(g){g.preventDefault();if(Number(c(this).data("slider-page"))!==f.currentSlide){f.goTo(Number(c(this).data("slider-page")),true)}})},updatePagination:function(){var m=this;if(m.options.pagination===false){return false}m.paginationWrapper.html("");var g=0;var l=m.itemsAmount-m.itemsAmount%m.options.items;for(var j=0;j<m.itemsAmount;j++){if(j%m.options.items===0){g+=1;if(l===j){var k=m.itemsAmount-m.options.items}var h=c("<div/>",{"class":"slider-page"});var f=c("<span></span>",{text:m.options.paginationNumbers===true?g:"","class":m.options.paginationNumbers===true?"slider-numbers":""});h.append(f);h.data("slider-page",l===j?k:j);h.data("slider-roundPages",g);m.paginationWrapper.append(h)}}m.checkPagination()},checkPagination:function(){var f=this;f.paginationWrapper.find(".slider-page").each(function(h,g){if(c(this).data("slider-roundPages")===c(f.owlItems[f.currentSlide]).data("slider-roundPages")){f.paginationWrapper.find(".slider-page").removeClass("active");c(this).addClass("active")}})},checkNavigation:function(){var f=this;if(f.options.navigation===false){return false}if(f.options.goToFirstNav===false){if(f.currentSlide===0&&f.maximumSlide===0){f.buttonPrev.addClass("disabled");f.buttonNext.addClass("disabled")}else{if(f.currentSlide===0&&f.maximumSlide!==0){f.buttonPrev.addClass("disabled");f.buttonNext.removeClass("disabled")}else{if(f.currentSlide===f.maximumSlide){f.buttonPrev.removeClass("disabled");f.buttonNext.addClass("disabled")}else{if(f.currentSlide!==0&&f.currentSlide!==f.maximumSlide){f.buttonPrev.removeClass("disabled");f.buttonNext.removeClass("disabled")}}}}}},updateControls:function(){var f=this;f.updatePagination();f.checkNavigation();if(f.owlControls){if(f.options.items===f.itemsAmount){f.owlControls.hide()}else{f.owlControls.show()}}},destroyControls:function(){var f=this;if(f.owlControls){f.owlControls.remove()}},next:function(g){var f=this;f.currentSlide+=f.options.scrollPerPage===true?f.options.items:1;if(f.currentSlide>f.maximumSlide+(f.options.scrollPerPage==true?(f.options.items-1):0)){if(f.options.goToFirstNav===true){f.currentSlide=0;g="goToFirst"}else{f.currentSlide=f.maximumSlide;return false}}f.goTo(f.currentSlide,g)},prev:function(g){var f=this;if(f.options.scrollPerPage===true&&f.currentSlide>0&&f.currentSlide<f.options.items){f.currentSlide=0}else{f.currentSlide-=f.options.scrollPerPage===true?f.options.items:1}if(f.currentSlide<0){if(f.options.goToFirstNav===true){f.currentSlide=f.maximumSlide;g="goToFirst"}else{f.currentSlide=0;return false}}f.goTo(f.currentSlide,g)},goTo:function(f,g){var i=this;if(typeof i.options.beforeMove==="function"){i.options.beforeMove.apply(this,[i.$elem])}if(f>=i.maximumSlide){f=i.maximumSlide}else{if(f<=0){f=0}}i.currentSlide=f;var h=i.positionsInArray[f];if(i.support3d===true){i.isCss3Finish=false;if(g===true){i.swapTransitionSpeed("paginationSpeed");setTimeout(function(){i.isCss3Finish=true},i.options.paginationSpeed)}else{if(g==="goToFirst"){i.swapTransitionSpeed(i.options.goToFirstSpeed);setTimeout(function(){i.isCss3Finish=true},i.options.goToFirstSpeed)}else{i.swapTransitionSpeed("slideSpeed");setTimeout(function(){i.isCss3Finish=true},i.options.slideSpeed)}}i.transition3d(h)}else{if(g===true){i.css2slide(h,i.options.paginationSpeed)}else{if(g==="goToFirst"){i.css2slide(h,i.options.goToFirstSpeed)}else{i.css2slide(h,i.options.slideSpeed)}}}if(i.options.pagination===true){i.checkPagination()}if(i.options.navigation===true){i.checkNavigation()}if(i.options.autoPlay!==false){i.checkAp()}i.eachMoveUpdate();if(typeof i.options.afterMove==="function"){i.options.afterMove.apply(this,[i.$elem])}i.tmClasses()},stop:function(){var f=this;f.apStatus="stop";clearInterval(f.autoPlaySpeed)},checkAp:function(){var f=this;if(f.apStatus!=="stop"){f.play()}},play:function(){var f=this;f.apStatus="play";if(f.options.autoPlay===false){return false}clearInterval(f.autoPlaySpeed);f.autoPlaySpeed=setInterval(function(){if(f.currentSlide<f.maximumSlide&&f.playDirection==="next"){f.next(true)}else{if(f.currentSlide===f.maximumSlide){if(f.options.goToFirst===true){f.goTo(0,"goToFirst")}else{f.playDirection="prev";f.prev(true)}}else{if(f.playDirection==="prev"&&f.currentSlide>0){f.prev(true)}else{if(f.playDirection==="prev"&&f.currentSlide===0){f.playDirection="next";f.next(true)}}}}},f.options.autoPlay)},swapTransitionSpeed:function(g){var f=this;if(g==="slideSpeed"){f.owlWrapper.css(f.addTransition(f.options.slideSpeed))}else{if(g==="paginationSpeed"){f.owlWrapper.css(f.addTransition(f.options.paginationSpeed))}else{if(typeof g!=="string"){f.owlWrapper.css(f.addTransition(g))}}}},addTransition:function(g){var f=this;return{"-webkit-transition":"all "+g+"ms ease","-moz-transition":"all "+g+"ms ease","-o-transition":"all "+g+"ms ease",transition:"all "+g+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(f){return{"-webkit-transform":"translate3d("+f+"px, 0px, 0px)","-moz-transform":"translate3d("+f+"px, 0px, 0px)","-o-transform":"translate3d("+f+"px, 0px, 0px)","-ms-transform":"translate3d("+f+"px, 0px, 0px)",transform:"translate3d("+f+"px, 0px,0px)"}},transition3d:function(g){var f=this;f.owlWrapper.css(f.doTranslate(g))},css2move:function(g){var f=this;f.owlWrapper.css({left:g})},css2slide:function(h,g){var f=this;f.isCssFinish=false;f.owlWrapper.stop(true,true).animate({left:h},{duration:g||f.options.slideSpeed,complete:function(){f.isCssFinish=true}})},support3d:function(){var k=this;var j="translate3d(0px, 0px, 0px)";var f=a.createElement("div");f.style.cssText="  -moz-transform:"+j+"; -ms-transform:"+j+"; -o-transform:"+j+"; -webkit-transform:"+j+"; transform:"+j;var i=/translate3d\(0px, 0px, 0px\)/g;var g=f.style.cssText.match(i);var h=(g!==null&&g.length===1);k.support3d=h;return h},checkTouch:function(){var f=this;f.isTouch="ontouchstart" in b||navigator.msMaxTouchPoints},moveEvents:function(){var f=this;if(f.options.mouseDrag!==false||f.options.touchDrag!==false){f.gestures();f.disabledEvents()}},eventTypes:function(){var g=this;var f=["s","e","x"];g.ev_types={};if(g.options.mouseDrag===true&&g.options.touchDrag===true){f=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]}else{if(g.options.mouseDrag===false&&g.options.touchDrag===true){f=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]}else{if(g.options.mouseDrag===true&&g.options.touchDrag===false){f=["mousedown.owl","mousemove.owl","mouseup.owl"]}}}g.ev_types.start=f[0];g.ev_types.move=f[1];g.ev_types.end=f[2]},disabledEvents:function(){var f=this;f.$elem.on("dragstart.owl","img",function(g){g.preventDefault()});f.$elem.bind("mousedown.disableTextSelect",function(){return false})},gestures:function(){var i=this;var j={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};i.isCssFinish=true;function l(m){if(m.touches){return{x:m.touches[0].pageX,y:m.touches[0].pageY}}else{if(m.pageX!==e){return{x:m.pageX,y:m.pageY}}else{return{x:m.clientX,y:m.clientY}}}}function k(m){if(m==="on"){c(a).on(i.ev_types.move,h);c(a).on(i.ev_types.end,f)}else{if(m==="off"){c(a).off(i.ev_types.move);c(a).off(i.ev_types.end)}}}function g(n){var n=n.originalEvent||n||b.event;if(i.isCssFinish===false){return false}if(i.isCss3Finish===false){return false}if(i.options.autoPlay!==false){clearInterval(i.autoPlaySpeed)}if(i.isTouch!==true&&!i.owlWrapper.hasClass("grabbing")){i.owlWrapper.addClass("grabbing")}i.newPosX=0;i.newRelativeX=0;c(this).css(i.removeTransition());var m=c(this).position();j.relativePos=m.left;j.offsetX=l(n).x-m.left;j.offsetY=l(n).y-m.top;k("on");j.sliding=false;j.targetElement=n.target||n.srcElement}function h(o){var o=o.originalEvent||o||b.event;i.newPosX=l(o).x-j.offsetX;i.newPosY=l(o).y-j.offsetY;i.newRelativeX=i.newPosX-j.relativePos;if(typeof i.options.startDragging==="function"&&j.dragging!==true&&i.newPosX!==0){j.dragging=true;i.options.startDragging.apply(this)}if(i.newRelativeX>8||i.newRelativeX<-8&&i.isTouch===true){o.preventDefault?o.preventDefault():o.returnValue=false;j.sliding=true}if((i.newPosY>10||i.newPosY<-10)&&j.sliding===false){c(a).off("touchmove.owl")}var m=function(){return i.newRelativeX/5};var n=function(){return i.maximumPixels+i.newRelativeX/5};i.newPosX=Math.max(Math.min(i.newPosX,m()),n());if(i.support3d===true){i.transition3d(i.newPosX)}else{i.css2move(i.newPosX)}}function f(p){var p=p.originalEvent||p||b.event;p.target=p.target||p.srcElement;j.dragging=false;if(i.isTouch!==true){i.owlWrapper.removeClass("grabbing")}if(i.newPosX!==0){var o=i.getNewPosition();i.goTo(o);if(j.targetElement===p.target&&i.isTouch!==true){c(p.target).on("click.disable",function(q){q.stopImmediatePropagation();q.stopPropagation();q.preventDefault();c(p.target).off("click.disable")});var n=c._data(p.target,"events")["click"];var m=n.pop();n.splice(0,0,m)}}k("off")}i.$elem.on(i.ev_types.start,".slider-wrapper",g)},clearEvents:function(){var f=this;f.$elem.off(".owl");c(a).off(".owl")},getNewPosition:function(){var g=this,f;var f=g.improveClosest();if(f>g.maximumSlide){g.currentSlide=g.maximumSlide;f=g.maximumSlide}else{if(g.newPosX>=0){f=0;g.currentSlide=0}}return f},improveClosest:function(){var h=this;var i=h.positionsInArray;var f=h.newPosX;var g=null;c.each(i,function(k,j){if(f-(h.itemWidth/20)>i[k+1]&&f-(h.itemWidth/20)<j&&h.moveDirection()==="left"){g=j;h.currentSlide=k}else{if(f+(h.itemWidth/20)<j&&f+(h.itemWidth/20)>i[k+1]&&h.moveDirection()==="right"){g=i[k+1];h.currentSlide=k+1}}});return h.currentSlide},moveDirection:function(){var f=this,g;if(f.newRelativeX<0){g="right";f.playDirection="next"}else{g="left";f.playDirection="prev"}return g},customEvents:function(){var f=this;f.$elem.on("slider.next",function(){f.next()});f.$elem.on("slider.prev",function(){f.prev()});f.$elem.on("slider.play",function(g,h){f.options.autoPlay=h;f.play();f.hoverStatus="play"});f.$elem.on("slider.stop",function(){f.stop();f.hoverStatus="stop"})},stopOnHover:function(){var f=this;if(f.options.stopOnHover===true&&f.isTouch!==true&&f.options.autoPlay!==false){f.$elem.on("mouseover",function(){f.stop()});f.$elem.on("mouseout",function(){if(f.hoverStatus!=="stop"){f.play()}})}},lazyLoad:function(){},autoHeight:function(){var f=this;f.$elem.waitForImages(function(){var g=0;f.$elem.find(f.options.subElement+" ."+f.options.subClass).each(function(){c(this).css("height","auto");g=Math.max(g,c(this).height())});if(g==0){g="auto"}else{g=g+"px"}f.$elem.find(f.options.subElement+" ."+f.options.subClass).css("height",g)})},addClassActive:function(){var g=this;c(g.owlItems).removeClass("active");for(var f=g.currentSlide;f<g.currentSlide+g.options.items;f++){c(g.owlItems[f]).addClass("active")}}};c.fn.sliderCarousel=function(f){return this.each(function(){var g=Object.create(d);g.init(f,this);c.data(this,"sliderCarousel",g)})};c.fn.sliderCarousel.options={items:5,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsMobile:[479,1],singleItem:false,defWidthClss:"grid_default_width",subElement:".slider-item",subClass:"product-block",firstClass:"first_item_tm",lastClass:"last_item_tm",slideSpeed:200,paginationSpeed:800,autoPlay:false,stopOnHover:false,goToFirst:true,goToFirstSpeed:1000,navigation:false,navigationText:["prev","next"],goToFirstNav:true,scrollPerPage:false,pagination:true,paginationNumbers:false,responsive:true,responsiveRefreshRate:200,baseClass:"slider-carousel",theme:"slider-theme",lazyLoad:false,lazyFollow:true,autoHeight:true,jsonPath:false,jsonSuccess:false,mouseDrag:true,touchDrag:true,beforeInit:false,afterInit:false,beforeMove:false,afterMove:false,afterAction:false,startDragging:false,addClassActive:false}})(jQuery,window,document);
(function ($){
var inviewObjects={}, viewportSize, viewportOffset,
d=document, w=window, documentElement=d.documentElement, expando=$.expando, timer;
$.event.special.inview={
add: function(data){
inviewObjects[data.guid + "-" + this[expando]]={ data: data, $element: $(this) };
if(!timer&&!$.isEmptyObject(inviewObjects)){
timer=setInterval(checkInView, 250);
}},
remove: function(data){
try { delete inviewObjects[data.guid + "-" + this[expando]]; } catch(e){}
if($.isEmptyObject(inviewObjects)){
clearInterval(timer);
timer=null;
}}
};
function getViewportSize(){
var mode, domObject, size={ height: w.innerHeight, width: w.innerWidth };
if(!size.height){
mode=d.compatMode;
if(mode||!$.support.boxModel){
domObject=mode==='CSS1Compat' ?
documentElement :
d.body;
size={
height: domObject.clientHeight,
width:  domObject.clientWidth
};}}
return size;
}
function getViewportOffset(){
return {
top:  w.pageYOffset||documentElement.scrollTop||d.body.scrollTop,
left: w.pageXOffset||documentElement.scrollLeft||d.body.scrollLeft
};}
function checkInView(){
var $elements=$(), elementsLength, i=0;
$.each(inviewObjects, function(i, inviewObject){
var selector=inviewObject.data.selector,
$element=inviewObject.$element;
$elements=$elements.add(selector ? $element.find(selector):$element);
});
elementsLength=$elements.length;
if(elementsLength){
viewportSize=viewportSize||getViewportSize();
viewportOffset=viewportOffset||getViewportOffset();
for (; i<elementsLength; i++){
if(!$.contains(documentElement, $elements[i])){
continue;
}
var $element=$($elements[i]),
elementSize={ height: $element.height(), width: $element.width() },
elementOffset=$element.offset(),
inView=$element.data('inview'),
visiblePartX,
visiblePartY,
visiblePartsMerged;
if(!viewportOffset||!viewportSize){
return;
}
if(elementOffset.top + elementSize.height > viewportOffset.top &&
elementOffset.top < viewportOffset.top + viewportSize.height &&
elementOffset.left + elementSize.width > viewportOffset.left &&
elementOffset.left < viewportOffset.left + viewportSize.width){
visiblePartX=(viewportOffset.left > elementOffset.left ?
'right':(viewportOffset.left + viewportSize.width) < (elementOffset.left + elementSize.width) ?
'left':'both');
visiblePartY=(viewportOffset.top > elementOffset.top ?
'bottom':(viewportOffset.top + viewportSize.height) < (elementOffset.top + elementSize.height) ?
'top':'both');
visiblePartsMerged=visiblePartX + "-" + visiblePartY;
if(!inView||inView!==visiblePartsMerged){
$element.data('inview', visiblePartsMerged).trigger('inview', [true, visiblePartX, visiblePartY]);
}}else if(inView){
$element.data('inview', false).trigger('inview', [false]);
}}
}}
$(w).bind("scroll resize", function(){
viewportSize=viewportOffset=null;
});
if(!documentElement.addEventListener&&documentElement.attachEvent){
documentElement.attachEvent("", function(){
viewportOffset=null;
});
}})(jQuery);
!function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
jQuery(document).ready(function(){
Shadowbox.init({
overlayOpacity: 0.8
}, setupDemos);
jQuery('br', '.liststyle_content').remove();
jQuery('input[type="checkbox"]').tmMark();
jQuery('input[type="radio"]').tmMark();
jQuery('select.orderby').customSelect();
jQuery("ul li:empty").remove();
jQuery('br', '.brand_block').remove();
jQuery('br', '.pricing-content-inner').remove();
jQuery('br', '#vertical_tab .tabs').remove();
jQuery('.site-main .primary-sidebar .widget ul').addClass('main-ul');
jQuery('.tagcloud').addClass('main-ul');
jQuery('p').each(function(){
var $this=jQuery(this);
if($this.html().replace(/\s|&nbsp;/g, '').length==0)
$this.remove();
});
var $responsive_menu=jQuery.noConflict();
$responsive_menu(".nav-button").click(function (){
$responsive_menu(".nav-button, .primary-nav").toggleClass("open");
});
function setmegamenu(){
var menu_effect;
if(jQuery(window).width() >=1000){
menu_effect='hover';
jQuery('.mega-menu .mega').dcMegaMenu({
rowItems: 4,
speed: 'fast',
effect: 'slide',
event: menu_effect,
fullWidth: false,
mbarIcon: true
});
}}
jQuery(window).resize(setmegamenu);
jQuery(setmegamenu);
jQuery(".woocommerce-breadcrumb").appendTo(jQuery(".main_inner .page-title .page-title-inner"));
jQuery(".gridlist-toggle").prependTo(jQuery("#primary #content"));
jQuery(".gridlist-toggle").insertAfter(".page-title");
jQuery('.woocommerce-result-count').wrap(" <div class='category-toolbar'> </div>");
jQuery('.woocommerce-ordering').appendTo(".category-toolbar");
jQuery('.gridlist-toggle').prependTo(".category-toolbar");
jQuery(".quantity.buttons_added").find("input.input-text").attr({type:"text"});
jQuery(".nav-menu:first > li").each(function (i){
jQuery(this).addClass("main-li");
});
jQuery(document).ready(function (){
jQuery('#horizontalTab').easyResponsiveTabs({
type: 'default',
width: 'auto',
fit: true,
closed: 'accordion',
activate: function(event){
var $tab=jQuery(this);
var $info=jQuery('#tabInfo');
var $name=jQuery('span', $info);
$name.text($tab.text());
$info.show();
}});
});
jQuery(document).ready(function (){
jQuery('#categorytab').easyResponsiveTabs({
type: 'default',
width: 'auto',
fit: true,
closed: 'accordion',
activate: function(event){
var $tab=jQuery(this);
var $info=jQuery('#tabInfo');
var $name=jQuery('span', $info);
$name.text($tab.text());
$info.show();
}});
});
(function ($){
var scroll_timer;
var displayed=false;
var $message=$('#to_top');
var $window=$(window);
var top=$(document.body).children(0).position().top;
$('#to_top').click(function (event){
event.preventDefault();
$('html, body').animate({scrollTop:0},'slow');
});
$window.scroll(function (){
window.clearTimeout(scroll_timer);
scroll_timer=window.setTimeout(function (){
if($window.scrollTop()<=top){
displayed=false;
$message.fadeOut(500);
}
else if(displayed==false){
displayed=true;
$message.stop(true, true).show().click(function (){ $message.fadeOut(500); });
}}, 100);
});
})(jQuery);
(function ($){
$('.toogle_div a.tog').click(function (i){
var dropDown=$(this).parent().find('.tab_content');
$(this).parent().find('.tab_content').not(dropDown).slideUp();
if($(this).hasClass('current')){
$(this).removeClass('current');
}else{
$(this).addClass('current');
}
dropDown.stop(false, true).slideToggle().css({ display:'block' });
i.preventDefault();
});
})(jQuery);
(function ($){
var allPanels=$('.accordion .tab_content').hide();
$('.accordion .tog').click(function(){
allPanels.slideUp();
$(this).parent().next().slideDown();
return false;
});
})(jQuery);
(function ($){
$('.togg span.tog').click(function (i){
var dropDown=$(this).parent().find('.tab_content');
$(this).parent().find('.tab_content').not(dropDown).slideUp();
if($(this).hasClass('current')){
$(this).removeClass('current');
}else{
$(this).addClass('current');
}
dropDown.stop(false, true).slideToggle().css({ display:'block' });
i.preventDefault();
});
})(jQuery);
(function ($){
$('.accordion a.tog').click(function (j){
var dropDown=$(this).parent().find('.tab_content');
$(this).parent().parent().find('.tab_content').not(dropDown).slideUp();
if($(this).hasClass('current')){
$(this).removeClass('current');
}else{
$(this).parent().parent().find('.tog').removeClass('current');
$(this).addClass('current');
dropDown.stop(false, true).slideToggle().css({ display:'block' });
}
j.preventDefault();
});
})(jQuery);
(function ($){
$('.tab ul.tabs li:first-child a').addClass('current');
$('.tab .tab_groupcontent div.tabs_tab').hide();
$('.tab .tab_groupcontent div.tabs_tab:first-child').css('display','block');
$('.tab ul.tabs li a').click(function (g){
var tab=$(this).parent().parent().parent(),
index=$(this).parent().index();
tab.find('ul.tabs').find('a').removeClass('current');
$(this).addClass('current');
tab.find('.tab_groupcontent').find('div.tabs_tab').not('div.tabs_tab:eq(' + index + ')').slideUp();
tab.find('.tab_groupcontent').find('div.tabs_tab:eq(' + index + ')').slideDown();
g.preventDefault();
});
})(jQuery);
(function ($){
$(".animated").each(function (){
$(this).one('inview', function (event, visible){
var $delay="";
var $this=$(this),
$animated=($this.data("animated")!==undefined) ? $this.data("animated"):"slideUp";
$delay=($this.data("delay")!==undefined) ? $this.data("delay"):300;
if(visible===true){
setTimeout(function (){
$this.addClass($animated);
$this.css('opacity', 1);
}, $delay);
}else{
setTimeout(function (){
$this.removeClass($animated);
$this.css('opacity', 0);
}, $delay);
}});
});
})(jQuery);
(function ($){
$(".active_progresbar > span").each(function(){
$(this)
.data("origWidth", $(this).width())
.width(0)
.animate({
width: $(this).data("origWidth")
}, 1200);
});
})(jQuery);
jQuery("#commentform textarea").addClass("required");
jQuery("#commentform").validate();
jQuery("#shortcode_contactform").validate();
var $owl_carousel=jQuery.noConflict();
jQuery(".portfolio-carousel").each(function (){
if($owl_carousel(this).attr('id')){
var portfolio_products=$owl_carousel(this).attr('id').replace('_portfolio_carousel','');
$owl_carousel('.portfolio-carousel').addClass('owl-carousel');
$owl_carousel(".portfolio-carousel").owlCarousel({
navigation:true,
pagination:false,
items:portfolio_products,
itemsDesktop:[1199,3],
itemsDesktopSmall:[979,2],
itemsTablet: [768,2],
itemsMobile:[479,1]
});
}});
jQuery(".latest-news-carousel").each(function (){
if($owl_carousel(this).attr('id')){
var latest_news_products=$owl_carousel(this).attr('id').replace('_latest_news_carousel','');
$owl_carousel('.latest-news-carousel').addClass('owl-carousel');
$owl_carousel(".latest-news-carousel").owlCarousel({
navigation:true,
pagination:false,
items:latest_news_products,
itemsDesktop:[1199,latest_news_products],
itemsDesktopSmall:[979,1],
itemsTablet: [768,1],
itemsMobile:[479,1]
});
}});
jQuery(".blog-carousel").each(function (){
if($owl_carousel(this).attr('id')){
var blog_products=$owl_carousel(this).attr('id').replace('_blog_carousel','');
$owl_carousel('.blog-carousel').addClass('owl-carousel');
$owl_carousel(".blog-carousel").owlCarousel({
navigation:true,
pagination:false,
items:blog_products,
itemsDesktop:[1199,blog_products],
itemsDesktopSmall:[979,2],
itemsTablet: [768,2],
itemsMobile:[479,1]
});
}});
jQuery(".brand-carousel").each(function (){
if($owl_carousel(this).attr('id')){
var brand_products=$owl_carousel(this).attr('id').replace('_brand_carousel','');
$owl_carousel('.brand-carousel').addClass('owl-carousel');
$owl_carousel(".brand-carousel").owlCarousel({
navigation:true,
pagination:false,
items:brand_products,
itemsDesktop:[1199,brand_products],
itemsDesktopSmall:[979,3],
itemsTablet: [768,2],
itemsMobile:[479,1]
});
}});
jQuery(".testimonial-carousel").each(function (){
if($owl_carousel(this).attr('id')){
var testimonial_items=$owl_carousel(this).attr('id').replace('_testimonial_carousel','');
$owl_carousel('.testimonial-carousel').addClass('owl-carousel');
$owl_carousel(".testimonial-carousel").owlCarousel({
navigation:false,
pagination:true,
items:testimonial_items,
itemsDesktop:[1199,testimonial_items],
itemsDesktopSmall:[979,3],
itemsTablet: [768,2],
itemsMobile:[479,1]
});
}});
var upsells_products=$owl_carousel(".upsells ul.products li").length;
if(upsells_products > 3){
$owl_carousel('.upsells ul.products').addClass('owl-carousel');
$owl_carousel(".upsells ul.products").owlCarousel({
navigation: true,
pagination: false,
items: 4,
itemsDesktop: [1199, 4],
itemsDesktopSmall: [979, 3],
itemsTablet: [768, 2],
itemsMobile: [479, 1]
});
}
var crosssells_products=$owl_carousel(".cross-sells ul.products li").length;
if(crosssells_products > 3){
$owl_carousel('.cross-sells ul.products').addClass('owl-carousel');
$owl_carousel(".cross-sells ul.products").owlCarousel({
navigation: true,
pagination: false,
items: 4,
itemsDesktop: [1199, 4],
itemsDesktopSmall: [979, 3],
itemsTablet: [768, 2],
itemsMobile: [479, 1]
});
}
var related_products=$owl_carousel(".related ul.products li").length;
if(related_products > 3){
$owl_carousel('.related ul.products').addClass('owl-carousel');
$owl_carousel(".related ul.products").owlCarousel({
navigation: true,
pagination: false,
items: 4,
itemsDesktop: [1199, 4],
itemsDesktopSmall: [979, 3],
itemsTablet: [768, 2],
itemsMobile: [479, 1]
});
}
jQuery(".team-carousel").each(function (){
if($owl_carousel(this).attr('id')){
var team_items=$owl_carousel(this).attr('id').replace('_team_carousel','');
$owl_carousel('.team-carousel').addClass('owl-carousel');
$owl_carousel(".team-carousel").owlCarousel({
navigation:false,
pagination:true,
items:team_items,
itemsDesktop:[1199,team_items],
itemsDesktopSmall:[979,3],
itemsTablet: [768,2],
itemsMobile:[479,1]
});
}});
if($owl_carousel(".woo-carousel").attr('id')){
var woo_items=$owl_carousel(".woo-carousel").attr('id').replace('_woo_carousel', '');
var woo_products=$owl_carousel(".woo-carousel ul.products .product").length;
if(woo_products > woo_items){
$owl_carousel('.woo-carousel ul.products').addClass('owl-carousel');
$owl_carousel(".woo-carousel ul.products").owlCarousel({
navigation: true,
pagination: false,
items: woo_items,
itemsDesktop: [1199, woo_items],
itemsDesktopSmall: [979, 3],
itemsTablet: [768, 2],
itemsMobile: [479, 1]
});
}}
});
jQuery(document).ready(function(){
$window=jQuery(window);
jQuery('div[data-type="background"]').each(function(){
var $bgobj=jQuery(this);
jQuery(window).scroll(function(){
var yPos=-($window.scrollTop() / $bgobj.data('speed'));
var coords='50% '+ yPos + 'px';
$bgobj.css({ backgroundPosition: coords });
});
});
});
document.createElement("div");
document.createElement("section");
function isotopAutoSet(){
var $fas2=jQuery.noConflict();
$fas2(function(){
var $container=$fas2('#container .masonry');
$fas2('#container .masonry').css("display", "block");
$fas2('#container .loading').css("display", "none");
$container.isotope({
});
});
var $fas=jQuery.noConflict();
$fas(function(){
var $container=$fas('#box_filter');
$fas('#container #box_filter').css("display", "block");
$fas('#container .loading').css("display", "none");
$container.isotope({
});
var $optionSets=$fas('#blog_filter_options .option-set'),
$optionLinks=$optionSets.find('a');
$optionLinks.click(function(){
var $this=$fas(this);
if($this.hasClass('selected')){
return false;
}
var $optionSet=$this.parents('.option-set');
$optionSet.find('.selected').removeClass('selected');
$this.addClass('selected');
var options={},
key=$optionSet.attr('data-option-key'),
value=$this.attr('data-option-value');
value=value==='false' ? false:value;
options[ key ]=value;
if(key==='layoutMode'&&typeof changeLayoutMode==='function'){
changeLayoutMode($this, options)
}else{
$container.isotope(options);
}
return false;
});
});
var $fas1=jQuery.noConflict();
$fas1(function(){
var $container1=$fas1('#portfolio_filter');
$fas('#portfolio_filter').css("display", "block");
$fas('.loading').css("display", "none");
$container1.isotope({
});
var $optionSets=$fas1('#portfolio_filter_options .option-set'),
$optionLinks=$optionSets.find('a');
$optionLinks.click(function(){
var $this=$fas1(this);
if($this.hasClass('selected')){
return false;
}
var $optionSet=$this.parents('.option-set');
$optionSet.find('.selected').removeClass('selected');
$this.addClass('selected');
var options={},
key=$optionSet.attr('data-option-key'),
value=$this.attr('data-option-value');
value=value==='false' ? false:value;
options[ key ]=value;
if(key==='layoutMode'&&typeof changeLayoutMode==='function'){
changeLayoutMode($this, options)
}else{
$container1.isotope(options);
}
return false;
});
});
}
jQuery(window).load(function(){isotopAutoSet();});
jQuery(window).resize(function(){isotopAutoSet();});
/*jQuery(document).ready(function(){
jQuery('input[type="radio"]').tmMark();
jQuery('select.orderby').customSelect();
});*/
jQuery(document).ready(function(){
jQuery(".cate-inner").click(function(){
jQuery(this).parent().toggleClass('active').parent().find('ul.product-categories').slideToggle('slow');
});
});
jQuery(document).ready(function(){
jQuery(".widget_product_categories .widget-title").click(function(){
jQuery(this).parent().toggleClass('active').parent().find('ul.product-categories').slideToggle('slow');
});
});
if(jQuery(window).width() > 1000){
jQuery(document).ready(function(){
jQuery(".widget_product_categories").addClass("active");
jQuery(this).addClass("active");
});
}
jQuery('.tagcloud').addClass('main-ul');
jQuery('#calendar_wrap').addClass('main-ul');
jQuery('.price_slider_wrapper').addClass('main-ul');
jQuery('#searchform').addClass('main-ul');
jQuery('.site-footer .single-post-wrapper').addClass('main-ul');
function mobileToggleColumn(){
if(jQuery(window).width() < 1000){
jQuery('#secondary .widget .main-ul ,.site-footer .widget .main-ul').css('display', 'none');
jQuery('.secondary-sidebar .widget ul, #secondary .widget ul, .site-footer .widget ul').css('display','none');
jQuery('#secondary .widget .widget-title .mobile_togglecolumn, .secondary-sidebar .widget .widget-title .mobile_togglecolumn, .site-footer .widget .widget-title .mobile_togglecolumn').removeClass('clearfix');
jQuery('#secondary .widget .widget-title .mobile_togglecolumn, .secondary-sidebar .widget .widget-title .mobile_togglecolumn, .site-footer .widget .widget-title .mobile_togglecolumn').remove();
jQuery('#secondary .widget .widget-title, .secondary-sidebar .widget .widget-title, .site-footer .widget .widget-title').append("<span class='mobile_togglecolumn'></span>");
jQuery('#secondary .widget .widget-title, .secondary-sidebar .widget .widget-title, .site-footer .widget .widget-title').addClass('toggle');
jQuery('#secondary .widget .widget-title .mobile_togglecolumn, .secondary-sidebar .widget .widget-title .mobile_togglecolumn, .site-footer .widget .widget-title .mobile_togglecolumn').click(function(){
jQuery(this).parent().toggleClass('active').parent().find('> ul,.main-ul').toggle('slow');
});
}else{
jQuery('#secondary .widget > .main-ul,.site-footer .widget .main-ul').css('display', 'block');
jQuery('#secondary .widget > ul, .secondary-sidebar .widget > ul, .site-footer .widget ul').css('display','block');
jQuery('#secondary .widget .widget-title .mobile_togglecolumn, .secondary-sidebar .widget .widget-title .mobile_togglecolumn, .site-footer .widget .widget-title .mobile_togglecolumn').css('display','none');
jQuery('#secondary .widget .widget-title, .secondary-sidebar .widget .widget-title, .site-footer .widget .widget-title').removeClass('toggle active');
jQuery('#secondary .widget .widget-title .mobile_togglecolumn, .secondary-sidebar .widget .widget-title .mobile_togglecolum, .site-footer .widget .widget-title .mobile_togglecolumnn').remove();
}}
jQuery(document).ready(function(){ mobileToggleColumn();});
jQuery(window).resize(function(){ mobileToggleColumn();});
function catmenu(){
if(jQuery(window).width() < 1000){
jQuery(document).ready(function(){
jQuery('.menu-category .product-categories').addClass('treeview-list');
jQuery(".menu-category .treeview-list").treeview({
animated: "slow",
collapsed: true,
unique: true
});
jQuery('.menu-category .treeview-list a.active').parent().removeClass('expandable');
jQuery('.menu-category .treeview-list a.active').parent().addClass('collapsable');
jQuery('.menu-category .treeview-list .collapsable ul').css('display','block');
});
}}
jQuery(document).ready(function (){catmenu();});
function leftmenu(){
if(jQuery(window).width() < 1000){
jQuery(document).ready(function(){
jQuery('#primary-sidebar .widget_product_categories .product-categories').addClass('treeview-list');
jQuery("#primary-sidebar .widget_product_categories .product-categories.treeview-list").treeview({
animated: "slow",
collapsed: true,
unique: true
});
jQuery('#primary-sidebar .widget_product_categories .product-categories .treeview-list a.active').parent().removeClass('expandable');
jQuery('#primary-sidebar .widget_product_categories .product-categories .treeview-list a.active').parent().addClass('collapsable');
jQuery('#primary-sidebar .widget_product_categories .product-categories .treeview-list .collapsable ul').css('display','block');
});
}}
jQuery(document).ready(function (){leftmenu();});
function navmenu(){
if(jQuery(window).width() < 1000){
jQuery('.mega-menu .mega').addClass('treeview');
jQuery(".treeview").treeview({
animated: "slow",
collapsed: true,
unique: true
});
}
else if(jQuery(window).width() >=1000){
jQuery('.mega-menu .mega').removeClass('treeview');
}}
jQuery(document).ready(function (){navmenu();});
function preloadFunc(){
jQuery(".cart_totals ").prependTo(".cart-collaterals");
}
jQuery(document).ready(function(){
"use strict";
preloadFunc()
});
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7(A 3c.3q!=="9"){3c.3q=9(e){9 t(){}t.5S=e;p 5R t}}(9(e,t,n){h r={1N:9(t,n){h r=c;r.$k=e(n);r.6=e.4M({},e.37.2B.6,r.$k.v(),t);r.2A=t;r.4L()},4L:9(){9 r(e){h n,r="";7(A t.6.33==="9"){t.6.33.R(c,[e])}l{1A(n 38 e.d){7(e.d.5M(n)){r+=e.d[n].1K}}t.$k.2y(r)}t.3t()}h t=c,n;7(A t.6.2H==="9"){t.6.2H.R(c,[t.$k])}7(A t.6.2O==="2Y"){n=t.6.2O;e.5K(n,r)}l{t.3t()}},3t:9(){h e=c;e.$k.v("d-4I",e.$k.2x("2w")).v("d-4F",e.$k.2x("H"));e.$k.z({2u:0});e.2t=e.6.q;e.4E();e.5v=0;e.1X=14;e.23()},23:9(){h e=c;7(e.$k.25().N===0){p b}e.1M();e.4C();e.$S=e.$k.25();e.E=e.$S.N;e.4B();e.$G=e.$k.17(".d-1K");e.$K=e.$k.17(".d-1p");e.3u="U";e.13=0;e.26=[0];e.m=0;e.4A();e.4z()},4z:9(){h e=c;e.2V();e.2W();e.4t();e.30();e.4r();e.4q();e.2p();e.4o();7(e.6.2o!==b){e.4n(e.6.2o)}7(e.6.O===j){e.6.O=4Q}e.19();e.$k.17(".d-1p").z("4i","4h");7(!e.$k.2m(":3n")){e.3o()}l{e.$k.z("2u",1)}e.5O=b;e.2l();7(A e.6.3s==="9"){e.6.3s.R(c,[e.$k])}},2l:9(){h e=c;7(e.6.1Z===j){e.1Z()}7(e.6.1B===j){e.1B()}e.4g();7(A e.6.3w==="9"){e.6.3w.R(c,[e.$k])}},3x:9(){h e=c;7(A e.6.3B==="9"){e.6.3B.R(c,[e.$k])}e.3o();e.2V();e.2W();e.4f();e.30();e.2l();7(A e.6.3D==="9"){e.6.3D.R(c,[e.$k])}},3F:9(){h e=c;t.1c(9(){e.3x()},0)},3o:9(){h e=c;7(e.$k.2m(":3n")===b){e.$k.z({2u:0});t.18(e.1C);t.18(e.1X)}l{p b}e.1X=t.4d(9(){7(e.$k.2m(":3n")){e.3F();e.$k.4b({2u:1},2M);t.18(e.1X)}},5x)},4B:9(){h e=c;e.$S.5n(\'<L H="d-1p">\').4a(\'<L H="d-1K"></L>\');e.$k.17(".d-1p").4a(\'<L H="d-1p-49">\');e.1H=e.$k.17(".d-1p-49");e.$k.z("4i","4h")},1M:9(){h e=c,t=e.$k.1I(e.6.1M),n=e.$k.1I(e.6.2i);7(!t){e.$k.I(e.6.1M)}7(!n){e.$k.I(e.6.2i)}},2V:9(){h t=c,n,r;7(t.6.2Z===b){p b}7(t.6.48===j){t.6.q=t.2t=1;t.6.1h=b;t.6.1s=b;t.6.1O=b;t.6.22=b;t.6.1Q=b;t.6.1R=b;p b}n=e(t.6.47).1f();7(n>(t.6.1s[0]||t.2t)){t.6.q=t.2t}7(t.6.1h!==b){t.6.1h.5g(9(e,t){p e[0]-t[0]});1A(r=0;r<t.6.1h.N;r+=1){7(t.6.1h[r][0]<=n){t.6.q=t.6.1h[r][1]}}}l{7(n<=t.6.1s[0]&&t.6.1s!==b){t.6.q=t.6.1s[1]}7(n<=t.6.1O[0]&&t.6.1O!==b){t.6.q=t.6.1O[1]}7(n<=t.6.22[0]&&t.6.22!==b){t.6.q=t.6.22[1]}7(n<=t.6.1Q[0]&&t.6.1Q!==b){t.6.q=t.6.1Q[1]}7(n<=t.6.1R[0]&&t.6.1R!==b){t.6.q=t.6.1R[1]}}7(t.6.q>t.E&&t.6.46===j){t.6.q=t.E}},4r:9(){h n=c,r,i;7(n.6.2Z!==j){p b}i=e(t).1f();n.3d=9(){7(e(t).1f()!==i){7(n.6.O!==b){t.18(n.1C)}t.5d(r);r=t.1c(9(){i=e(t).1f();n.3x()},n.6.45)}};e(t).44(n.3d)},4f:9(){h e=c;e.2g(e.m);7(e.6.O!==b){e.3j()}},43:9(){h t=c,n=0,r=t.E-t.6.q;t.$G.2f(9(i){h s=e(c);s.z({1f:t.M}).v("d-1K",3p(i));7(i%t.6.q===0||i===r){7(!(i>r)){n+=1}}s.v("d-24",n)})},42:9(){h e=c,t=e.$G.N*e.M;e.$K.z({1f:t*2,T:0});e.43()},2W:9(){h e=c;e.40();e.42();e.3Z();e.3v()},40:9(){h e=c;e.M=1F.4O(e.$k.1f()/e.6.q)},3v:9(){h e=c,t=(e.E*e.M-e.6.q*e.M)*-1;7(e.6.q>e.E){e.D=0;t=0;e.3z=0}l{e.D=e.E-e.6.q;e.3z=t}p t},3Y:9(){p 0},3Z:9(){h t=c,n=0,r=0,i,s,o;t.J=[0];t.3E=[];1A(i=0;i<t.E;i+=1){r+=t.M;t.J.2D(-r);7(t.6.12===j){s=e(t.$G[i]);o=s.v("d-24");7(o!==n){t.3E[n]=t.J[i];n=o}}}},4t:9(){h t=c;7(t.6.2a===j||t.6.1v===j){t.B=e(\'<L H="d-5A"/>\').5m("5l",!t.F.15).5c(t.$k)}7(t.6.1v===j){t.3T()}7(t.6.2a===j){t.3S()}},3S:9(){h t=c,n=e(\'<L H="d-4U"/>\');t.B.1o(n);t.1u=e("<L/>",{"H":"d-1n",2y:t.6.2U[0]||""});t.1q=e("<L/>",{"H":"d-U",2y:t.6.2U[1]||""});n.1o(t.1u).1o(t.1q);n.w("2X.B 21.B",\'L[H^="d"]\',9(e){e.1l()});n.w("2n.B 28.B",\'L[H^="d"]\',9(n){n.1l();7(e(c).1I("d-U")){t.U()}l{t.1n()}})},3T:9(){h t=c;t.1k=e(\'<L H="d-1v"/>\');t.B.1o(t.1k);t.1k.w("2n.B 28.B",".d-1j",9(n){n.1l();7(3p(e(c).v("d-1j"))!==t.m){t.1g(3p(e(c).v("d-1j")),j)}})},3P:9(){h t=c,n,r,i,s,o,u;7(t.6.1v===b){p b}t.1k.2y("");n=0;r=t.E-t.E%t.6.q;1A(s=0;s<t.E;s+=1){7(s%t.6.q===0){n+=1;7(r===s){i=t.E-t.6.q}o=e("<L/>",{"H":"d-1j"});u=e("<3N></3N>",{4R:t.6.39===j?n:"","H":t.6.39===j?"d-59":""});o.1o(u);o.v("d-1j",r===s?i:s);o.v("d-24",n);t.1k.1o(o)}}t.35()},35:9(){h t=c;7(t.6.1v===b){p b}t.1k.17(".d-1j").2f(9(){7(e(c).v("d-24")===e(t.$G[t.m]).v("d-24")){t.1k.17(".d-1j").Z("2d");e(c).I("2d")}})},3e:9(){h e=c;7(e.6.2a===b){p b}7(e.6.2e===b){7(e.m===0&&e.D===0){e.1u.I("1b");e.1q.I("1b")}l 7(e.m===0&&e.D!==0){e.1u.I("1b");e.1q.Z("1b")}l 7(e.m===e.D){e.1u.Z("1b");e.1q.I("1b")}l 7(e.m!==0&&e.m!==e.D){e.1u.Z("1b");e.1q.Z("1b")}}},30:9(){h e=c;e.3P();e.3e();7(e.B){7(e.6.q>=e.E){e.B.3K()}l{e.B.3J()}}},55:9(){h e=c;7(e.B){e.B.3k()}},U:9(e){h t=c;7(t.1E){p b}t.m+=t.6.12===j?t.6.q:1;7(t.m>t.D+(t.6.12===j?t.6.q-1:0)){7(t.6.2e===j){t.m=0;e="2k"}l{t.m=t.D;p b}}t.1g(t.m,e)},1n:9(e){h t=c;7(t.1E){p b}7(t.6.12===j&&t.m>0&&t.m<t.6.q){t.m=0}l{t.m-=t.6.12===j?t.6.q:1}7(t.m<0){7(t.6.2e===j){t.m=t.D;e="2k"}l{t.m=0;p b}}t.1g(t.m,e)},1g:9(e,n,r){h i=c,s;7(i.1E){p b}7(A i.6.1Y==="9"){i.6.1Y.R(c,[i.$k])}7(e>=i.D){e=i.D}l 7(e<=0){e=0}i.m=i.d.m=e;7(i.6.2o!==b&&r!=="4e"&&i.6.q===1&&i.F.1x===j){i.1t(0);7(i.F.1x===j){i.1L(i.J[e])}l{i.1r(i.J[e],1)}i.2r();i.4l();p b}s=i.J[e];7(i.F.1x===j){i.1T=b;7(n===j){i.1t("1w");t.1c(9(){i.1T=j},i.6.1w)}l 7(n==="2k"){i.1t(i.6.2v);t.1c(9(){i.1T=j},i.6.2v)}l{i.1t("1m");t.1c(9(){i.1T=j},i.6.1m)}i.1L(s)}l{7(n===j){i.1r(s,i.6.1w)}l 7(n==="2k"){i.1r(s,i.6.2v)}l{i.1r(s,i.6.1m)}}i.2r()},2g:9(e){h t=c;7(A t.6.1Y==="9"){t.6.1Y.R(c,[t.$k])}7(e>=t.D||e===-1){e=t.D}l 7(e<=0){e=0}t.1t(0);7(t.F.1x===j){t.1L(t.J[e])}l{t.1r(t.J[e],1)}t.m=t.d.m=e;t.2r()},2r:9(){h e=c;e.26.2D(e.m);e.13=e.d.13=e.26[e.26.N-2];e.26.5f(0);7(e.13!==e.m){e.35();e.3e();e.2l();7(e.6.O!==b){e.3j()}}7(A e.6.3y==="9"&&e.13!==e.m){e.6.3y.R(c,[e.$k])}},X:9(){h e=c;e.3A="X";t.18(e.1C)},3j:9(){h e=c;7(e.3A!=="X"){e.19()}},19:9(){h e=c;e.3A="19";7(e.6.O===b){p b}t.18(e.1C);e.1C=t.4d(9(){e.U(j)},e.6.O)},1t:9(e){h t=c;7(e==="1m"){t.$K.z(t.2z(t.6.1m))}l 7(e==="1w"){t.$K.z(t.2z(t.6.1w))}l 7(A e!=="2Y"){t.$K.z(t.2z(e))}},2z:9(e){p{"-1G-1a":"2C "+e+"1z 2s","-1W-1a":"2C "+e+"1z 2s","-o-1a":"2C "+e+"1z 2s",1a:"2C "+e+"1z 2s"}},3H:9(){p{"-1G-1a":"","-1W-1a":"","-o-1a":"",1a:""}},3I:9(e){p{"-1G-P":"1i("+e+"V, C, C)","-1W-P":"1i("+e+"V, C, C)","-o-P":"1i("+e+"V, C, C)","-1z-P":"1i("+e+"V, C, C)",P:"1i("+e+"V, C,C)"}},1L:9(e){h t=c;t.$K.z(t.3I(e))},3L:9(e){h t=c;t.$K.z({T:e})},1r:9(e,t){h n=c;n.29=b;n.$K.X(j,j).4b({T:e},{54:t||n.6.1m,3M:9(){n.29=j}})},4E:9(){h e=c,r="1i(C, C, C)",i=n.56("L"),s,o,u,a;i.2w.3O="  -1W-P:"+r+"; -1z-P:"+r+"; -o-P:"+r+"; -1G-P:"+r+"; P:"+r;s=/1i\\(C, C, C\\)/g;o=i.2w.3O.5i(s);u=o!==14&&o.N===1;a="5z"38 t||t.5Q.4P;e.F={1x:u,15:a}},4q:9(){h e=c;7(e.6.27!==b||e.6.1U!==b){e.3Q();e.3R()}},4C:9(){h e=c,t=["s","e","x"];e.16={};7(e.6.27===j&&e.6.1U===j){t=["2X.d 21.d","2N.d 3U.d","2n.d 3V.d 28.d"]}l 7(e.6.27===b&&e.6.1U===j){t=["2X.d","2N.d","2n.d 3V.d"]}l 7(e.6.27===j&&e.6.1U===b){t=["21.d","3U.d","28.d"]}e.16.3W=t[0];e.16.2K=t[1];e.16.2J=t[2]},3R:9(){h t=c;t.$k.w("5y.d",9(e){e.1l()});t.$k.w("21.3X",9(t){p e(t.1d).2m("5C, 5E, 5F, 5N")})},3Q:9(){9 s(e){7(e.2b!==W){p{x:e.2b[0].2c,y:e.2b[0].41}}7(e.2b===W){7(e.2c!==W){p{x:e.2c,y:e.41}}7(e.2c===W){p{x:e.52,y:e.53}}}}9 o(t){7(t==="w"){e(n).w(r.16.2K,a);e(n).w(r.16.2J,f)}l 7(t==="Q"){e(n).Q(r.16.2K);e(n).Q(r.16.2J)}}9 u(n){h u=n.3h||n||t.3g,a;7(u.5a===3){p b}7(r.E<=r.6.q){p}7(r.29===b&&!r.6.3f){p b}7(r.1T===b&&!r.6.3f){p b}7(r.6.O!==b){t.18(r.1C)}7(r.F.15!==j&&!r.$K.1I("3b")){r.$K.I("3b")}r.11=0;r.Y=0;e(c).z(r.3H());a=e(c).2h();i.2S=a.T;i.2R=s(u).x-a.T;i.2P=s(u).y-a.5o;o("w");i.2j=b;i.2L=u.1d||u.4c}9 a(o){h u=o.3h||o||t.3g,a,f;r.11=s(u).x-i.2R;r.2I=s(u).y-i.2P;r.Y=r.11-i.2S;7(A r.6.2E==="9"&&i.3C!==j&&r.Y!==0){i.3C=j;r.6.2E.R(r,[r.$k])}7((r.Y>8||r.Y<-8)&&r.F.15===j){7(u.1l!==W){u.1l()}l{u.5L=b}i.2j=j}7((r.2I>10||r.2I<-10)&&i.2j===b){e(n).Q("2N.d")}a=9(){p r.Y/5};f=9(){p r.3z+r.Y/5};r.11=1F.3v(1F.3Y(r.11,a()),f());7(r.F.1x===j){r.1L(r.11)}l{r.3L(r.11)}}9 f(n){h s=n.3h||n||t.3g,u,a,f;s.1d=s.1d||s.4c;i.3C=b;7(r.F.15!==j){r.$K.Z("3b")}7(r.Y<0){r.1y=r.d.1y="T"}l{r.1y=r.d.1y="3i"}7(r.Y!==0){u=r.4j();r.1g(u,b,"4e");7(i.2L===s.1d&&r.F.15!==j){e(s.1d).w("3a.4k",9(t){t.4S();t.4T();t.1l();e(t.1d).Q("3a.4k")});a=e.4N(s.1d,"4V").3a;f=a.4W();a.4X(0,0,f)}}o("Q")}h r=c,i={2R:0,2P:0,4Y:0,2S:0,2h:14,4Z:14,50:14,2j:14,51:14,2L:14};r.29=j;r.$k.w(r.16.3W,".d-1p",u)},4j:9(){h e=c,t=e.4m();7(t>e.D){e.m=e.D;t=e.D}l 7(e.11>=0){t=0;e.m=0}p t},4m:9(){h t=c,n=t.6.12===j?t.3E:t.J,r=t.11,i=14;e.2f(n,9(s,o){7(r-t.M/20>n[s+1]&&r-t.M/20<o&&t.34()==="T"){i=o;7(t.6.12===j){t.m=e.4p(i,t.J)}l{t.m=s}}l 7(r+t.M/20<o&&r+t.M/20>(n[s+1]||n[s]-t.M)&&t.34()==="3i"){7(t.6.12===j){i=n[s+1]||n[n.N-1];t.m=e.4p(i,t.J)}l{i=n[s+1];t.m=s+1}}});p t.m},34:9(){h e=c,t;7(e.Y<0){t="3i";e.3u="U"}l{t="T";e.3u="1n"}p t},4A:9(){h e=c;e.$k.w("d.U",9(){e.U()});e.$k.w("d.1n",9(){e.1n()});e.$k.w("d.19",9(t,n){e.6.O=n;e.19();e.32="19"});e.$k.w("d.X",9(){e.X();e.32="X"});e.$k.w("d.1g",9(t,n){e.1g(n)});e.$k.w("d.2g",9(t,n){e.2g(n)})},2p:9(){h e=c;7(e.6.2p===j&&e.F.15!==j&&e.6.O!==b){e.$k.w("57",9(){e.X()});e.$k.w("58",9(){7(e.32!=="X"){e.19()}})}},1Z:9(){h t=c,n,r,i,s,o;7(t.6.1Z===b){p b}1A(n=0;n<t.E;n+=1){r=e(t.$G[n]);7(r.v("d-1e")==="1e"){4s}i=r.v("d-1K");s=r.17(".5b");7(A s.v("1J")!=="2Y"){r.v("d-1e","1e");4s}7(r.v("d-1e")===W){s.3K();r.I("4u").v("d-1e","5e")}7(t.6.4v===j){o=i>=t.m}l{o=j}7(o&&i<t.m+t.6.q&&s.N){t.4w(r,s)}}},4w:9(e,n){9 o(){e.v("d-1e","1e").Z("4u");n.5h("v-1J");7(r.6.4x==="4y"){n.5j(5k)}l{n.3J()}7(A r.6.2T==="9"){r.6.2T.R(c,[r.$k])}}9 u(){i+=1;7(r.2Q(n.3l(0))||s===j){o()}l 7(i<=2q){t.1c(u,2q)}l{o()}}h r=c,i=0,s;7(n.5p("5q")==="5r"){n.z("5s-5t","5u("+n.v("1J")+")");s=j}l{n[0].1J=n.v("1J")}u()},1B:9(){9 s(){h r=e(n.$G[n.m]).2G();n.1H.z("2G",r+"V");7(!n.1H.1I("1B")){t.1c(9(){n.1H.I("1B")},0)}}9 o(){i+=1;7(n.2Q(r.3l(0))){s()}l 7(i<=2q){t.1c(o,2q)}l{n.1H.z("2G","")}}h n=c,r=e(n.$G[n.m]).17("5w"),i;7(r.3l(0)!==W){i=0;o()}l{s()}},2Q:9(e){h t;7(!e.3M){p b}t=A e.4D;7(t!=="W"&&e.4D===0){p b}p j},4g:9(){h t=c,n;7(t.6.2F===j){t.$G.Z("2d")}t.1D=[];1A(n=t.m;n<t.m+t.6.q;n+=1){t.1D.2D(n);7(t.6.2F===j){e(t.$G[n]).I("2d")}}t.d.1D=t.1D},4n:9(e){h t=c;t.4G="d-"+e+"-5B";t.4H="d-"+e+"-38"},4l:9(){9 a(e){p{2h:"5D",T:e+"V"}}h e=c,t=e.4G,n=e.4H,r=e.$G.1S(e.m),i=e.$G.1S(e.13),s=1F.4J(e.J[e.m])+e.J[e.13],o=1F.4J(e.J[e.m])+e.M/2,u="5G 5H 5I 5J";e.1E=j;e.$K.I("d-1P").z({"-1G-P-1P":o+"V","-1W-4K-1P":o+"V","4K-1P":o+"V"});i.z(a(s,10)).I(t).w(u,9(){e.3m=j;i.Q(u);e.31(i,t)});r.I(n).w(u,9(){e.36=j;r.Q(u);e.31(r,n)})},31:9(e,t){h n=c;e.z({2h:"",T:""}).Z(t);7(n.3m&&n.36){n.$K.Z("d-1P");n.3m=b;n.36=b;n.1E=b}},4o:9(){h e=c;e.d={2A:e.2A,5P:e.$k,S:e.$S,G:e.$G,m:e.m,13:e.13,1D:e.1D,15:e.F.15,F:e.F,1y:e.1y}},3G:9(){h r=c;r.$k.Q(".d d 21.3X");e(n).Q(".d d");e(t).Q("44",r.3d)},1V:9(){h e=c;7(e.$k.25().N!==0){e.$K.3r();e.$S.3r().3r();7(e.B){e.B.3k()}}e.3G();e.$k.2x("2w",e.$k.v("d-4I")||"").2x("H",e.$k.v("d-4F"))},5T:9(){h e=c;e.X();t.18(e.1X);e.1V();e.$k.5U()},5V:9(t){h n=c,r=e.4M({},n.2A,t);n.1V();n.1N(r,n.$k)},5W:9(e,t){h n=c,r;7(!e){p b}7(n.$k.25().N===0){n.$k.1o(e);n.23();p b}n.1V();7(t===W||t===-1){r=-1}l{r=t}7(r>=n.$S.N||r===-1){n.$S.1S(-1).5X(e)}l{n.$S.1S(r).5Y(e)}n.23()},5Z:9(e){h t=c,n;7(t.$k.25().N===0){p b}7(e===W||e===-1){n=-1}l{n=e}t.1V();t.$S.1S(n).3k();t.23()}};e.37.2B=9(t){p c.2f(9(){7(e(c).v("d-1N")===j){p b}e(c).v("d-1N",j);h n=3c.3q(r);n.1N(t,c);e.v(c,"2B",n)})};e.37.2B.6={q:5,1h:b,1s:[60,4],1O:[61,3],22:[62,2],1Q:b,1R:[63,1],48:b,46:b,1m:2M,1w:64,2v:65,O:b,2p:b,2a:b,2U:["1n","U"],2e:j,12:b,1v:j,39:b,2Z:j,45:2M,47:t,1M:"d-66",2i:"d-2i",1Z:b,4v:j,4x:"4y",1B:b,2O:b,33:b,3f:j,27:j,1U:j,2F:b,2o:b,3B:b,3D:b,2H:b,3s:b,1Y:b,3y:b,3w:b,2E:b,2T:b}})(67,68,69)',62,382,'||||||options|if||function||false|this|owl||||var||true|elem|else|currentItem|||return|items|||||data|on|||css|typeof|owlControls|0px|maximumItem|itemsAmount|browser|owlItems|class|addClass|positionsInArray|owlWrapper|div|itemWidth|length|autoPlay|transform|off|apply|userItems|left|next|px|undefined|stop|newRelativeX|removeClass||newPosX|scrollPerPage|prevItem|null|isTouch|ev_types|find|clearInterval|play|transition|disabled|setTimeout|target|loaded|width|goTo|itemsCustom|translate3d|page|paginationWrapper|preventDefault|slideSpeed|prev|append|wrapper|buttonNext|css2slide|itemsDesktop|swapSpeed|buttonPrev|pagination|paginationSpeed|support3d|dragDirection|ms|for|autoHeight|autoPlayInterval|visibleItems|isTransition|Math|webkit|wrapperOuter|hasClass|src|item|transition3d|baseClass|init|itemsDesktopSmall|origin|itemsTabletSmall|itemsMobile|eq|isCss3Finish|touchDrag|unWrap|moz|checkVisible|beforeMove|lazyLoad||mousedown|itemsTablet|setVars|roundPages|children|prevArr|mouseDrag|mouseup|isCssFinish|navigation|touches|pageX|active|rewindNav|each|jumpTo|position|theme|sliding|rewind|eachMoveUpdate|is|touchend|transitionStyle|stopOnHover|100|afterGo|ease|orignalItems|opacity|rewindSpeed|style|attr|html|addCssSpeed|userOptions|owlCarousel|all|push|startDragging|addClassActive|height|beforeInit|newPosY|end|move|targetElement|200|touchmove|jsonPath|offsetY|completeImg|offsetX|relativePos|afterLazyLoad|navigationText|updateItems|calculateAll|touchstart|string|responsive|updateControls|clearTransStyle|hoverStatus|jsonSuccess|moveDirection|checkPagination|endCurrent|fn|in|paginationNumbers|click|grabbing|Object|resizer|checkNavigation|dragBeforeAnimFinish|event|originalEvent|right|checkAp|remove|get|endPrev|visible|watchVisibility|Number|create|unwrap|afterInit|logIn|playDirection|max|afterAction|updateVars|afterMove|maximumPixels|apStatus|beforeUpdate|dragging|afterUpdate|pagesInArray|reload|clearEvents|removeTransition|doTranslate|show|hide|css2move|complete|span|cssText|updatePagination|gestures|disabledEvents|buildButtons|buildPagination|mousemove|touchcancel|start|disableTextSelect|min|loops|calculateWidth|pageY|appendWrapperSizes|appendItemsSizes|resize|responsiveRefreshRate|itemsScaleUp|responsiveBaseWidth|singleItem|outer|wrap|animate|srcElement|setInterval|drag|updatePosition|onVisibleItems|block|display|getNewPosition|disable|singleItemTransition|closestItem|transitionTypes|owlStatus|inArray|moveEvents|response|continue|buildControls|loading|lazyFollow|lazyPreload|lazyEffect|fade|onStartup|customEvents|wrapItems|eventTypes|naturalWidth|checkBrowser|originalClasses|outClass|inClass|originalStyles|abs|perspective|loadContent|extend|_data|round|msMaxTouchPoints|5e3|text|stopImmediatePropagation|stopPropagation|buttons|events|pop|splice|baseElWidth|minSwipe|maxSwipe|dargging|clientX|clientY|duration|destroyControls|createElement|mouseover|mouseout|numbers|which|lazyOwl|appendTo|clearTimeout|checked|shift|sort|removeAttr|match|fadeIn|400|clickable|toggleClass|wrapAll|top|prop|tagName|DIV|background|image|url|wrapperWidth|img|500|dragstart|ontouchstart|controls|out|input|relative|textarea|select|webkitAnimationEnd|oAnimationEnd|MSAnimationEnd|animationend|getJSON|returnValue|hasOwnProperty|option|onstartup|baseElement|navigator|new|prototype|destroy|removeData|reinit|addItem|after|before|removeItem|1199|979|768|479|800|1e3|carousel|jQuery|window|document'.split('|'),0,{}));
var FORMALIZE=function(e,t,n,r){function i(e){var t=n.createElement("b");return t.innerHTML="<!--[if IE "+e+"]><br><![endif]-->",!!t.getElementsByTagName("br").length}var s="placeholder"in n.createElement("input"),o="autofocus"in n.createElement("input"),u=i(6),a=i(7);return{go:function(){var e,t=this.init;for(e in t)t.hasOwnProperty(e)&&t[e]()},init:{disable_link_button:function(){e(n.documentElement).on("click","a.button_disabled",function(){return!1})},full_input_size:function(){if(!a||!e("textarea, input.input_full").length)return;e("textarea, input.input_full").wrap('<span class="input_full_wrap"></span>')},ie6_skin_inputs:function(){if(!u||!e("input, select, textarea").length)return;var t=/button|submit|reset/,n=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;e("input").each(function(){var r=e(this);this.getAttribute("type").match(t)?(r.addClass("ie6_button"),this.disabled&&r.addClass("ie6_button_disabled")):this.getAttribute("type").match(n)&&(r.addClass("ie6_input"),this.disabled&&r.addClass("ie6_input_disabled"))}),e("textarea, select").each(function(){this.disabled&&e(this).addClass("ie6_input_disabled")})},autofocus:function(){if(o||!e(":input[autofocus]").length)return;var t=e("[autofocus]")[0];t.disabled||t.focus()},placeholder:function(){if(s||!e(":input[placeholder]").length)return;FORMALIZE.misc.add_placeholder(),e(":input[placeholder]").each(function(){if(this.type==="password")return;var t=e(this),n=t.attr("placeholder");t.focus(function(){t.val()===n&&t.val("").removeClass("placeholder_text")}).blur(function(){FORMALIZE.misc.add_placeholder()}),t.closest("form").submit(function(){t.val()===n&&t.val("").removeClass("placeholder_text")}).on("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})})}},misc:{add_placeholder:function(){if(s||!e(":input[placeholder]").length)return;e(":input[placeholder]").each(function(){if(this.type==="password")return;var t=e(this),n=t.attr("placeholder");(!t.val()||t.val()===n)&&t.val(n).addClass("placeholder_text")})}}}}(jQuery,this,this.document);jQuery(document).ready(function(){FORMALIZE.go()});
window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document);
(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this);
(function($){
$.extend($.fn, {
validate: function(options){
if(!this.length){
if(options&&options.debug&&window.console){
console.warn("Nothing selected, can't validate, returning nothing.");
}
return;
}
var validator=$.data(this[0], "validator");
if(validator){
return validator;
}
this.attr("novalidate", "novalidate");
validator=new $.validator(options, this[0]);
$.data(this[0], "validator", validator);
if(validator.settings.onsubmit){
this.validateDelegate(":submit", "click", function(event){
if(validator.settings.submitHandler){
validator.submitButton=event.target;
}
if($(event.target).hasClass("cancel")){
validator.cancelSubmit=true;
}});
this.submit(function(event){
if(validator.settings.debug){
event.preventDefault();
}
function handle(){
var hidden;
if(validator.settings.submitHandler){
if(validator.submitButton){
hidden=$("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);
}
validator.settings.submitHandler.call(validator, validator.currentForm, event);
if(validator.submitButton){
hidden.remove();
}
return false;
}
return true;
}
if(validator.cancelSubmit){
validator.cancelSubmit=false;
return handle();
}
if(validator.form()){
if(validator.pendingRequest){
validator.formSubmitted=true;
return false;
}
return handle();
}else{
validator.focusInvalid();
return false;
}});
}
return validator;
},
valid: function(){
if($(this[0]).is("form")){
return this.validate().form();
}else{
var valid=true;
var validator=$(this[0].form).validate();
this.each(function(){
valid &=validator.element(this);
});
return valid;
}},
removeAttrs: function(attributes){
var result={},
$element=this;
$.each(attributes.split(/\s/), function(index, value){
result[value]=$element.attr(value);
$element.removeAttr(value);
});
return result;
},
rules: function(command, argument){
var element=this[0];
if(command){
var settings=$.data(element.form, "validator").settings;
var staticRules=settings.rules;
var existingRules=$.validator.staticRules(element);
switch(command){
case "add":
$.extend(existingRules, $.validator.normalizeRule(argument));
staticRules[element.name]=existingRules;
if(argument.messages){
settings.messages[element.name]=$.extend(settings.messages[element.name], argument.messages);
}
break;
case "remove":
if(!argument){
delete staticRules[element.name];
return existingRules;
}
var filtered={};
$.each(argument.split(/\s/), function(index, method){
filtered[method]=existingRules[method];
delete existingRules[method];
});
return filtered;
}}
var data=$.validator.normalizeRules($.extend({},
$.validator.classRules(element),
$.validator.attributeRules(element),
$.validator.dataRules(element),
$.validator.staticRules(element)
), element);
if(data.required){
var param=data.required;
delete data.required;
data=$.extend({required: param}, data);
}
return data;
}});
$.extend($.expr[":"], {
blank: function(a){ return !$.trim("" + a.value); },
filled: function(a){ return !!$.trim("" + a.value); },
unchecked: function(a){ return !a.checked; }});
$.validator=function(options, form){
this.settings=$.extend(true, {}, $.validator.defaults, options);
this.currentForm=form;
this.init();
};
$.validator.format=function(source, params){
if(arguments.length===1){
return function(){
var args=$.makeArray(arguments);
args.unshift(source);
return $.validator.format.apply(this, args);
};}
if(arguments.length > 2&&params.constructor!==Array){
params=$.makeArray(arguments).slice(1);
}
if(params.constructor!==Array){
params=[ params ];
}
$.each(params, function(i, n){
source=source.replace(new RegExp("\\{" + i + "\\}", "g"), function(){
return n;
});
});
return source;
};
$.extend($.validator, {
defaults: {
messages: {},
groups: {},
rules: {},
errorClass: "error",
validClass: "valid",
errorElement: "label",
focusInvalid: true,
errorContainer: $([]),
errorLabelContainer: $([]),
onsubmit: true,
ignore: ":hidden",
ignoreTitle: false,
onfocusin: function(element, event){
this.lastActive=element;
if(this.settings.focusCleanup&&!this.blockFocusCleanup){
if(this.settings.unhighlight){
this.settings.unhighlight.call(this, element, this.settings.errorClass, this.settings.validClass);
}
this.addWrapper(this.errorsFor(element)).hide();
}},
onfocusout: function(element, event){
if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){
this.element(element);
}},
onkeyup: function(element, event){
if(event.which===9&&this.elementValue(element)===""){
return;
}else if(element.name in this.submitted||element===this.lastElement){
this.element(element);
}},
onclick: function(element, event){
if(element.name in this.submitted){
this.element(element);
}
else if(element.parentNode.name in this.submitted){
this.element(element.parentNode);
}},
highlight: function(element, errorClass, validClass){
if(element.type==="radio"){
this.findByName(element.name).addClass(errorClass).removeClass(validClass);
}else{
$(element).addClass(errorClass).removeClass(validClass);
}},
unhighlight: function(element, errorClass, validClass){
if(element.type==="radio"){
this.findByName(element.name).removeClass(errorClass).addClass(validClass);
}else{
$(element).removeClass(errorClass).addClass(validClass);
}}
},
setDefaults: function(settings){
$.extend($.validator.defaults, settings);
},
messages: {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format("Please enter no more than {0} characters."),
minlength: $.validator.format("Please enter at least {0} characters."),
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
range: $.validator.format("Please enter a value between {0} and {1}."),
max: $.validator.format("Please enter a value less than or equal to {0}."),
min: $.validator.format("Please enter a value greater than or equal to {0}.")
},
autoCreateRanges: false,
prototype: {
init: function(){
this.labelContainer=$(this.settings.errorLabelContainer);
this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);
this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);
this.submitted={};
this.valueCache={};
this.pendingRequest=0;
this.pending={};
this.invalid={};
this.reset();
var groups=(this.groups={});
$.each(this.settings.groups, function(key, value){
if(typeof value==="string"){
value=value.split(/\s/);
}
$.each(value, function(index, name){
groups[name]=key;
});
});
var rules=this.settings.rules;
$.each(rules, function(key, value){
rules[key]=$.validator.normalizeRule(value);
});
function delegate(event){
var validator=$.data(this[0].form, "validator"),
eventType="on" + event.type.replace(/^validate/, "");
if(validator.settings[eventType]){
validator.settings[eventType].call(validator, this[0], event);
}}
$(this.currentForm)
.validateDelegate(":text, [type='password'], [type='file'], select, textarea, " +
"[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
"[type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], " +
"[type='range'], [type='color'] ",
"focusin focusout keyup", delegate)
.validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
if(this.settings.invalidHandler){
$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
}},
form: function(){
this.checkForm();
$.extend(this.submitted, this.errorMap);
this.invalid=$.extend({}, this.errorMap);
if(!this.valid()){
$(this.currentForm).triggerHandler("invalid-form", [this]);
}
this.showErrors();
return this.valid();
},
checkForm: function(){
this.prepareForm();
for(var i=0, elements=(this.currentElements=this.elements()); elements[i]; i++){
this.check(elements[i]);
}
return this.valid();
},
element: function(element){
element=this.validationTargetFor(this.clean(element));
this.lastElement=element;
this.prepareElement(element);
this.currentElements=$(element);
var result=this.check(element)!==false;
if(result){
delete this.invalid[element.name];
}else{
this.invalid[element.name]=true;
}
if(!this.numberOfInvalids()){
this.toHide=this.toHide.add(this.containers);
}
this.showErrors();
return result;
},
showErrors: function(errors){
if(errors){
$.extend(this.errorMap, errors);
this.errorList=[];
for(var name in errors){
this.errorList.push({
message: errors[name],
element: this.findByName(name)[0]
});
}
this.successList=$.grep(this.successList, function(element){
return !(element.name in errors);
});
}
if(this.settings.showErrors){
this.settings.showErrors.call(this, this.errorMap, this.errorList);
}else{
this.defaultShowErrors();
}},
resetForm: function(){
if($.fn.resetForm){
$(this.currentForm).resetForm();
}
this.submitted={};
this.lastElement=null;
this.prepareForm();
this.hideErrors();
this.elements().removeClass(this.settings.errorClass).removeData("previousValue");
},
numberOfInvalids: function(){
return this.objectLength(this.invalid);
},
objectLength: function(obj){
var count=0;
for(var i in obj){
count++;
}
return count;
},
hideErrors: function(){
this.addWrapper(this.toHide).hide();
},
valid: function(){
return this.size()===0;
},
size: function(){
return this.errorList.length;
},
focusInvalid: function(){
if(this.settings.focusInvalid){
try {
$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[])
.filter(":visible")
.focus()
.trigger("focusin");
} catch(e){
}}
},
findLastActive: function(){
var lastActive=this.lastActive;
return lastActive&&$.grep(this.errorList, function(n){
return n.element.name===lastActive.name;
}).length===1&&lastActive;
},
elements: function(){
var validator=this,
rulesCache={};
return $(this.currentForm)
.find("input, select, textarea")
.not(":submit, :reset, :image, [disabled]")
.not(this.settings.ignore)
.filter(function(){
if(!this.name){
if(window.console){
console.error("%o has no name assigned", this);
}
throw new Error("Failed to validate, found an element with no name assigned. See console for element reference.");
}
if(this.name in rulesCache||!validator.objectLength($(this).rules())){
return false;
}
rulesCache[this.name]=true;
return true;
});
},
clean: function(selector){
return $(selector)[0];
},
errors: function(){
var errorClass=this.settings.errorClass.replace(" ", ".");
return $(this.settings.errorElement + "." + errorClass, this.errorContext);
},
reset: function(){
this.successList=[];
this.errorList=[];
this.errorMap={};
this.toShow=$([]);
this.toHide=$([]);
this.currentElements=$([]);
},
prepareForm: function(){
this.reset();
this.toHide=this.errors().add(this.containers);
},
prepareElement: function(element){
this.reset();
this.toHide=this.errorsFor(element);
},
elementValue: function(element){
var type=$(element).attr("type"),
val=$(element).val();
if(type==="radio"||type==="checkbox"){
return $("input[name='" + $(element).attr("name") + "']:checked").val();
}
if(typeof val==="string"){
return val.replace(/\r/g, "");
}
return val;
},
check: function(element){
element=this.validationTargetFor(this.clean(element));
var rules=$(element).rules();
var dependencyMismatch=false;
var val=this.elementValue(element);
var result;
for (var method in rules){
var rule={ method: method, parameters: rules[method] };
try {
result=$.validator.methods[method].call(this, val, element, rule.parameters);
if(result==="dependency-mismatch"){
dependencyMismatch=true;
continue;
}
dependencyMismatch=false;
if(result==="pending"){
this.toHide=this.toHide.not(this.errorsFor(element));
return;
}
if(!result){
this.formatAndAdd(element, rule);
return false;
}} catch(e){
if(this.settings.debug&&window.console){
console.log("Exception occured when checking element " + element.id + ", check the '" + rule.method + "' method.", e);
}
throw e;
}}
if(dependencyMismatch){
return;
}
if(this.objectLength(rules)){
this.successList.push(element);
}
return true;
},
customDataMessage: function(element, method){
return $(element).data("msg-" + method.toLowerCase())||(element.attributes&&$(element).attr("data-msg-" + method.toLowerCase()));
},
customMessage: function(name, method){
var m=this.settings.messages[name];
return m&&(m.constructor===String ? m:m[method]);
},
findDefined: function(){
for(var i=0; i < arguments.length; i++){
if(arguments[i]!==undefined){
return arguments[i];
}}
return undefined;
},
defaultMessage: function(element, method){
return this.findDefined(this.customMessage(element.name, method),
this.customDataMessage(element, method),
!this.settings.ignoreTitle&&element.title||undefined,
$.validator.messages[method],
"<strong>Warning: No message defined for " + element.name + "</strong>"
);
},
formatAndAdd: function(element, rule){
var message=this.defaultMessage(element, rule.method),
theregex=/\$?\{(\d+)\}/g;
if(typeof message==="function"){
message=message.call(this, rule.parameters, element);
}else if(theregex.test(message)){
message=$.validator.format(message.replace(theregex, "{$1}"), rule.parameters);
}
this.errorList.push({
message: message,
element: element
});
this.errorMap[element.name]=message;
this.submitted[element.name]=message;
},
addWrapper: function(toToggle){
if(this.settings.wrapper){
toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));
}
return toToggle;
},
defaultShowErrors: function(){
var i, elements;
for(i=0; this.errorList[i]; i++){
var error=this.errorList[i];
if(this.settings.highlight){
this.settings.highlight.call(this, error.element, this.settings.errorClass, this.settings.validClass);
}
this.showLabel(error.element, error.message);
}
if(this.errorList.length){
this.toShow=this.toShow.add(this.containers);
}
if(this.settings.success){
for(i=0; this.successList[i]; i++){
this.showLabel(this.successList[i]);
}}
if(this.settings.unhighlight){
for(i=0, elements=this.validElements(); elements[i]; i++){
this.settings.unhighlight.call(this, elements[i], this.settings.errorClass, this.settings.validClass);
}}
this.toHide=this.toHide.not(this.toShow);
this.hideErrors();
this.addWrapper(this.toShow).show();
},
validElements: function(){
return this.currentElements.not(this.invalidElements());
},
invalidElements: function(){
return $(this.errorList).map(function(){
return this.element;
});
},
showLabel: function(element, message){
var label=this.errorsFor(element);
if(label.length){
label.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
if(label.attr("generated")){
label.html(message);
}}else{
label=$("<" + this.settings.errorElement + "/>")
.attr({"for":  this.idOrName(element), generated: true})
.addClass(this.settings.errorClass)
.html(message||"");
if(this.settings.wrapper){
label=label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
}
if(!this.labelContainer.append(label).length){
if(this.settings.errorPlacement){
this.settings.errorPlacement(label, $(element));
}else{
label.insertAfter(element);
}}
}
if(!message&&this.settings.success){
label.text("");
if(typeof this.settings.success==="string"){
label.addClass(this.settings.success);
}else{
this.settings.success(label, element);
}}
this.toShow=this.toShow.add(label);
},
errorsFor: function(element){
var name=this.idOrName(element);
return this.errors().filter(function(){
return $(this).attr("for")===name;
});
},
idOrName: function(element){
return this.groups[element.name]||(this.checkable(element) ? element.name:element.id||element.name);
},
validationTargetFor: function(element){
if(this.checkable(element)){
element=this.findByName(element.name).not(this.settings.ignore)[0];
}
return element;
},
checkable: function(element){
return (/radio|checkbox/i).test(element.type);
},
findByName: function(name){
return $(this.currentForm).find("[name='" + name + "']");
},
getLength: function(value, element){
switch(element.nodeName.toLowerCase()){
case "select":
return $("option:selected", element).length;
case "input":
if(this.checkable(element)){
return this.findByName(element.name).filter(":checked").length;
}}
return value.length;
},
depend: function(param, element){
return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element):true;
},
dependTypes: {
"boolean": function(param, element){
return param;
},
"string": function(param, element){
return !!$(param, element.form).length;
},
"function": function(param, element){
return param(element);
}},
optional: function(element){
var val=this.elementValue(element);
return !$.validator.methods.required.call(this, val, element)&&"dependency-mismatch";
},
startRequest: function(element){
if(!this.pending[element.name]){
this.pendingRequest++;
this.pending[element.name]=true;
}},
stopRequest: function(element, valid){
this.pendingRequest--;
if(this.pendingRequest < 0){
this.pendingRequest=0;
}
delete this.pending[element.name];
if(valid&&this.pendingRequest===0&&this.formSubmitted&&this.form()){
$(this.currentForm).submit();
this.formSubmitted=false;
}else if(!valid&&this.pendingRequest===0&&this.formSubmitted){
$(this.currentForm).triggerHandler("invalid-form", [this]);
this.formSubmitted=false;
}},
previousValue: function(element){
return $.data(element, "previousValue")||$.data(element, "previousValue", {
old: null,
valid: true,
message: this.defaultMessage(element, "remote")
});
}},
classRuleSettings: {
required: {required: true},
email: {email: true},
url: {url: true},
date: {date: true},
dateISO: {dateISO: true},
number: {number: true},
digits: {digits: true},
creditcard: {creditcard: true}},
addClassRules: function(className, rules){
if(className.constructor===String){
this.classRuleSettings[className]=rules;
}else{
$.extend(this.classRuleSettings, className);
}},
classRules: function(element){
var rules={};
var classes=$(element).attr("class");
if(classes){
$.each(classes.split(" "), function(){
if(this in $.validator.classRuleSettings){
$.extend(rules, $.validator.classRuleSettings[this]);
}});
}
return rules;
},
attributeRules: function(element){
var rules={};
var $element=$(element);
for (var method in $.validator.methods){
var value;
if(method==="required"){
value=$element.get(0).getAttribute(method);
if(value===""){
value=true;
}
value = !!value;
}else{
value=$element.attr(method);
}
if(value){
rules[method]=value;
}else if($element[0].getAttribute("type")===method){
rules[method]=true;
}}
if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){
delete rules.maxlength;
}
return rules;
},
dataRules: function(element){
var method, value,
rules={}, $element=$(element);
for (method in $.validator.methods){
value=$element.data("rule-" + method.toLowerCase());
if(value!==undefined){
rules[method]=value;
}}
return rules;
},
staticRules: function(element){
var rules={};
var validator=$.data(element.form, "validator");
if(validator.settings.rules){
rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}
return rules;
},
normalizeRules: function(rules, element){
$.each(rules, function(prop, val){
if(val===false){
delete rules[prop];
return;
}
if(val.param||val.depends){
var keepRule=true;
switch (typeof val.depends){
case "string":
keepRule = !!$(val.depends, element.form).length;
break;
case "function":
keepRule=val.depends.call(element, element);
break;
}
if(keepRule){
rules[prop]=val.param!==undefined ? val.param:true;
}else{
delete rules[prop];
}}
});
$.each(rules, function(rule, parameter){
rules[rule]=$.isFunction(parameter) ? parameter(element):parameter;
});
$.each(["minlength", "maxlength", "min", "max"], function(){
if(rules[this]){
rules[this]=Number(rules[this]);
}});
$.each(["rangelength", "range"], function(){
var parts;
if(rules[this]){
if($.isArray(rules[this])){
rules[this]=[Number(rules[this][0]), Number(rules[this][1])];
}else if(typeof rules[this]==="string"){
parts=rules[this].split(/[\s,]+/);
rules[this]=[Number(parts[0]), Number(parts[1])];
}}
});
if($.validator.autoCreateRanges){
if(rules.min&&rules.max){
rules.range=[rules.min, rules.max];
delete rules.min;
delete rules.max;
}
if(rules.minlength&&rules.maxlength){
rules.rangelength=[rules.minlength, rules.maxlength];
delete rules.minlength;
delete rules.maxlength;
}}
return rules;
},
normalizeRule: function(data){
if(typeof data==="string"){
var transformed={};
$.each(data.split(/\s/), function(){
transformed[this]=true;
});
data=transformed;
}
return data;
},
addMethod: function(name, method, message){
$.validator.methods[name]=method;
$.validator.messages[name]=message!==undefined ? message:$.validator.messages[name];
if(method.length < 3){
$.validator.addClassRules(name, $.validator.normalizeRule(name));
}},
methods: {
required: function(value, element, param){
if(!this.depend(param, element)){
return "dependency-mismatch";
}
if(element.nodeName.toLowerCase()==="select"){
var val=$(element).val();
return val&&val.length > 0;
}
if(this.checkable(element)){
return this.getLength(value, element) > 0;
}
return $.trim(value).length > 0;
},
remote: function(value, element, param){
if(this.optional(element)){
return "dependency-mismatch";
}
var previous=this.previousValue(element);
if(!this.settings.messages[element.name]){
this.settings.messages[element.name]={};}
previous.originalMessage=this.settings.messages[element.name].remote;
this.settings.messages[element.name].remote=previous.message;
param=typeof param==="string"&&{url:param}||param;
if(previous.old===value){
return previous.valid;
}
previous.old=value;
var validator=this;
this.startRequest(element);
var data={};
data[element.name]=value;
$.ajax($.extend(true, {
url: param,
mode: "abort",
port: "validate" + element.name,
dataType: "json",
data: data,
success: function(response){
validator.settings.messages[element.name].remote=previous.originalMessage;
var valid=response===true||response==="true";
if(valid){
var submitted=validator.formSubmitted;
validator.prepareElement(element);
validator.formSubmitted=submitted;
validator.successList.push(element);
delete validator.invalid[element.name];
validator.showErrors();
}else{
var errors={};
var message=response||validator.defaultMessage(element, "remote");
errors[element.name]=previous.message=$.isFunction(message) ? message(value):message;
validator.invalid[element.name]=true;
validator.showErrors(errors);
}
previous.valid=valid;
validator.stopRequest(element, valid);
}}, param));
return "pending";
},
minlength: function(value, element, param){
var length=$.isArray(value) ? value.length:this.getLength($.trim(value), element);
return this.optional(element)||length >=param;
},
maxlength: function(value, element, param){
var length=$.isArray(value) ? value.length:this.getLength($.trim(value), element);
return this.optional(element)||length <=param;
},
rangelength: function(value, element, param){
var length=$.isArray(value) ? value.length:this.getLength($.trim(value), element);
return this.optional(element)||(length >=param[0]&&length <=param[1]);
},
min: function(value, element, param){
return this.optional(element)||value >=param;
},
max: function(value, element, param){
return this.optional(element)||value <=param;
},
range: function(value, element, param){
return this.optional(element)||(value >=param[0]&&value <=param[1]);
},
email: function(value, element){
return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);
},
url: function(value, element){
return this.optional(element)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
},
date: function(value, element){
return this.optional(element)||!/Invalid|NaN/.test(new Date(value).toString());
},
dateISO: function(value, element){
return this.optional(element)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
},
number: function(value, element){
return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
},
digits: function(value, element){
return this.optional(element)||/^\d+$/.test(value);
},
creditcard: function(value, element){
if(this.optional(element)){
return "dependency-mismatch";
}
if(/[^0-9 \-]+/.test(value)){
return false;
}
var nCheck=0,
nDigit=0,
bEven=false;
value=value.replace(/\D/g, "");
for (var n=value.length - 1; n >=0; n--){
var cDigit=value.charAt(n);
nDigit=parseInt(cDigit, 10);
if(bEven){
if((nDigit *=2) > 9){
nDigit -=9;
}}
nCheck +=nDigit;
bEven = !bEven;
}
return (nCheck % 10)===0;
},
equalTo: function(value, element, param){
var target=$(param);
if(this.settings.onfocusout){
target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function(){
$(element).valid();
});
}
return value===target.val();
}}
});
$.format=$.validator.format;
}(jQuery));
(function($){
var pendingRequests={};
if($.ajaxPrefilter){
$.ajaxPrefilter(function(settings, _, xhr){
var port=settings.port;
if(settings.mode==="abort"){
if(pendingRequests[port]){
pendingRequests[port].abort();
}
pendingRequests[port]=xhr;
}});
}else{
var ajax=$.ajax;
$.ajax=function(settings){
var mode=("mode" in settings ? settings:$.ajaxSettings).mode,
port=("port" in settings ? settings:$.ajaxSettings).port;
if(mode==="abort"){
if(pendingRequests[port]){
pendingRequests[port].abort();
}
return (pendingRequests[port]=ajax.apply(this, arguments));
}
return ajax.apply(this, arguments);
};}}(jQuery));
(function($){
$.extend($.fn, {
validateDelegate: function(delegate, type, handler){
return this.bind(type, function(event){
var target=$(event.target);
if(target.is(delegate)){
return handler.apply(target, arguments);
}});
}});
}(jQuery));
(function(window,undefined){var S={version:"3.0.3"};var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")>-1||ua.indexOf("win32")>-1){S.isWindows=true}else{if(ua.indexOf("macintosh")>-1||ua.indexOf("mac os x")>-1){S.isMac=true}else{if(ua.indexOf("linux")>-1){S.isLinux=true}}}S.isIE=ua.indexOf("msie")>-1;S.isIE6=ua.indexOf("msie 6")>-1;S.isIE7=ua.indexOf("msie 7")>-1;S.isGecko=ua.indexOf("gecko")>-1&&ua.indexOf("safari")==-1;S.isWebKit=ua.indexOf("applewebkit/")>-1;var inlineId=/#(.+)$/,galleryName=/^(light|shadow)box\[(.*?)\]/i,inlineParam=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,fileExtension=/[0-9a-z]+$/i,scriptPath=/(.+\/)shadowbox\.js/i;var open=false,initialized=false,lastOptions={},slideDelay=0,slideStart,slideTimer;S.current=-1;S.dimensions=null;S.ease=function(state){return 1+Math.pow(state-1,3)};S.errorInfo={fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}};S.gallery=[];S.onReady=noop;S.path=null;S.player=null;S.playerId="sb-player";S.options={animate:true,animateFade:true,autoplayMovies:true,continuous:false,enableKeys:true,flashParams:{bgcolor:"#000000",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:noop,onClose:noop,onFinish:noop,onOpen:noop,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};S.getCurrent=function(){return S.current>-1?S.gallery[S.current]:null};S.hasNext=function(){return S.gallery.length>1&&(S.current!=S.gallery.length-1||S.options.continuous)};S.isOpen=function(){return open};S.isPaused=function(){return slideTimer=="pause"};S.applyOptions=function(options){lastOptions=apply({},S.options);apply(S.options,options)};S.revertOptions=function(){apply(S.options,lastOptions)};S.init=function(options,callback){if(initialized){return}initialized=true;if(S.skin.options){apply(S.options,S.skin.options)}if(options){apply(S.options,options)}if(!S.path){var path,scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;i<len;++i){path=scriptPath.exec(scripts[i].src);if(path){S.path=path[1];break}}}if(callback){S.onReady=callback}bindLoad()};S.open=function(obj){if(open){return}var gc=S.makeGallery(obj);S.gallery=gc[0];S.current=gc[1];obj=S.getCurrent();if(obj==null){return}S.applyOptions(obj.options||{});filterGallery();if(S.gallery.length){obj=S.getCurrent();if(S.options.onOpen(obj)===false){return}open=true;S.skin.onOpen(obj,load)}};S.close=function(){if(!open){return}open=false;if(S.player){S.player.remove();S.player=null}if(typeof slideTimer=="number"){clearTimeout(slideTimer);slideTimer=null}slideDelay=0;listenKeys(false);S.options.onClose(S.getCurrent());S.skin.onClose();S.revertOptions()};S.play=function(){if(!S.hasNext()){return}if(!slideDelay){slideDelay=S.options.slideshowDelay*1000}if(slideDelay){slideStart=now();slideTimer=setTimeout(function(){slideDelay=slideStart=0;S.next()},slideDelay);if(S.skin.onPlay){S.skin.onPlay()}}};S.pause=function(){if(typeof slideTimer!="number"){return}slideDelay=Math.max(0,slideDelay-(now()-slideStart));if(slideDelay){clearTimeout(slideTimer);slideTimer="pause";if(S.skin.onPause){S.skin.onPause()}}};S.change=function(index){if(!(index in S.gallery)){if(S.options.continuous){index=(index<0?S.gallery.length+index:0);if(!(index in S.gallery)){return}}else{return}}S.current=index;if(typeof slideTimer=="number"){clearTimeout(slideTimer);slideTimer=null;slideDelay=slideStart=0}S.options.onChange(S.getCurrent());load(true)};S.next=function(){S.change(S.current+1)};S.previous=function(){S.change(S.current-1)};S.setDimensions=function(height,width,maxHeight,maxWidth,topBottom,leftRight,padding,preserveAspect){var originalHeight=height,originalWidth=width;var extraHeight=2*padding+topBottom;if(height+extraHeight>maxHeight){height=maxHeight-extraHeight}var extraWidth=2*padding+leftRight;if(width+extraWidth>maxWidth){width=maxWidth-extraWidth}var changeHeight=(originalHeight-height)/originalHeight,changeWidth=(originalWidth-width)/originalWidth,oversized=(changeHeight>0||changeWidth>0);if(preserveAspect&&oversized){if(changeHeight>changeWidth){width=Math.round((originalWidth/originalHeight)*height)}else{if(changeWidth>changeHeight){height=Math.round((originalHeight/originalWidth)*width)}}}S.dimensions={height:height+topBottom,width:width+leftRight,innerHeight:height,innerWidth:width,top:Math.floor((maxHeight-(height+extraHeight))/2+padding),left:Math.floor((maxWidth-(width+extraWidth))/2+padding),oversized:oversized};return S.dimensions};S.makeGallery=function(obj){var gallery=[],current=-1;if(typeof obj=="string"){obj=[obj]}if(typeof obj.length=="number"){each(obj,function(i,o){if(o.content){gallery[i]=o}else{gallery[i]={content:o}}});current=0}else{if(obj.tagName){var cacheObj=S.getCache(obj);obj=cacheObj?cacheObj:S.makeObject(obj)}if(obj.gallery){gallery=[];var o;for(var key in S.cache){o=S.cache[key];if(o.gallery&&o.gallery==obj.gallery){if(current==-1&&o.content==obj.content){current=gallery.length}gallery.push(o)}}if(current==-1){gallery.unshift(obj);current=0}}else{gallery=[obj];current=0}}each(gallery,function(i,o){gallery[i]=apply({},o)});return[gallery,current]};S.makeObject=function(link,options){var obj={content:link.href,title:link.getAttribute("title")||"",link:link};if(options){options=apply({},options);each(["player","title","height","width","gallery"],function(i,o){if(typeof options[o]!="undefined"){obj[o]=options[o];delete options[o]}});obj.options=options}else{obj.options={}}if(!obj.player){obj.player=S.getPlayer(obj.content)}var rel=link.getAttribute("rel");if(rel){var match=rel.match(galleryName);if(match){obj.gallery=escape(match[2])}each(rel.split(";"),function(i,p){match=p.match(inlineParam);if(match){obj[match[1]]=match[2]}})}return obj};S.getPlayer=function(content){if(content.indexOf("#")>-1&&content.indexOf(document.location.href)==0){return"inline"}var q=content.indexOf("?");if(q>-1){content=content.substring(0,q)}var ext,m=content.match(fileExtension);if(m){ext=m[0].toLowerCase()}if(ext){if(S.img&&S.img.ext.indexOf(ext)>-1){return"img"}if(S.swf&&S.swf.ext.indexOf(ext)>-1){return"swf"}if(S.flv&&S.flv.ext.indexOf(ext)>-1){return"flv"}if(S.qt&&S.qt.ext.indexOf(ext)>-1){if(S.wmp&&S.wmp.ext.indexOf(ext)>-1){return"qtwmp"}else{return"qt"}}if(S.wmp&&S.wmp.ext.indexOf(ext)>-1){return"wmp"}}return"iframe"};function filterGallery(){var err=S.errorInfo,plugins=S.plugins,obj,remove,needed,m,format,replace,inlineEl,flashVersion;for(var i=0;i<S.gallery.length;++i){obj=S.gallery[i];remove=false;needed=null;switch(obj.player){case"flv":case"swf":if(!plugins.fla){needed="fla"}break;case"qt":if(!plugins.qt){needed="qt"}break;case"wmp":if(S.isMac){if(plugins.qt&&plugins.f4m){obj.player="qt"}else{needed="qtf4m"}}else{if(!plugins.wmp){needed="wmp"}}break;case"qtwmp":if(plugins.qt){obj.player="qt"}else{if(plugins.wmp){obj.player="wmp"}else{needed="qtwmp"}}break}if(needed){if(S.options.handleUnsupported=="link"){switch(needed){case"qtf4m":format="shared";replace=[err.qt.url,err.qt.name,err.f4m.url,err.f4m.name];break;case"qtwmp":format="either";replace=[err.qt.url,err.qt.name,err.wmp.url,err.wmp.name];break;default:format="single";replace=[err[needed].url,err[needed].name]}obj.player="html";obj.content='<div class="sb-message">'+sprintf(S.lang.errors[format],replace)+"</div>"}else{remove=true}}else{if(obj.player=="inline"){m=inlineId.exec(obj.content);if(m){inlineEl=get(m[1]);if(inlineEl){obj.content=inlineEl.innerHTML}else{remove=true}}else{remove=true}}else{if(obj.player=="swf"||obj.player=="flv"){flashVersion=(obj.options&&obj.options.flashVersion)||S.options.flashVersion;if(S.flash&&!S.flash.hasFlashPlayerVersion(flashVersion)){obj.width=310;obj.height=177}}}}if(remove){S.gallery.splice(i,1);if(i<S.current){--S.current}else{if(i==S.current){S.current=i>0?i-1:i}}--i}}}function listenKeys(on){if(!S.options.enableKeys){return}(on?addEvent:removeEvent)(document,"keydown",handleKey)}function handleKey(e){if(e.metaKey||e.shiftKey||e.altKey||e.ctrlKey){return}var code=keyCode(e),handler;switch(code){case 81:case 88:case 27:handler=S.close;break;case 37:handler=S.previous;break;case 39:handler=S.next;break;case 32:handler=typeof slideTimer=="number"?S.pause:S.play;break}if(handler){preventDefault(e);handler()}}function load(changing){listenKeys(false);var obj=S.getCurrent();var player=(obj.player=="inline"?"html":obj.player);if(typeof S[player]!="function"){throw"unknown player "+player}if(changing){S.player.remove();S.revertOptions();S.applyOptions(obj.options||{})}S.player=new S[player](obj,S.playerId);if(S.gallery.length>1){var next=S.gallery[S.current+1]||S.gallery[0];if(next.player=="img"){var a=new Image();a.src=next.content}var prev=S.gallery[S.current-1]||S.gallery[S.gallery.length-1];if(prev.player=="img"){var b=new Image();b.src=prev.content}}S.skin.onLoad(changing,waitReady)}function waitReady(){if(!open){return}if(typeof S.player.ready!="undefined"){var timer=setInterval(function(){if(open){if(S.player.ready){clearInterval(timer);timer=null;S.skin.onReady(show)}}else{clearInterval(timer);timer=null}},10)}else{S.skin.onReady(show)}}function show(){if(!open){return}S.player.append(S.skin.body,S.dimensions);S.skin.onShow(finish)}function finish(){if(!open){return}if(S.player.onLoad){S.player.onLoad()}S.options.onFinish(S.getCurrent());if(!S.isPaused()){S.play()}listenKeys(true)}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(obj,from){var len=this.length>>>0;from=from||0;if(from<0){from+=len}for(;from<len;++from){if(from in this&&this[from]===obj){return from}}return -1}}function now(){return(new Date).getTime()}function apply(original,extension){for(var property in extension){original[property]=extension[property]}return original}function each(obj,callback){var i=0,len=obj.length;for(var value=obj[0];i<len&&callback.call(value,i,value)!==false;value=obj[++i]){}}function sprintf(str,replace){return str.replace(/\{(\w+?)\}/g,function(match,i){return replace[i]})}function noop(){}function get(id){return document.getElementById(id)}function remove(el){el.parentNode.removeChild(el)}var supportsOpacity=true,supportsFixed=true;function checkSupport(){var body=document.body,div=document.createElement("div");supportsOpacity=typeof div.style.opacity==="string";div.style.position="fixed";div.style.margin=0;div.style.top="20px";body.appendChild(div,body.firstChild);supportsFixed=div.offsetTop==20;body.removeChild(div)}S.getStyle=(function(){var opacity=/opacity=([^)]*)/,getComputedStyle=document.defaultView&&document.defaultView.getComputedStyle;return function(el,style){var ret;if(!supportsOpacity&&style=="opacity"&&el.currentStyle){ret=opacity.test(el.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return ret===""?"1":ret}if(getComputedStyle){var computedStyle=getComputedStyle(el,null);if(computedStyle){ret=computedStyle[style]}if(style=="opacity"&&ret==""){ret="1"}}else{ret=el.currentStyle[style]}return ret}})();S.appendHTML=function(el,html){if(el.insertAdjacentHTML){el.insertAdjacentHTML("BeforeEnd",html)}else{if(el.lastChild){var range=el.ownerDocument.createRange();range.setStartAfter(el.lastChild);var frag=range.createContextualFragment(html);el.appendChild(frag)}else{el.innerHTML=html}}};S.getWindowSize=function(dimension){if(document.compatMode==="CSS1Compat"){return document.documentElement["client"+dimension]}return document.body["client"+dimension]};S.setOpacity=function(el,opacity){var style=el.style;if(supportsOpacity){style.opacity=(opacity==1?"":opacity)}else{style.zoom=1;if(opacity==1){if(typeof style.filter=="string"&&(/alpha/i).test(style.filter)){style.filter=style.filter.replace(/\s*[\w\.]*alpha\([^\)]*\);?/gi,"")}}else{style.filter=(style.filter||"").replace(/\s*[\w\.]*alpha\([^\)]*\)/gi,"")+" alpha(opacity="+(opacity*100)+")"}}};S.clearOpacity=function(el){S.setOpacity(el,1)};function getTarget(e){var target=e.target?e.target:e.srcElement;return target.nodeType==3?target.parentNode:target}function getPageXY(e){var x=e.pageX||(e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),y=e.pageY||(e.clientY+(document.documentElement.scrollTop||document.body.scrollTop));return[x,y]}function preventDefault(e){e.preventDefault()}function keyCode(e){return e.which?e.which:e.keyCode}function addEvent(el,type,handler){if(el.addEventListener){el.addEventListener(type,handler,false)}else{if(el.nodeType===3||el.nodeType===8){return}if(el.setInterval&&(el!==window&&!el.frameElement)){el=window}if(!handler.__guid){handler.__guid=addEvent.guid++}if(!el.events){el.events={}}var handlers=el.events[type];if(!handlers){handlers=el.events[type]={};if(el["on"+type]){handlers[0]=el["on"+type]}}handlers[handler.__guid]=handler;el["on"+type]=addEvent.handleEvent}}addEvent.guid=1;addEvent.handleEvent=function(event){var result=true;event=event||addEvent.fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);var handlers=this.events[event.type];for(var i in handlers){this.__handleEvent=handlers[i];if(this.__handleEvent(event)===false){result=false}}return result};addEvent.preventDefault=function(){this.returnValue=false};addEvent.stopPropagation=function(){this.cancelBubble=true};addEvent.fixEvent=function(e){e.preventDefault=addEvent.preventDefault;e.stopPropagation=addEvent.stopPropagation;return e};function removeEvent(el,type,handler){if(el.removeEventListener){el.removeEventListener(type,handler,false)}else{if(el.events&&el.events[type]){delete el.events[type][handler.__guid]}}}var loaded=false,DOMContentLoaded;if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);S.load()}}else{if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);S.load()}}}}function doScrollCheck(){if(loaded){return}try{document.documentElement.doScroll("left")}catch(e){setTimeout(doScrollCheck,1);return}S.load()}function bindLoad(){if(document.readyState==="complete"){return S.load()}if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",S.load,false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",S.load);var topLevel=false;try{topLevel=window.frameElement===null}catch(e){}if(document.documentElement.doScroll&&topLevel){doScrollCheck()}}}}S.load=function(){if(loaded){return}if(!document.body){return setTimeout(S.load,13)}loaded=true;checkSupport();S.onReady();if(!S.options.skipSetup){S.setup()}S.skin.init()};S.plugins={};if(navigator.plugins&&navigator.plugins.length){var names=[];each(navigator.plugins,function(i,p){names.push(p.name)});names=names.join(",");var f4m=names.indexOf("Flip4Mac")>-1;S.plugins={fla:names.indexOf("Shockwave Flash")>-1,qt:names.indexOf("QuickTime")>-1,wmp:!f4m&&names.indexOf("Windows Media")>-1,f4m:f4m}}else{var detectPlugin=function(name){var axo;try{axo=new ActiveXObject(name)}catch(e){}return !!axo};S.plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}}var relAttr=/^(light|shadow)box/i,expando="shadowboxCacheKey",cacheKey=1;S.cache={};S.select=function(selector){var links=[];if(!selector){var rel;each(document.getElementsByTagName("a"),function(i,el){rel=el.getAttribute("rel");if(rel&&relAttr.test(rel)){links.push(el)}})}else{var length=selector.length;if(length){if(typeof selector=="string"){if(S.find){links=S.find(selector)}}else{if(length==2&&typeof selector[0]=="string"&&selector[1].nodeType){if(S.find){links=S.find(selector[0],selector[1])}}else{for(var i=0;i<length;++i){links[i]=selector[i]}}}}else{links.push(selector)}}return links};S.setup=function(selector,options){each(S.select(selector),function(i,link){S.addCache(link,options)})};S.teardown=function(selector){each(S.select(selector),function(i,link){S.removeCache(link)})};S.addCache=function(link,options){var key=link[expando];if(key==undefined){key=cacheKey++;link[expando]=key;addEvent(link,"click",handleClick)}S.cache[key]=S.makeObject(link,options)};S.removeCache=function(link){removeEvent(link,"click",handleClick);delete S.cache[link[expando]];link[expando]=null};S.getCache=function(link){var key=link[expando];return(key in S.cache&&S.cache[key])};S.clearCache=function(){for(var key in S.cache){S.removeCache(S.cache[key].link)}S.cache={}};function handleClick(e){S.open(this);if(S.gallery.length){preventDefault(e)}}
S.find=(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0});var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,extra,prune=true,contextXML=isXML(context),soFar=selector;while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift()}set=posProcess(selector,set)}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0]}if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,contextXML)}}else{checkSet=parts=[]}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else{if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results)}return results};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}return results};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];match.splice(1,1);if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop===result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else{if(pass){result.push(item);anyFound=true}}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr===old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag){part=part.toLowerCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName.toLowerCase()===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=part.toLowerCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName.toLowerCase()===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=part.toLowerCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=part.toLowerCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n]/g," ").indexOf(match)>=0)){if(!inplace){result.push(elem)}}else{if(inplace){curLoop[i]=false}}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){return match[1].toLowerCase()},CHILD:function(match){if(match[1]==="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return !!elem.firstChild},empty:function(elem){return !elem.firstChild},has:function(elem,i,match){return !!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toLowerCase()==="button"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0===i},eq:function(elem,i,match){return match[3]-0===i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textContent||elem.innerText||getText([elem])||"").indexOf(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}else{throw"Syntax error, unrecognized expression: "+name}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while((node=node.previousSibling)){if(node.nodeType===1){return false}}if(type==="first"){return true}node=elem;case"last":while((node=node.nextSibling)){if(node.nodeType===1){return false}}return true;case"nth":var first=match[2],last=match[3];if(first===1&&last===0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first===0){return diff===0}else{return(diff%first===0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true}return a.compareDocumentPosition?-1:1}var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true}return a.sourceIndex?-1:1}var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else{if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true}return a.ownerDocument?-1:1}var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.setStart(a,0);aRange.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}}}function getText(elems){var ret="",elem;for(var i=0;elems[i];i++){elem=elems[i];if(elem.nodeType===3||elem.nodeType===4){ret+=elem.nodeValue}else{if(elem.nodeType!==8){ret+=getText(elem.childNodes)}}}return ret}(function(){var form=document.createElement("div"),id="script"+(new Date).getTime();form.innerHTML="<a name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form);root=form=null})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}div=null})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop]}div=null})()}(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){return}div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return}Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}};div=null})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName.toLowerCase()===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};return Sizzle})();
S.flash=(function(){var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
/*@cc_on
ie=true;
@if(@_win32)
windows=true;
@elif(@_mac)
mac=true;
@end
@*/
return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return}addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return}if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return}}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){}return el}function createElement(el){return doc.createElement(el)}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return}var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in swfobject){swfobject[l]=null}swfobject=null})}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return}var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return}widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},removeSWF:function(objElemIdStr){if(ua.w3cdom){removeSWF(objElemIdStr)}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();return swfobject})();S.lang={code:"en",of:"of",loading:"loading",cancel:"Cancel",next:"Next",previous:"Previous",play:"Play",pause:"Pause",close:"Close",errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either:'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}};var pre,proxyId="sb-drag-proxy",dragData,dragProxy,dragTarget;function resetDrag(){dragData={x:0,y:0,startX:null,startY:null}}function updateProxy(){var dims=S.dimensions;apply(dragProxy.style,{height:dims.innerHeight+"px",width:dims.innerWidth+"px"})}function enableDrag(){resetDrag();var style=["position:absolute","cursor:"+(S.isGecko?"-moz-grab":"move"),"background-color:"+(S.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");S.appendHTML(S.skin.body,'<div id="'+proxyId+'" style="'+style+'"></div>');dragProxy=get(proxyId);updateProxy();addEvent(dragProxy,"mousedown",startDrag)}function disableDrag(){if(dragProxy){removeEvent(dragProxy,"mousedown",startDrag);remove(dragProxy);dragProxy=null}dragTarget=null}function startDrag(e){preventDefault(e);var xy=getPageXY(e);dragData.startX=xy[0];dragData.startY=xy[1];dragTarget=get(S.player.id);addEvent(document,"mousemove",positionDrag);addEvent(document,"mouseup",endDrag);if(S.isGecko){dragProxy.style.cursor="-moz-grabbing"}}function positionDrag(e){var player=S.player,dims=S.dimensions,xy=getPageXY(e);var moveX=xy[0]-dragData.startX;dragData.startX+=moveX;dragData.x=Math.max(Math.min(0,dragData.x+moveX),dims.innerWidth-player.width);var moveY=xy[1]-dragData.startY;dragData.startY+=moveY;dragData.y=Math.max(Math.min(0,dragData.y+moveY),dims.innerHeight-player.height);apply(dragTarget.style,{left:dragData.x+"px",top:dragData.y+"px"})}function endDrag(){removeEvent(document,"mousemove",positionDrag);removeEvent(document,"mouseup",endDrag);if(S.isGecko){dragProxy.style.cursor="-moz-grab"}}S.img=function(obj,id){this.obj=obj;this.id=id;this.ready=false;var self=this;pre=new Image();pre.onload=function(){self.height=obj.height?parseInt(obj.height,10):pre.height;self.width=obj.width?parseInt(obj.width,10):pre.width;self.ready=true;pre.onload=null;pre=null};pre.src=obj.content};S.img.ext=["bmp","gif","jpg","jpeg","png"];S.img.prototype={append:function(body,dims){var img=document.createElement("img");img.id=this.id;img.src=this.obj.content;img.style.position="absolute";var height,width;if(dims.oversized&&S.options.handleOversize=="resize"){height=dims.innerHeight;width=dims.innerWidth}else{height=this.height;width=this.width}img.setAttribute("height",height);img.setAttribute("width",width);body.appendChild(img)},remove:function(){var el=get(this.id);if(el){remove(el)}disableDrag();if(pre){pre.onload=null;pre=null}},onLoad:function(){var dims=S.dimensions;if(dims.oversized&&S.options.handleOversize=="drag"){enableDrag()}},onWindowResize:function(){var dims=S.dimensions;switch(S.options.handleOversize){case"resize":var el=get(this.id);el.height=dims.innerHeight;el.width=dims.innerWidth;break;case"drag":if(dragTarget){var top=parseInt(S.getStyle(dragTarget,"top")),left=parseInt(S.getStyle(dragTarget,"left"));if(top+this.height<dims.innerHeight){dragTarget.style.top=dims.innerHeight-this.height+"px"}if(left+this.width<dims.innerWidth){dragTarget.style.left=dims.innerWidth-this.width+"px"}updateProxy()}break}}};S.iframe=function(obj,id){this.obj=obj;this.id=id;var overlay=get("sb-overlay");this.height=obj.height?parseInt(obj.height,10):overlay.offsetHeight;this.width=obj.width?parseInt(obj.width,10):overlay.offsetWidth};S.iframe.prototype={append:function(body,dims){var html='<iframe id="'+this.id+'" name="'+this.id+'" height="100%" width="100%" frameborder="0" marginwidth="0" marginheight="0" style="visibility:hidden" onload="this.style.visibility=\'visible\'" scrolling="auto"';if(S.isIE){html+=' allowtransparency="true"';if(S.isIE6){html+=" src=\"javascript:false;document.write('');\""}}html+="></iframe>";body.innerHTML=html},remove:function(){var el=get(this.id);if(el){remove(el);if(S.isGecko){delete window.frames[this.id]}}},onLoad:function(){var win=S.isIE?get(this.id).contentWindow:window.frames[this.id];win.location.href=this.obj.content}};S.html=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;this.width=obj.width?parseInt(obj.width,10):500};S.html.prototype={append:function(body,dims){var div=document.createElement("div");div.id=this.id;div.className="html";div.innerHTML=this.obj.content;body.appendChild(div)},remove:function(){var el=get(this.id);if(el){remove(el)}}};S.swf=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;this.width=obj.width?parseInt(obj.width,10):300};S.swf.ext=["swf"];S.swf.prototype={append:function(body,dims){var tmp=document.createElement("div");tmp.id=this.id;body.appendChild(tmp);var height=dims.innerHeight,width=dims.innerWidth,swf=this.obj.content,version=S.options.flashVersion,express=S.path+"expressInstall.swf",flashvars=S.options.flashVars,params=S.options.flashParams;S.flash.embedSWF(swf,this.id,width,height,version,express,flashvars,params)},remove:function(){S.flash.expressInstallCallback();S.flash.removeSWF(this.id)},onWindowResize:function(){var dims=S.dimensions,el=get(this.id);el.height=dims.innerHeight;el.width=dims.innerWidth}};var jwControllerHeight=20;S.flv=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;if(S.options.showMovieControls){this.height+=jwControllerHeight}this.width=obj.width?parseInt(obj.width,10):300};S.flv.ext=["flv","m4v"];S.flv.prototype={append:function(body,dims){var tmp=document.createElement("div");tmp.id=this.id;body.appendChild(tmp);var height=dims.innerHeight,width=dims.innerWidth,swf=S.path+"player.swf",version=S.options.flashVersion,express=S.path+"expressInstall.swf",flashvars=apply({file:this.obj.content,height:height,width:width,autostart:(S.options.autoplayMovies?"true":"false"),controlbar:(S.options.showMovieControls?"bottom":"none"),backcolor:"0x000000",frontcolor:"0xCCCCCC",lightcolor:"0x557722"},S.options.flashVars),params=S.options.flashParams;S.flash.embedSWF(swf,this.id,width,height,version,express,flashvars,params)},remove:function(){S.flash.expressInstallCallback();S.flash.removeSWF(this.id)},onWindowResize:function(){var dims=S.dimensions,el=get(this.id);el.height=dims.innerHeight;el.width=dims.innerWidth}};var qtControllerHeight=16;S.qt=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;if(S.options.showMovieControls){this.height+=qtControllerHeight}this.width=obj.width?parseInt(obj.width,10):300};S.qt.ext=["dv","mov","moov","movie","mp4","avi","mpg","mpeg"];S.qt.prototype={append:function(body,dims){var opt=S.options,autoplay=String(opt.autoplayMovies),controls=String(opt.showMovieControls);var html="<object",movie={id:this.id,name:this.id,height:this.height,width:this.width,kioskmode:"true"};if(S.isIE){movie.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";movie.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"}else{movie.type="video/quicktime";movie.data=this.obj.content}for(var m in movie){html+=" "+m+'="'+movie[m]+'"'}html+=">";var params={src:this.obj.content,scale:"aspect",controller:controls,autoplay:autoplay};for(var p in params){html+='<param name="'+p+'" value="'+params[p]+'">'}html+="</object>";body.innerHTML=html},remove:function(){try{document[this.id].Stop()}catch(e){}var el=get(this.id);if(el){remove(el)}}};var wmpControllerHeight=(S.isIE?70:45);S.wmp=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;if(S.options.showMovieControls){this.height+=wmpControllerHeight}this.width=obj.width?parseInt(obj.width,10):300};S.wmp.ext=["asf","avi","mpg","mpeg","wm","wmv"];S.wmp.prototype={append:function(body,dims){var opt=S.options,autoplay=opt.autoplayMovies?1:0;var movie='<object id="'+this.id+'" name="'+this.id+'" height="'+this.height+'" width="'+this.width+'"',params={autostart:opt.autoplayMovies?1:0};if(S.isIE){movie+=' classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"';params.url=this.obj.content;params.uimode=opt.showMovieControls?"full":"none"}else{movie+=' type="video/x-ms-wmv"';movie+=' data="'+this.obj.content+'"';params.showcontrols=opt.showMovieControls?1:0}movie+=">";for(var p in params){movie+='<param name="'+p+'" value="'+params[p]+'">'}movie+="</object>";body.innerHTML=movie},remove:function(){if(S.isIE){try{window[this.id].controls.stop();window[this.id].URL="movie"+now()+".wmv";window[this.id]=function(){}}catch(e){}}var el=get(this.id);if(el){setTimeout(function(){remove(el)},10)}}};var overlayOn=false,visibilityCache=[],pngIds=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],container,overlay,wrapper,doWindowResize=true;function animate(el,property,to,duration,callback){var isOpacity=(property=="opacity"),anim=isOpacity?S.setOpacity:function(el,value){el.style[property]=""+value+"px"};if(duration==0||(!isOpacity&&!S.options.animate)||(isOpacity&&!S.options.animateFade)){anim(el,to);if(callback){callback()}return}var from=parseFloat(S.getStyle(el,property))||0;var delta=to-from;if(delta==0){if(callback){callback()}return}duration*=1000;var begin=now(),ease=S.ease,end=begin+duration,time;var interval=setInterval(function(){time=now();if(time>=end){clearInterval(interval);interval=null;anim(el,to);if(callback){callback()}}else{anim(el,from+ease((time-begin)/duration)*delta)}},10)}function setSize(){container.style.height=S.getWindowSize("Height")+"px";container.style.width=S.getWindowSize("Width")+"px"}function setPosition(){container.style.top=document.documentElement.scrollTop+"px";container.style.left=document.documentElement.scrollLeft+"px"}function toggleTroubleElements(on){if(on){each(visibilityCache,function(i,el){el[0].style.visibility=el[1]||""})}else{visibilityCache=[];each(S.options.troubleElements,function(i,tag){each(document.getElementsByTagName(tag),function(j,el){visibilityCache.push([el,el.style.visibility]);el.style.visibility="hidden"})})}}function toggleNav(id,on){var el=get("sb-nav-"+id);if(el){el.style.display=on?"":"none"}}function toggleLoading(on,callback){var loading=get("sb-loading"),playerName=S.getCurrent().player,anim=(playerName=="img"||playerName=="html");if(on){S.setOpacity(loading,0);loading.style.display="block";var wrapped=function(){S.clearOpacity(loading);if(callback){callback()}};if(anim){animate(loading,"opacity",1,S.options.fadeDuration,wrapped)}else{wrapped()}}else{var wrapped=function(){loading.style.display="none";S.clearOpacity(loading);if(callback){callback()}};if(anim){animate(loading,"opacity",0,S.options.fadeDuration,wrapped)}else{wrapped()}}}function buildBars(callback){var obj=S.getCurrent();get("sb-title-inner").innerHTML=obj.title||"";var close,next,play,pause,previous;if(S.options.displayNav){close=true;var len=S.gallery.length;if(len>1){if(S.options.continuous){next=previous=true}else{next=(len-1)>S.current;previous=S.current>0}}if(S.options.slideshowDelay>0&&S.hasNext()){pause=!S.isPaused();play=!pause}}else{close=next=play=pause=previous=false}toggleNav("close",close);toggleNav("next",next);toggleNav("play",play);toggleNav("pause",pause);toggleNav("previous",previous);var counter="";if(S.options.displayCounter&&S.gallery.length>1){var len=S.gallery.length;if(S.options.counterType=="skip"){var i=0,end=len,limit=parseInt(S.options.counterLimit)||0;if(limit<len&&limit>2){var h=Math.floor(limit/2);i=S.current-h;if(i<0){i+=len}end=S.current+(limit-h);if(end>len){end-=len}}while(i!=end){if(i==len){i=0}counter+='<a onclick="Shadowbox.change('+i+');"';if(i==S.current){counter+=' class="sb-counter-current"'}counter+=">"+(++i)+"</a>"}}else{counter=[S.current+1,S.lang.of,len].join(" ")}}get("sb-counter").innerHTML=counter;callback()}function showBars(callback){var titleInner=get("sb-title-inner"),infoInner=get("sb-info-inner"),duration=0.35;titleInner.style.visibility=infoInner.style.visibility="";if(titleInner.innerHTML!=""){animate(titleInner,"marginTop",0,duration)}animate(infoInner,"marginTop",0,duration,callback)}function hideBars(anim,callback){var title=get("sb-title"),info=get("sb-info"),titleHeight=title.offsetHeight,infoHeight=info.offsetHeight,titleInner=get("sb-title-inner"),infoInner=get("sb-info-inner"),duration=(anim?0.35:0);animate(titleInner,"marginTop",titleHeight,duration);animate(infoInner,"marginTop",infoHeight*-1,duration,function(){titleInner.style.visibility=infoInner.style.visibility="hidden";callback()})}function adjustHeight(height,top,anim,callback){var wrapperInner=get("sb-wrapper-inner"),duration=(anim?S.options.resizeDuration:0);animate(wrapper,"top",top,duration);animate(wrapperInner,"height",height,duration,callback)}function adjustWidth(width,left,anim,callback){var duration=(anim?S.options.resizeDuration:0);animate(wrapper,"left",left,duration);animate(wrapper,"width",width,duration,callback)}function setDimensions(height,width){var bodyInner=get("sb-body-inner"),height=parseInt(height),width=parseInt(width),topBottom=wrapper.offsetHeight-bodyInner.offsetHeight,leftRight=wrapper.offsetWidth-bodyInner.offsetWidth,maxHeight=overlay.offsetHeight,maxWidth=overlay.offsetWidth,padding=parseInt(S.options.viewportPadding)||20,preserveAspect=(S.player&&S.options.handleOversize!="drag");return S.setDimensions(height,width,maxHeight,maxWidth,topBottom,leftRight,padding,preserveAspect)}var K={};K.markup='<div id="sb-container"><div id="sb-overlay"></div><div id="sb-wrapper"><div id="sb-title"><div id="sb-title-inner"></div></div><div id="sb-wrapper-inner"><div id="sb-body"><div id="sb-body-inner"></div><div id="sb-loading"><div id="sb-loading-inner"><span>{loading}</span></div></div></div></div><div id="sb-info"><div id="sb-info-inner"><div id="sb-counter"></div><div id="sb-nav"><a id="sb-nav-close" title="{close}" onclick="Shadowbox.close()"></a><a id="sb-nav-next" title="{next}" onclick="Shadowbox.next()"></a><a id="sb-nav-play" title="{play}" onclick="Shadowbox.play()"></a><a id="sb-nav-pause" title="{pause}" onclick="Shadowbox.pause()"></a><a id="sb-nav-previous" title="{previous}" onclick="Shadowbox.previous()"></a></div></div></div></div></div>';K.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000",overlayOpacity:0.5,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]};K.init=function(){S.appendHTML(document.body,sprintf(K.markup,S.lang));K.body=get("sb-body-inner");container=get("sb-container");overlay=get("sb-overlay");wrapper=get("sb-wrapper");if(!supportsFixed){container.style.position="absolute"}if(!supportsOpacity){var el,m,re=/url\("(.*\.png)"\)/;each(pngIds,function(i,id){el=get(id);if(el){m=S.getStyle(el,"backgroundImage").match(re);if(m){el.style.backgroundImage="none";el.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+m[1]+",sizingMethod=scale);"}}})}var timer;addEvent(window,"resize",function(){if(timer){clearTimeout(timer);timer=null}if(open){timer=setTimeout(K.onWindowResize,10)}})};K.onOpen=function(obj,callback){doWindowResize=false;container.style.display="block";setSize();var dims=setDimensions(S.options.initialHeight,S.options.initialWidth);adjustHeight(dims.innerHeight,dims.top);adjustWidth(dims.width,dims.left);if(S.options.showOverlay){overlay.style.backgroundColor=S.options.overlayColor;S.setOpacity(overlay,0);if(!S.options.modal){addEvent(overlay,"click",S.close)}overlayOn=true}if(!supportsFixed){setPosition();addEvent(window,"scroll",setPosition)}toggleTroubleElements();container.style.visibility="visible";if(overlayOn){animate(overlay,"opacity",S.options.overlayOpacity,S.options.fadeDuration,callback)}else{callback()}};K.onLoad=function(changing,callback){toggleLoading(true);while(K.body.firstChild){remove(K.body.firstChild)}hideBars(changing,function(){if(!open){return}if(!changing){wrapper.style.visibility="visible"}buildBars(callback)})};K.onReady=function(callback){if(!open){return}var player=S.player,dims=setDimensions(player.height,player.width);var wrapped=function(){showBars(callback)};switch(S.options.animSequence){case"hw":adjustHeight(dims.innerHeight,dims.top,true,function(){adjustWidth(dims.width,dims.left,true,wrapped)});break;case"wh":adjustWidth(dims.width,dims.left,true,function(){adjustHeight(dims.innerHeight,dims.top,true,wrapped)});break;default:adjustWidth(dims.width,dims.left,true);adjustHeight(dims.innerHeight,dims.top,true,wrapped)}};K.onShow=function(callback){toggleLoading(false,callback);doWindowResize=true};K.onClose=function(){if(!supportsFixed){removeEvent(window,"scroll",setPosition)}removeEvent(overlay,"click",S.close);wrapper.style.visibility="hidden";var callback=function(){container.style.visibility="hidden";container.style.display="none";toggleTroubleElements(true)};if(overlayOn){animate(overlay,"opacity",0,S.options.fadeDuration,callback)}else{callback()}};K.onPlay=function(){toggleNav("play",false);toggleNav("pause",true)};K.onPause=function(){toggleNav("pause",false);toggleNav("play",true)};K.onWindowResize=function(){if(!doWindowResize){return}setSize();var player=S.player,dims=setDimensions(player.height,player.width);adjustWidth(dims.width,dims.left);adjustHeight(dims.innerHeight,dims.top);if(player.onWindowResize){player.onWindowResize()}};S.skin=K;window.Shadowbox=S})(window);
function setupDemos(){
Shadowbox.setup("a.mustang-gallery", {
gallery:        "mustang",
continuous:     true,
counterType:    "skip"
});
Shadowbox.setup("a.swf-gallery", {
gallery:    "swf",
continuous: true
});
Shadowbox.setup('a[title="Sweetness"]', {
width: 512,
height: 322,
flashVars: {
id:         "v2155043",
vid:        "2021599",
autoPlay:   1
},
flashParams: {
AllowScriptAccess: "always",
allowFullScreen: "true"
}});
Shadowbox.setup('a[title="The Last Eggtion Hero"]', {
height:     360,
width:      640,
flashVars:  {
clip_id:    "1893986",
autoplay:   "1"
}});
Shadowbox.setup('a[title="While My Ukulele Gently Weeps"]', {
height:     327,
width:      400,
flashVars:  {
docid:    "1352016870638076087",
autoplay: "1"
}});
Shadowbox.setup('a[title="Altaic Warrior - Clipped"]', {
handleOversize: "none"
});
Shadowbox.setup('a[title="Altaic Warrior - Draggable"]', {
handleOversize: "drag"
});
};
;(function ($){
$.flexslider=function(el, options){
var slider=$(el),
vars=$.extend({}, $.flexslider.defaults, options),
namespace=vars.namespace,
touch=("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch,
eventType=(touch) ? "touchend":"click",
vertical=vars.direction==="vertical",
reverse=vars.reverse,
carousel=(vars.itemWidth > 0),
fade=vars.animation==="fade",
asNav=vars.asNavFor!=="",
methods={};
$.data(el, "flexslider", slider);
methods={
init: function(){
slider.animating=false;
slider.currentSlide=vars.startAt;
slider.animatingTo=slider.currentSlide;
slider.atEnd=(slider.currentSlide===0||slider.currentSlide===slider.last);
slider.containerSelector=vars.selector.substr(0,vars.selector.search(' '));
slider.slides=$(vars.selector, slider);
slider.container=$(slider.containerSelector, slider);
slider.count=slider.slides.length;
slider.syncExists=$(vars.sync).length > 0;
if(vars.animation==="slide") vars.animation="swing";
slider.prop=(vertical) ? "top":"marginLeft";
slider.args={};
slider.manualPause=false;
slider.transitions = !vars.video&&!fade&&vars.useCSS&&(function(){
var obj=document.createElement('div'),
props=['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
for (var i in props){
if(obj.style[ props[i] ]!==undefined){
slider.pfx=props[i].replace('Perspective','').toLowerCase();
slider.prop="-" + slider.pfx + "-transform";
return true;
}}
return false;
}());
if(vars.controlsContainer!=="") slider.controlsContainer=$(vars.controlsContainer).length > 0&&$(vars.controlsContainer);
if(vars.manualControls!=="") slider.manualControls=$(vars.manualControls).length > 0&&$(vars.manualControls);
if(vars.randomize){
slider.slides.sort(function(){ return (Math.round(Math.random())-0.5); });
slider.container.empty().append(slider.slides);
}
slider.doMath();
if(asNav) methods.asNav.setup();
slider.setup("init");
if(vars.controlNav) methods.controlNav.setup();
if(vars.directionNav) methods.directionNav.setup();
if(vars.keyboard&&($(slider.containerSelector).length===1||vars.multipleKeyboard)){
$(document).bind('keyup', function(event){
var keycode=event.keyCode;
if(!slider.animating&&(keycode===39||keycode===37)){
var target=(keycode===39) ? slider.getTarget('next') :
(keycode===37) ? slider.getTarget('prev'):false;
slider.flexAnimate(target, vars.pauseOnAction);
}});
}
if(vars.mousewheel){
slider.bind('mousewheel', function(event, delta, deltaX, deltaY){
event.preventDefault();
var target=(delta < 0) ? slider.getTarget('next'):slider.getTarget('prev');
slider.flexAnimate(target, vars.pauseOnAction);
});
}
if(vars.pausePlay) methods.pausePlay.setup();
if(vars.slideshow){
if(vars.pauseOnHover){
slider.hover(function(){
if(!slider.manualPlay&&!slider.manualPause) slider.pause();
}, function(){
if(!slider.manualPause&&!slider.manualPlay) slider.play();
});
}
(vars.initDelay > 0) ? setTimeout(slider.play, vars.initDelay):slider.play();
}
if(touch&&vars.touch) methods.touch();
if(!fade||(fade&&vars.smoothHeight)) $(window).bind("resize focus", methods.resize);
setTimeout(function(){
vars.start(slider);
}, 200);
},
asNav: {
setup: function(){
slider.asNav=true;
slider.animatingTo=Math.floor(slider.currentSlide/slider.move);
slider.currentItem=slider.currentSlide;
slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
slider.slides.click(function(e){
e.preventDefault();
var $slide=$(this),
target=$slide.index();
if(!$(vars.asNavFor).data('flexslider').animating&&!$slide.hasClass('active')){
slider.direction=(slider.currentItem < target) ? "next":"prev";
slider.flexAnimate(target, vars.pauseOnAction, false, true, true);
}});
}},
controlNav: {
setup: function(){
if(!slider.manualControls){
methods.controlNav.setupPaging();
}else{
methods.controlNav.setupManual();
}},
setupPaging: function(){
var type=(vars.controlNav==="thumbnails") ? 'control-thumbs':'control-paging',
j=1,
item;
slider.controlNavScaffold=$('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
if(slider.pagingCount > 1){
for (var i=0; i < slider.pagingCount; i++){
item=(vars.controlNav==="thumbnails") ? '<img src="' + slider.slides.eq(i).attr("data-thumb") + '"/>':'<a>' + j + '</a>';
slider.controlNavScaffold.append('<li>' + item + '</li>');
j++;
}}
(slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold):slider.append(slider.controlNavScaffold);
methods.controlNav.set();
methods.controlNav.active();
slider.controlNavScaffold.delegate('a, img', eventType, function(event){
event.preventDefault();
var $this=$(this),
target=slider.controlNav.index($this);
if(!$this.hasClass(namespace + 'active')){
slider.direction=(target > slider.currentSlide) ? "next":"prev";
slider.flexAnimate(target, vars.pauseOnAction);
}});
if(touch){
slider.controlNavScaffold.delegate('a', "click touchstart", function(event){
event.preventDefault();
});
}},
setupManual: function(){
slider.controlNav=slider.manualControls;
methods.controlNav.active();
slider.controlNav.live(eventType, function(event){
event.preventDefault();
var $this=$(this),
target=slider.controlNav.index($this);
if(!$this.hasClass(namespace + 'active')){
(target > slider.currentSlide) ? slider.direction="next":slider.direction="prev";
slider.flexAnimate(target, vars.pauseOnAction);
}});
if(touch){
slider.controlNav.live("click touchstart", function(event){
event.preventDefault();
});
}},
set: function(){
var selector=(vars.controlNav==="thumbnails") ? 'img':'a';
slider.controlNav=$('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer:slider);
},
active: function(){
slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
},
update: function(action, pos){
if(slider.pagingCount > 1&&action==="add"){
slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
}else if(slider.pagingCount===1){
slider.controlNavScaffold.find('li').remove();
}else{
slider.controlNav.eq(pos).closest('li').remove();
}
methods.controlNav.set();
(slider.pagingCount > 1&&slider.pagingCount!==slider.controlNav.length) ? slider.update(pos, action):methods.controlNav.active();
}},
directionNav: {
setup: function(){
var directionNavScaffold=$('<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + vars.nextText + '</a></li></ul>');
if(slider.controlsContainer){
$(slider.controlsContainer).append(directionNavScaffold);
slider.directionNav=$('.' + namespace + 'direction-nav li a', slider.controlsContainer);
}else{
slider.append(directionNavScaffold);
slider.directionNav=$('.' + namespace + 'direction-nav li a', slider);
}
methods.directionNav.update();
slider.directionNav.bind(eventType, function(event){
event.preventDefault();
var target=($(this).hasClass(namespace + 'next')) ? slider.getTarget('next'):slider.getTarget('prev');
slider.flexAnimate(target, vars.pauseOnAction);
});
if(touch){
slider.directionNav.bind("click touchstart", function(event){
event.preventDefault();
});
}},
update: function(){
var disabledClass=namespace + 'disabled';
if(slider.pagingCount===1){
slider.directionNav.addClass(disabledClass);
}else if(!vars.animationLoop){
if(slider.animatingTo===0){
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass);
}else if(slider.animatingTo===slider.last){
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass);
}else{
slider.directionNav.removeClass(disabledClass);
}}else{
slider.directionNav.removeClass(disabledClass);
}}
},
pausePlay: {
setup: function(){
var pausePlayScaffold=$('<div class="' + namespace + 'pauseplay"><a></a></div>');
if(slider.controlsContainer){
slider.controlsContainer.append(pausePlayScaffold);
slider.pausePlay=$('.' + namespace + 'pauseplay a', slider.controlsContainer);
}else{
slider.append(pausePlayScaffold);
slider.pausePlay=$('.' + namespace + 'pauseplay a', slider);
}
methods.pausePlay.update((vars.slideshow) ? namespace + 'pause':namespace + 'play');
slider.pausePlay.bind(eventType, function(event){
event.preventDefault();
if($(this).hasClass(namespace + 'pause')){
slider.manualPause=true;
slider.manualPlay=false;
slider.pause();
}else{
slider.manualPause=false;
slider.manualPlay=true;
slider.play();
}});
if(touch){
slider.pausePlay.bind("click touchstart", function(event){
event.preventDefault();
});
}},
update: function(state){
(state==="play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').text(vars.playText):slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').text(vars.pauseText);
}},
touch: function(){
var startX,
startY,
offset,
cwidth,
dx,
startT,
scrolling=false;
el.addEventListener('touchstart', onTouchStart, false);
function onTouchStart(e){
if(slider.animating){
e.preventDefault();
}else if(e.touches.length===1){
slider.pause();
cwidth=(vertical) ? slider.h:slider. w;
startT=Number(new Date());
offset=(carousel&&reverse&&slider.animatingTo===slider.last) ? 0 :
(carousel&&reverse) ? slider.limit - (((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo) :
(carousel&&slider.currentSlide===slider.last) ? slider.limit :
(carousel) ? ((slider.itemW + vars.itemMargin) * slider.move) * slider.currentSlide :
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth:(slider.currentSlide + slider.cloneOffset) * cwidth;
startX=(vertical) ? e.touches[0].pageY:e.touches[0].pageX;
startY=(vertical) ? e.touches[0].pageX:e.touches[0].pageY;
el.addEventListener('touchmove', onTouchMove, false);
el.addEventListener('touchend', onTouchEnd, false);
}}
function onTouchMove(e){
dx=(vertical) ? startX - e.touches[0].pageY:startX - e.touches[0].pageX;
scrolling=(vertical) ? (Math.abs(dx) < Math.abs(e.touches[0].pageX - startY)):(Math.abs(dx) < Math.abs(e.touches[0].pageY - startY));
if(!scrolling||Number(new Date()) - startT > 500){
e.preventDefault();
if(!fade&&slider.transitions){
if(!vars.animationLoop){
dx=dx/((slider.currentSlide===0&&dx < 0||slider.currentSlide===slider.last&&dx > 0) ? (Math.abs(dx)/cwidth+2):1);
}
slider.setProps(offset + dx, "setTouch");
}}
}
function onTouchEnd(e){
el.removeEventListener('touchmove', onTouchMove, false);
if(slider.animatingTo===slider.currentSlide&&!scrolling&&!(dx===null)){
var updateDx=(reverse) ? -dx:dx,
target=(updateDx > 0) ? slider.getTarget('next'):slider.getTarget('prev');
if(slider.canAdvance(target)&&(Number(new Date()) - startT < 550&&Math.abs(updateDx) > 50||Math.abs(updateDx) > cwidth/2)){
slider.flexAnimate(target, vars.pauseOnAction);
}else{
if(!fade) slider.flexAnimate(slider.currentSlide, vars.pauseOnAction, true);
}}
el.removeEventListener('touchend', onTouchEnd, false);
startX=null;
startY=null;
dx=null;
offset=null;
}},
resize: function(){
if(!slider.animating&&slider.is(':visible')){
if(!carousel) slider.doMath();
if(fade){
methods.smoothHeight();
}else if(carousel){
slider.slides.width(slider.computedW);
slider.update(slider.pagingCount);
slider.setProps();
}
else if(vertical){
slider.viewport.height(slider.h);
slider.setProps(slider.h, "setTotal");
}else{
if(vars.smoothHeight) methods.smoothHeight();
slider.newSlides.width(slider.computedW);
slider.setProps(slider.computedW, "setTotal");
}}
},
smoothHeight: function(dur){
if(!vertical||fade){
var $obj=(fade) ? slider:slider.viewport;
(dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur):$obj.height(slider.slides.eq(slider.animatingTo).height());
}},
sync: function(action){
var $obj=$(vars.sync).data("flexslider"),
target=slider.animatingTo;
switch (action){
case "animate": $obj.flexAnimate(target, vars.pauseOnAction, false, true); break;
case "play": if(!$obj.playing&&!$obj.asNav){ $obj.play(); } break;
case "pause": $obj.pause(); break;
}}
}
slider.flexAnimate=function(target, pause, override, withSync, fromNav){
if(asNav&&slider.pagingCount===1) slider.direction=(slider.currentItem < target) ? "next":"prev";
if(!slider.animating&&(slider.canAdvance(target, fromNav)||override)&&slider.is(":visible")){
if(asNav&&withSync){
var master=$(vars.asNavFor).data('flexslider');
slider.atEnd=target===0||target===slider.count - 1;
master.flexAnimate(target, true, false, true, fromNav);
slider.direction=(slider.currentItem < target) ? "next":"prev";
master.direction=slider.direction;
if(Math.ceil((target + 1)/slider.visible) - 1!==slider.currentSlide&&target!==0){
slider.currentItem=target;
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
target=Math.floor(target/slider.visible);
}else{
slider.currentItem=target;
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
return false;
}}
slider.animating=true;
slider.animatingTo=target;
vars.before(slider);
if(pause) slider.pause();
if(slider.syncExists&&!fromNav) methods.sync("animate");
if(vars.controlNav) methods.controlNav.active();
if(!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide');
slider.atEnd=target===0||target===slider.last;
if(vars.directionNav) methods.directionNav.update();
if(target===slider.last){
vars.end(slider);
if(!vars.animationLoop) slider.pause();
}
if(!fade){
var dimension=(vertical) ? slider.slides.filter(':first').height():slider.computedW,
margin, slideString, calcNext;
if(carousel){
margin=(vars.itemWidth > slider.w) ? vars.itemMargin * 2:vars.itemMargin;
calcNext=((slider.itemW + margin) * slider.move) * slider.animatingTo;
slideString=(calcNext > slider.limit&&slider.visible!==1) ? slider.limit:calcNext;
}else if(slider.currentSlide===0&&target===slider.count - 1&&vars.animationLoop&&slider.direction!=="next"){
slideString=(reverse) ? (slider.count + slider.cloneOffset) * dimension:0;
}else if(slider.currentSlide===slider.last&&target===0&&vars.animationLoop&&slider.direction!=="prev"){
slideString=(reverse) ? 0:(slider.count + 1) * dimension;
}else{
slideString=(reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension:(target + slider.cloneOffset) * dimension;
}
slider.setProps(slideString, "", vars.animationSpeed);
if(slider.transitions){
if(!vars.animationLoop||!slider.atEnd){
slider.animating=false;
slider.currentSlide=slider.animatingTo;
}
slider.container.unbind("webkitTransitionEnd transitionend");
slider.container.bind("webkitTransitionEnd transitionend", function(){
slider.wrapup(dimension);
});
}else{
slider.container.animate(slider.args, vars.animationSpeed, vars.easing, function(){
slider.wrapup(dimension);
});
}}else{
if(!touch){
slider.slides.eq(slider.currentSlide).fadeOut(vars.animationSpeed, vars.easing);
slider.slides.eq(target).fadeIn(vars.animationSpeed, vars.easing, slider.wrapup);
}else{
slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
slider.animating=false;
slider.currentSlide=slider.animatingTo;
}}
if(vars.smoothHeight) methods.smoothHeight(vars.animationSpeed);
}}
slider.wrapup=function(dimension){
if(!fade&&!carousel){
if(slider.currentSlide===0&&slider.animatingTo===slider.last&&vars.animationLoop){
slider.setProps(dimension, "jumpEnd");
}else if(slider.currentSlide===slider.last&&slider.animatingTo===0&&vars.animationLoop){
slider.setProps(dimension, "jumpStart");
}}
slider.animating=false;
slider.currentSlide=slider.animatingTo;
vars.after(slider);
}
slider.animateSlides=function(){
if(!slider.animating) slider.flexAnimate(slider.getTarget("next"));
}
slider.pause=function(){
clearInterval(slider.animatedSlides);
slider.playing=false;
if(vars.pausePlay) methods.pausePlay.update("play");
if(slider.syncExists) methods.sync("pause");
}
slider.play=function(){
slider.animatedSlides=setInterval(slider.animateSlides, vars.slideshowSpeed);
slider.playing=true;
if(vars.pausePlay) methods.pausePlay.update("pause");
if(slider.syncExists) methods.sync("play");
}
slider.canAdvance=function(target, fromNav){
var last=(asNav) ? slider.pagingCount - 1:slider.last;
return (fromNav) ? true :
(asNav&&slider.currentItem===slider.count - 1&&target===0&&slider.direction==="prev") ? true :
(asNav&&slider.currentItem===0&&target===slider.pagingCount - 1&&slider.direction!=="next") ? false :
(target===slider.currentSlide&&!asNav) ? false :
(vars.animationLoop) ? true :
(slider.atEnd&&slider.currentSlide===0&&target===last&&slider.direction!=="next") ? false :
(slider.atEnd&&slider.currentSlide===last&&target===0&&slider.direction==="next") ? false :
true;
}
slider.getTarget=function(dir){
slider.direction=dir;
if(dir==="next"){
return (slider.currentSlide===slider.last) ? 0:slider.currentSlide + 1;
}else{
return (slider.currentSlide===0) ? slider.last:slider.currentSlide - 1;
}}
slider.setProps=function(pos, special, dur){
var target=(function(){
var posCheck=(pos) ? pos:((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo,
posCalc=(function(){
if(carousel){
return (special==="setTouch") ? pos :
(reverse&&slider.animatingTo===slider.last) ? 0 :
(reverse) ? slider.limit - (((slider.itemW + vars.itemMargin) * slider.move) * slider.animatingTo) :
(slider.animatingTo===slider.last) ? slider.limit:posCheck;
}else{
switch (special){
case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos:(slider.currentSlide + slider.cloneOffset) * pos;
case "setTouch": return (reverse) ? pos:pos;
case "jumpEnd": return (reverse) ? pos:slider.count * pos;
case "jumpStart": return (reverse) ? slider.count * pos:pos;
default: return pos;
}}
}());
return (posCalc * -1) + "px";
}());
if(slider.transitions){
target=(vertical) ? "translate3d(0," + target + ",0)":"translate3d(" + target + ",0,0)";
dur=(dur!==undefined) ? (dur/1000) + "s":"0s";
slider.container.css("-" + slider.pfx + "-transition-duration", dur);
}
slider.args[slider.prop]=target;
if(slider.transitions||dur===undefined) slider.container.css(slider.args);
}
slider.setup=function(type){
if(!fade){
var sliderOffset, arr;
if(type==="init"){
slider.viewport=$('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
slider.cloneCount=0;
slider.cloneOffset=0;
if(reverse){
arr=$.makeArray(slider.slides).reverse();
slider.slides=$(arr);
slider.container.empty().append(slider.slides);
}}
if(vars.animationLoop&&!carousel){
slider.cloneCount=2;
slider.cloneOffset=1;
if(type!=="init") slider.container.find('.clone').remove();
slider.container.append(slider.slides.first().clone().addClass('clone')).prepend(slider.slides.last().clone().addClass('clone'));
}
slider.newSlides=$(vars.selector, slider);
sliderOffset=(reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset:slider.currentSlide + slider.cloneOffset;
if(vertical&&!carousel){
slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
setTimeout(function(){
slider.newSlides.css({"display": "block"});
slider.doMath();
slider.viewport.height(slider.h);
slider.setProps(sliderOffset * slider.h, "init");
}, (type==="init") ? 100:0);
}else{
slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
slider.setProps(sliderOffset * slider.computedW, "init");
setTimeout(function(){
slider.doMath();
slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
if(vars.smoothHeight) methods.smoothHeight();
}, (type==="init") ? 100:0);
}}else{
slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
if(type==="init"){
if(!touch){
slider.slides.eq(slider.currentSlide).fadeIn(vars.animationSpeed, vars.easing);
}else{
slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
}}
if(vars.smoothHeight) methods.smoothHeight();
}
if(!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide");
}
slider.doMath=function(){
var slide=slider.slides.first(),
slideMargin=vars.itemMargin,
minItems=vars.minItems,
maxItems=vars.maxItems;
slider.w=slider.width();
slider.h=slide.height();
slider.boxPadding=slide.outerWidth() - slide.width();
if(carousel){
slider.itemT=vars.itemWidth + slideMargin;
slider.minW=(minItems) ? minItems * slider.itemT:slider.w;
slider.maxW=(maxItems) ? maxItems * slider.itemT:slider.w;
slider.itemW=(slider.minW > slider.w) ? (slider.w - (slideMargin * minItems))/minItems :
(slider.maxW < slider.w) ? (slider.w - (slideMargin * maxItems))/maxItems :
(vars.itemWidth > slider.w) ? slider.w:vars.itemWidth;
slider.visible=Math.floor(slider.w/(slider.itemW + slideMargin));
slider.move=(vars.move > 0&&vars.move < slider.visible) ? vars.move:slider.visible;
slider.pagingCount=Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
slider.last=slider.pagingCount - 1;
slider.limit=(slider.pagingCount===1) ? 0 :
(vars.itemWidth > slider.w) ? ((slider.itemW + (slideMargin * 2)) * slider.count) - slider.w - slideMargin:((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
}else{
slider.itemW=slider.w;
slider.pagingCount=slider.count;
slider.last=slider.count - 1;
}
slider.computedW=slider.itemW - slider.boxPadding;
}
slider.update=function(pos, action){
slider.doMath();
if(!carousel){
if(pos < slider.currentSlide){
slider.currentSlide +=1;
}else if(pos <=slider.currentSlide&&pos!==0){
slider.currentSlide -=1;
}
slider.animatingTo=slider.currentSlide;
}
if(vars.controlNav&&!slider.manualControls){
if((action==="add"&&!carousel)||slider.pagingCount > slider.controlNav.length){
methods.controlNav.update("add");
}else if((action==="remove"&&!carousel)||slider.pagingCount < slider.controlNav.length){
if(carousel&&slider.currentSlide > slider.last){
slider.currentSlide -=1;
slider.animatingTo -=1;
}
methods.controlNav.update("remove", slider.last);
}}
if(vars.directionNav) methods.directionNav.update();
}
slider.addSlide=function(obj, pos){
var $obj=$(obj);
slider.count +=1;
slider.last=slider.count - 1;
if(vertical&&reverse){
(pos!==undefined) ? slider.slides.eq(slider.count - pos).after($obj):slider.container.prepend($obj);
}else{
(pos!==undefined) ? slider.slides.eq(pos).before($obj):slider.container.append($obj);
}
slider.update(pos, "add");
slider.slides=$(vars.selector + ':not(.clone)', slider);
slider.setup();
vars.added(slider);
}
slider.removeSlide=function(obj){
var pos=(isNaN(obj)) ? slider.slides.index($(obj)):obj;
slider.count -=1;
slider.last=slider.count - 1;
if(isNaN(obj)){
$(obj, slider.slides).remove();
}else{
(vertical&&reverse) ? slider.slides.eq(slider.last).remove():slider.slides.eq(obj).remove();
}
slider.doMath();
slider.update(pos, "remove");
slider.slides=$(vars.selector + ':not(.clone)', slider);
slider.setup();
vars.removed(slider);
}
methods.init();
}
$.flexslider.defaults={
namespace: "flex-",
selector: ".slides > li",
animation: "fade",
easing: "swing",
direction: "horizontal",
reverse: false,
animationLoop: true,
smoothHeight: false,
startAt: 0,
slideshow: true,
slideshowSpeed: 7000,
animationSpeed: 600,
initDelay: 0,
randomize: false,
pauseOnAction: true,
pauseOnHover: false,
useCSS: true,
touch: true,
video: false,
controlNav: true,
directionNav: true,
prevText: "Previous",
nextText: "Next",
keyboard: true,
multipleKeyboard: false,
mousewheel: false,
pausePlay: false,
pauseText: "Pause",
playText: "Play",
controlsContainer: "",
manualControls: "",
sync: "",
asNavFor: "",
itemWidth: 0,
itemMargin: 0,
minItems: 0,
maxItems: 0,
move: 0,
start: function(){},
before: function(){},
after: function(){},
end: function(){},
added: function(){},
removed: function(){}}
$.fn.flexslider=function(options){
if(options===undefined) options={};
if(typeof options==="object"){
return this.each(function(){
var $this=$(this),
selector=(options.selector) ? options.selector:".slides > li",
$slides=$this.find(selector);
if($slides.length===1){
$slides.fadeIn(400);
if(options.start) options.start($this);
}else if($this.data('flexslider')===undefined){
new $.flexslider(this, options);
}});
}else{
var $slider=$(this).data('flexslider');
switch (options){
case "play": $slider.play(); break;
case "pause": $slider.pause(); break;
case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
case "prev":
case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
default: if(typeof options==="number") $slider.flexAnimate(options, true);
}}
}})(jQuery);
jQuery(function(){
jQuery('.flexslider').flexslider();
});
(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(window,function(n,r){var i,o,l,s,f,u,c,a,h,d,p,y,v,w,g,m;i=n(r);a=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;c={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};this.element[u]=this.id;c[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||a)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(a&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete c[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=this.element[w])!=null?o:[];i.push(this.id);this.element[w]=i}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=t[w];if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;e=n.extend({},n.fn[g].defaults,e);if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=c[i[0][u]];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke.call(this,"disable")},enable:function(){return d._invoke.call(this,"enable")},destroy:function(){return d._invoke.call(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t){this.each(function(){var e;e=l.getWaypointsByElement(this);return n.each(e,function(e,n){n[t]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(c,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=c[n(t)[0][u]])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=c[n(t)[0][u]];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.on("load.waypoints",function(){return n[m]("refresh")})})}).call(this);
(function($){
$.fn.hoverIntent=function(f, g){
var cfg={
sensitivity: 7,
interval: 100,
timeout: 0
};
cfg=$.extend(cfg, g ? {
over: f,
out: g
}:f);
var cX, cY, pX, pY;
var track=function(ev){
cX=ev.pageX;
cY=ev.pageY;
};
var compare=function(ev, ob){
ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);
if((Math.abs(pX - cX) + Math.abs(pY - cY)) < cfg.sensitivity){
$(ob).unbind("mousemove", track);
ob.hoverIntent_s=1;
return cfg.over.apply(ob, [ev]);
}else{
pX=cX;
pY=cY;
ob.hoverIntent_t=setTimeout(function(){
compare(ev, ob);
}, cfg.interval);
}};
var delay=function(ev, ob){
ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);
ob.hoverIntent_s=0;
return cfg.out.apply(ob, [ev]);
};
var handleHover=function(e){
var p=(e.type=="mouseover" ? e.fromElement:e.toElement)||e.relatedTarget;
while (p&&p!=this){
try {
p=p.parentNode;
} catch (e){
p=this;
}}
if(p==this){
return false;
}
var ev=jQuery.extend({}, e);
var ob=this;
if(ob.hoverIntent_t){
ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);
}
if(e.type=="mouseover"){
pX=ev.pageX;
pY=ev.pageY;
$(ob).bind("mousemove", track);
if(ob.hoverIntent_s!=1){
ob.hoverIntent_t=setTimeout(function(){
compare(ev, ob);
}, cfg.interval);
}}else{
$(ob).unbind("mousemove", track);
if(ob.hoverIntent_s==1){
ob.hoverIntent_t=setTimeout(function(){
delay(ev, ob);
}, cfg.timeout);
}}
};
return this.mouseover(handleHover).mouseout(handleHover);
};})(jQuery);
(function($){
$.fn.dcMegaMenu=function(options){
var defaults={
classParent: 'dc-mega',
classContainer: 'sub-container',
classSubParent: 'mega-hdr',
classSubLink: 'mega-hdr',
classWidget: 'dc-extra',
rowItems: 3,
speed: 'medium',
effect: 'fade',
event: 'hover',
fullWidth: false,
onLoad: function(){},
beforeOpen: function(){},
beforeClose: function(){}};
var options=$.extend(defaults, options);
var $dcMegaMenuObj=this;
return $dcMegaMenuObj.each(function(options){
var clSubParent=defaults.classSubParent;
var clSubLink=defaults.classSubLink;
var clParent=defaults.classParent;
var clContainer=defaults.classContainer;
var clWidget=defaults.classWidget;
megaSetup();
function megaOver(){
var subNav=$('.sub', this);
$(this).addClass('mega-hover');
if(defaults.effect=='fade'){
$(subNav).fadeIn(defaults.speed)
}
if(defaults.effect=='slide'){
$(subNav).show(defaults.speed)
}
defaults.beforeOpen.call(this)
}
function megaAction(obj){
var subNav=$('.sub', obj);
$(obj).addClass('mega-hover');
if(defaults.effect=='fade'){
$(subNav).fadeIn(defaults.speed)
}
if(defaults.effect=='slide'){
$(subNav).show(defaults.speed)
}
defaults.beforeOpen.call(this)
}
function megaOut(){
var subNav=$('.sub', this);
$(this).removeClass('mega-hover');
$(subNav).slideUp('medium');
defaults.beforeClose.call(this)
}
function megaActionClose(obj){
var subNav=$('.sub', obj);
$(obj).removeClass('mega-hover');
$(subNav).slideUp('medium');
defaults.beforeClose.call(this)
}
function megaReset(){
$('li', $dcMegaMenuObj).removeClass('mega-hover');
$('.sub', $dcMegaMenuObj).hide()
}
function megaSetup(){
$arrow='<span class="dc-mega-icon"></span>';
var clParentLi=clParent + '-li';
var menuWidth=$dcMegaMenuObj.outerWidth();
$('> li', $dcMegaMenuObj).each(function(){
var $mainSub=$('> ul', this);
var $primaryLink=$('> a', this);
if($mainSub.length){
$primaryLink.addClass(clParent).append($arrow);
$mainSub.addClass('sub').wrap('<div class="' + clContainer + '" />');
var pos=$(this).position();
pl=pos.left;
if($('ul', $mainSub).length){
$(this).addClass(clParentLi);
$('.' + clContainer, this).addClass('mega');
$('> li', $mainSub).each(function(){
if(!$(this).hasClass(clWidget)){
$(this).addClass('mega-unit');
if($('> ul', this).length){
$(this).addClass(clSubParent);
$('> a', this).addClass(clSubParent + '-a')
}else{
$(this).addClass(clSubLink);
$('> a', this).addClass(clSubLink + '-a')
}}
});
var hdrs=$('.mega-unit', this);
rowSize=parseInt(defaults.rowItems);
for (var i=0; i < hdrs.length; i +=rowSize){
hdrs.slice(i, i + rowSize).wrapAll('<div class="row" />')
}
$mainSub.show();
var pw=$(this).width();
var pr=pl + pw;
var mr=menuWidth - pr;
var subw=$mainSub.outerWidth();
var totw=$mainSub.parent('.' + clContainer).outerWidth();
var cpad=totw - subw;
if(defaults.fullWidth==true){
var fw=menuWidth - cpad;
$mainSub.parent('.' + clContainer).css({
width: fw + 'px'
});
$dcMegaMenuObj.addClass('full-width')
}
var iw=$('.mega-unit', $mainSub).outerWidth(true);
var rowItems=$('.row:eq(0) .mega-unit', $mainSub).length;
var inneriw=iw * rowItems;
var totiw=inneriw + cpad;
$('.row', this).each(function(){
$('.mega-unit:last', this).addClass('last');
var maxValue=undefined;
$('.mega-unit > a', this).each(function(){
var val=parseInt($(this).height());
if(maxValue===undefined||maxValue < val){
maxValue=val
}});
$('.mega-unit > a', this).css('height', maxValue + 'px');
$(this).css('width', inneriw + 'px')
});
var ml=mr < ml ? ml + ml - mr:(totiw - pw) / 2;
var subLeft=pl - ml;
var params={
left: pl + 'px',
marginLeft: -ml + 'px'
};
if(subLeft < 0||defaults.fullWidth==true){
params={
left: 0
}}else if(mr < ml){
params={
right: 0
}}
$('.' + clContainer, this).css(params);
$('.row', $mainSub).each(function(){
var rh=$(this).height();
$('.mega-unit', this).css({
height: rh + 'px'
});
$(this).parent('.row').css({
height: rh + 'px'
})
});
$mainSub.hide()
}else{
$('.' + clContainer, this).addClass('non-mega').css('left', pl + 'px')
}}
});
var menuHeight=$('> li > a', $dcMegaMenuObj).outerHeight(true);
$('.' + clContainer, $dcMegaMenuObj).css({
top: menuHeight + 'px'
}).css('z-index', '1000');
if(defaults.event=='hover'){
var config={
sensitivity: 2,
interval: 100,
over: megaOver,
timeout: 400,
out: megaOut
};
$('li', $dcMegaMenuObj).hoverIntent(config)
}
if(defaults.event=='click'){
$('body').mouseup(function(e){
if(!$(e.target).parents('.mega-hover').length){
megaReset()
}});
$('> li > a.' + clParent, $dcMegaMenuObj).click(function(e){
var $parentLi=$(this).parent();
if($parentLi.hasClass('mega-hover')){
megaActionClose($parentLi)
}else{
megaAction($parentLi)
}
e.preventDefault()
})
}
defaults.onLoad.call(this)
}})
}})(jQuery);
(function ($){
$.fn.extend({
easyResponsiveTabs: function (options){
var defaults={
type: 'default',
width: 'auto',
fit: true,
closed: false,
activate: function(){}}
var options=$.extend(defaults, options);
var opt=options, jtype=opt.type, jfit=opt.fit, jwidth=opt.width, vtabs='vertical', accord='accordion';
var hash=window.location.hash;
var historyApi = !!(window.history&&history.replaceState);
$(this).bind('tabactivate', function(e, currentTab){
if(typeof options.activate==='function'){
options.activate.call(currentTab, e)
}});
this.each(function (){
var $respTabs=$(this);
var $respTabsList=$respTabs.find('ul.resp-tabs-list');
var respTabsId=$respTabs.attr('id');
$respTabs.find('ul.resp-tabs-list li').addClass('resp-tab-item');
$respTabs.css({
'display': 'block',
'width': jwidth
});
$respTabs.find('.resp-tabs-container > div').addClass('resp-tab-content');
jtab_options();
function jtab_options(){
if(jtype==vtabs){
$respTabs.addClass('resp-vtabs');
}
if(jfit==true){
$respTabs.css({ width: '100%', margin: '0px' });
}
if(jtype==accord){
$respTabs.addClass('resp-easy-accordion');
$respTabs.find('.resp-tabs-list').css('display', 'none');
}}
var $tabItemh2;
$respTabs.find('.resp-tab-content').before("<h2 class='resp-accordion' role='tab'><span class='resp-arrow'></span></h2>");
var itemCount=0;
$respTabs.find('.resp-accordion').each(function (){
$tabItemh2=$(this);
var $tabItem=$respTabs.find('.resp-tab-item:eq(' + itemCount + ')');
var $accItem=$respTabs.find('.resp-accordion:eq(' + itemCount + ')');
$accItem.append($tabItem.html());
$accItem.data($tabItem.data());
$tabItemh2.attr('aria-controls', 'tab_item-' + (itemCount));
itemCount++;
});
var count=0,
$tabContent;
$respTabs.find('.resp-tab-item').each(function (){
$tabItem=$(this);
$tabItem.attr('aria-controls', 'tab_item-' + (count));
$tabItem.attr('role', 'tab');
var tabcount=0;
$respTabs.find('.resp-tab-content').each(function (){
$tabContent=$(this);
$tabContent.attr('aria-labelledby', 'tab_item-' + (tabcount));
tabcount++;
});
count++;
});
var tabNum=0;
if(hash!=''){
var matches=hash.match(new RegExp(respTabsId+"([0-9]+)"));
if(matches!==null&&matches.length===2){
tabNum=parseInt(matches[1],10)-1;
if(tabNum > count){
tabNum=0;
}}
}
$($respTabs.find('.resp-tab-item')[tabNum]).addClass('resp-tab-active');
if(options.closed!==true&&!(options.closed==='accordion'&&!$respTabsList.is(':visible'))&&!(options.closed==='tabs'&&$respTabsList.is(':visible'))){
$($respTabs.find('.resp-accordion')[tabNum]).addClass('resp-tab-active');
$($respTabs.find('.resp-tab-content')[tabNum]).addClass('resp-tab-content-active').attr('style', 'display:block');
}else{
$($respTabs.find('.resp-tab-content')[tabNum]).addClass('resp-tab-content-active resp-accordion-closed')
}
$respTabs.find("[role=tab]").each(function (){
var $currentTab=$(this);
$currentTab.click(function (){
var $currentTab=$(this);
var $tabAria=$currentTab.attr('aria-controls');
if($currentTab.hasClass('resp-accordion')&&$currentTab.hasClass('resp-tab-active')){
$respTabs.find('.resp-tab-content-active').slideUp('', function (){ $(this).addClass('resp-accordion-closed'); });
$currentTab.removeClass('resp-tab-active');
return false;
}
if(!$currentTab.hasClass('resp-tab-active')&&$currentTab.hasClass('resp-accordion')){
$respTabs.find('.resp-tab-active').removeClass('resp-tab-active');
$respTabs.find('.resp-tab-content-active').slideUp().removeClass('resp-tab-content-active resp-accordion-closed');
$respTabs.find("[aria-controls=" + $tabAria + "]").addClass('resp-tab-active');
$respTabs.find('.resp-tab-content[aria-labelledby=' + $tabAria + ']').slideDown().addClass('resp-tab-content-active');
}else{
$respTabs.find('.resp-tab-active').removeClass('resp-tab-active');
$respTabs.find('.resp-tab-content-active').removeAttr('style').removeClass('resp-tab-content-active').removeClass('resp-accordion-closed');
$respTabs.find("[aria-controls=" + $tabAria + "]").addClass('resp-tab-active');
$respTabs.find('.resp-tab-content[aria-labelledby=' + $tabAria + ']').addClass('resp-tab-content-active').attr('style', 'display:block');
}
$currentTab.trigger('tabactivate', $currentTab);
if(historyApi){
var currentHash=window.location.hash;
var newHash=respTabsId+(parseInt($tabAria.substring(9),10)+1).toString();
if(currentHash!=""){
var re=new RegExp(respTabsId+"[0-9]+");
if(currentHash.match(re)!=null){
newHash=currentHash.replace(re,newHash);
}else{
newHash=currentHash+"|"+newHash;
}}else{
newHash='#'+newHash;
}
history.replaceState(null,null,newHash);
}});
});
$(window).resize(function (){
$respTabs.find('.resp-accordion-closed').removeAttr('style');
});
});
}});
})(jQuery);
(function(a){a.extend(a.fn,{swapClass:function(e,d){var c=this.filter("."+e);this.filter("."+d).removeClass(d).addClass(e);c.removeClass(e).addClass(d);return this},replaceClass:function(d,c){return this.filter("."+d).removeClass(d).addClass(c).end()},hoverClass:function(c){c=c||"hover";return this.hover(function(){a(this).addClass(c)},function(){a(this).removeClass(c)})},heightToggle:function(c,d){c?this.animate({height:"toggle"},c,d):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();if(d){d.apply(this,arguments)}})},heightHide:function(c,d){if(c){this.animate({height:"hide"},c,d)}else{this.hide();if(d){this.each(d)}}},prepareBranches:function(c){if(!c.prerendered){this.filter(":last-child:not(ul)").addClass(b.last);this.filter((c.collapsed?"":"."+b.closed)+":not(."+b.open+")").find(">ul").hide()}return this.filter(":has(>ul)")},applyClasses:function(c,d){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(e){d.apply(a(this).next())}).add(a("a",this)).hoverClass();if(!c.prerendered){this.filter(":has(>ul:hidden)").addClass(b.expandable).replaceClass(b.last,b.lastExpandable);this.not(":has(>ul:hidden)").addClass(b.collapsable).replaceClass(b.last,b.lastCollapsable);this.prepend('<div class="'+b.hitarea+'"/>').find("div."+b.hitarea).each(function(){var e="";a.each(a(this).parent().attr("class").split(" "),function(){e+=this+"-hitarea "});a(this).addClass(e)})}this.find("div."+b.hitarea).click(d)},treeview:function(d){d=a.extend({cookieId:"treeview"},d);if(d.add){return this.trigger("add",[d.add])}if(d.toggle){var i=d.toggle;d.toggle=function(){return i.apply(a(this).parent()[0],arguments)}}function c(l,n){function m(o){return function(){f.apply(a("div."+b.hitarea,l).filter(function(){return o?a(this).parent("."+o).length:true}));return false}}a("a:eq(0)",n).click(m(b.collapsable));a("a:eq(1)",n).click(m(b.expandable));a("a:eq(2)",n).click(m())}function f(){a(this).parent().find(">.hitarea").swapClass(b.collapsableHitarea,b.expandableHitarea).swapClass(b.lastCollapsableHitarea,b.lastExpandableHitarea).end().swapClass(b.collapsable,b.expandable).swapClass(b.lastCollapsable,b.lastExpandable).find(">ul").heightToggle(d.animated,d.toggle);if(d.unique){a(this).parent().siblings().find(">.hitarea").replaceClass(b.collapsableHitarea,b.expandableHitarea).replaceClass(b.lastCollapsableHitarea,b.lastExpandableHitarea).end().replaceClass(b.collapsable,b.expandable).replaceClass(b.lastCollapsable,b.lastExpandable).find(">ul").heightHide(d.animated,d.toggle)}}function k(){function m(n){return n?1:0}var l=[];j.each(function(n,o){l[n]=a(o).is(":has(>ul:visible)")?1:0});a.cookie(d.cookieId,l.join(""))}function e(){var l=a.cookie(d.cookieId);if(l){var m=l.split("");j.each(function(n,o){a(o).find(">ul")[parseInt(m[n])?"show":"hide"]()})}}this.addClass("treeview");var j=this.find("li").prepareBranches(d);switch(d.persist){case"cookie":var h=d.toggle;d.toggle=function(){k();if(h){h.apply(this,arguments)}};e();break;case"location":var g=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase()});if(g.length){g.addClass("selected").parents("ul, li").add(g.next()).show()}break}j.applyClasses(d,f);if(d.control){c(this,d.control);a(d.control).show()}return this.bind("add",function(m,l){a(l).prev().removeClass(b.last).removeClass(b.lastCollapsable).removeClass(b.lastExpandable).find(">.hitarea").removeClass(b.lastCollapsableHitarea).removeClass(b.lastExpandableHitarea);a(l).find("li").andSelf().prepareBranches(d).applyClasses(d,f)})}});var b=a.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};a.fn.Treeview=a.fn.treeview})(jQuery);
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");
var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,
b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}},{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)});
!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
!function(t){function e(){var t=location.href;return hashtag=-1!==t.indexOf("#prettyPhoto")&&decodeURI(t.substring(t.indexOf("#prettyPhoto")+1,t.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function i(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==i?"":i[1]}t.prettyPhoto={version:"3.1.6"},t.fn.prettyPhoto=function(o){o=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> \t\t\t\t\t\t<div class="ppt">&nbsp;</div> \t\t\t\t\t\t<div class="pp_top"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_content_container"> \t\t\t\t\t\t\t<div class="pp_left"> \t\t\t\t\t\t\t<div class="pp_right"> \t\t\t\t\t\t\t\t<div class="pp_content"> \t\t\t\t\t\t\t\t\t<div class="pp_loaderIcon"></div> \t\t\t\t\t\t\t\t\t<div class="pp_fade"> \t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_expand" title="Expand the image">Expand</a> \t\t\t\t\t\t\t\t\t\t<div class="pp_hoverContainer"> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_next" href="#">next</a> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_previous" href="#">previous</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t<div id="pp_full_res"></div> \t\t\t\t\t\t\t\t\t\t<div class="pp_details"> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_nav"> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t\t\t\t\t<p class="currentTextHolder">0/0</p> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t\t<p class="pp_description"></p> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_social">{pp_social}</div> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_close" href="#">Close</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_bottom"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t<div> \t\t\t\t\t\t\t\t\t<ul> \t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t</div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="https://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"><\/script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},o);var p,a,s,n,l,r,d,h=this,c=!1,_=t(window).height(),g=t(window).width();function m(){t(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(_/2-p.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:p.contentHeight,width:p.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:g/2-p.containerWidth/2<0?0:g/2-p.containerWidth/2,width:p.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(p.height).width(p.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==y(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(p.resized?t("a.pp_expand,a.pp_contract").show():t("a.pp_expand").hide()),!settings.autoplay_slideshow||d||a||t.prettyPhoto.startSlideshow(),settings.changepicturecallback(),a=!0}),isSet&&settings.overlay_gallery&&"image"==y(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((p.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,0==totalPage?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,t.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").off("mouseenter mouseleave"),o.ajaxcallback()}function f(e){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){t(".pp_loaderIcon").show(),e()})}function u(t,e){if(resized=!1,v(t,e),imageWidth=t,imageHeight=e,(r>g||l>_)&&doresize&&settings.allow_resize&&!c){for(resized=!0,fitting=!1;!fitting;)r>g?(imageWidth=g-200,imageHeight=e/t*imageWidth):l>_?(imageHeight=_-200,imageWidth=t/e*imageHeight):fitting=!0,l=imageHeight,r=imageWidth;(r>g||l>_)&&u(r,l),v(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(l),containerWidth:Math.floor(r)+2*settings.horizontal_padding,contentHeight:Math.floor(s),contentWidth:Math.floor(n),resized:resized}}function v(e,i){e=parseFloat(e),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(e),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(e).appendTo(t("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(e),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(t("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),s=i+detailsHeight,n=e,l=s+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),r=e}function y(t){return t.match(/youtube\.com\/watch/i)||t.match(/youtu\.be/i)?"youtube":t.match(/vimeo\.com/i)?"vimeo":t.match(/\b.mov\b/i)?"quicktime":t.match(/\b.swf\b/i)?"flash":t.match(/\biframe=true\b/i)?"iframe":t.match(/\bajax=true\b/i)?"ajax":t.match(/\bcustom=true\b/i)?"custom":"#"==t.substr(0,1)?"inline":"image"}function w(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=b(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=_/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>_)return;$pp_pic_holder.css({top:projectedTop,left:g/2+scroll_pos.scrollLeft-contentwidth/2})}}function b(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function k(e){if(settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href))),settings.markup=settings.markup.replace("{pp_social}",""),t("body").append(settings.markup),$pp_pic_holder=t(".pp_pic_holder"),$ppt=t(".ppt"),$pp_overlay=t("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="";for(var i=0;i<pp_images.length;i++)pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[i]):(classname="default",img_src=""),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=t(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").on("click",function(){return t.prettyPhoto.changeGalleryPage("next"),t.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").on("click",function(){return t.prettyPhoto.changeGalleryPage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").on("mouseenter",function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()}).on("mouseleave",function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(e){t(this).find("a").on("click",function(){return t.prettyPhoto.changePage(e),t.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").on("click",function(){return t.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:t(document).height(),width:t(window).width()}).on("click",function(){settings.modal||t.prettyPhoto.close()}),t("a.pp_close").on("click",function(){return t.prettyPhoto.close(),!1}),settings.allow_expand&&t("a.pp_expand").on("click",function(e){return t(this).hasClass("pp_expand")?(t(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(t(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),f(function(){t.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").on("click",function(){return t.prettyPhoto.changePage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").on("click",function(){return t.prettyPhoto.changePage("next"),t.prettyPhoto.stopSlideshow(),!1}),w()}return doresize=!0,scroll_pos=b(),t(window).off("resize.prettyphoto").on("resize.prettyphoto",function(){w(),_=t(window).height(),g=t(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(t(document).height()).width(g)}),o.keyboard_shortcuts&&t(document).off("keydown.prettyphoto").on("keydown.prettyphoto",function(e){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(e.keyCode){case 37:t.prettyPhoto.changePage("previous"),e.preventDefault();break;case 39:t.prettyPhoto.changePage("next"),e.preventDefault();break;case 27:settings.modal||t.prettyPhoto.close(),e.preventDefault()}}),t.prettyPhoto.initialize=function(){return settings=o,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=t(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?jQuery.map(h,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("href")}):t.makeArray(t(this).attr("href")),pp_titles=isSet?jQuery.map(h,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).find("img").attr("alt")?t(e).find("img").attr("alt"):""}):t.makeArray(t(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(h,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("title")?t(e).attr("title"):""}):t.makeArray(t(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(t(this).attr("href"),pp_images),rel_index=isSet?set_position:t("a["+settings.hook+"^='"+theRel+"']").index(t(this)),k(this),settings.allow_resize&&t(window).on("scroll.prettyphoto",function(){w()}),t.prettyPhoto.open(),!1},t.prettyPhoto.open=function(e){return"undefined"==typeof settings&&(settings=o,pp_images=t.makeArray(arguments[0]),pp_titles=arguments[1]?t.makeArray(arguments[1]):t.makeArray(""),pp_descriptions=arguments[2]?t.makeArray(arguments[2]):t.makeArray(""),isSet=pp_images.length>1,set_position=arguments[3]?arguments[3]:0,k(e.target)),settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),t(pp_images).length>1?t(".pp_nav").show():t(".pp_nav").hide(),t(".pp_loaderIcon").show(),settings.deeplinking&&function(){if("undefined"==typeof theRel)return;location.hash=theRel+"/"+rel_index+"/"}(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+t(pp_images).length),"undefined"!=typeof pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString(),c=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(t(window).height()*parseFloat(movie_height)/100-150),c=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(t(window).width()*parseFloat(movie_width)/100-150),c=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;"),imgPreloader="",skipInjection=!1,y(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position<t(pp_images).length-1&&(nextImage.src=pp_images[set_position+1]),prevImage=new Image,isSet&&pp_images[set_position-1]&&(prevImage.src=pp_images[set_position-1]),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]),imgPreloader.onload=function(){p=u(imgPreloader.width,imgPreloader.height),m()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),t.prettyPhoto.close()},imgPreloader.src=pp_images[set_position];break;case"youtube":p=u(movie_width,movie_height),movie_id=i("v",pp_images[set_position]),""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="//www.youtube.com/embed/"+movie_id,i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":p=u(movie_width,movie_height),movie_id=pp_images[set_position];var e=movie_id.match(/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/);movie="//player.vimeo.com/video/"+e[3]+"?title=0&amp;byline=0&amp;portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=p.width+"/embed/?moog_width="+p.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,p.height).replace(/{path}/g,movie);break;case"quicktime":(p=u(movie_width,movie_height)).height+=15,p.contentHeight+=15,p.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":p=u(movie_width,movie_height),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":p=u(movie_width,movie_height),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,p=u(movie_width,movie_height),doresize=!0,skipInjection=!0,t.get(pp_images[set_position],function(t){toInject=settings.inline_markup.replace(/{content}/g,t),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,m()});break;case"custom":p=u(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=t(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(t("body")).show(),doresize=!1,p=u(t(myClone).width(),t(myClone).height()),doresize=!0,t(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,t(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,m())}),!1},t.prettyPhoto.changePage=function(e){currentGalleryPage=0,"previous"==e?(set_position--,set_position<0&&(set_position=t(pp_images).length-1)):"next"==e?(set_position++,set_position>t(pp_images).length-1&&(set_position=0)):set_position=e,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&t(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),f(function(){t.prettyPhoto.open()})},t.prettyPhoto.changeGalleryPage=function(t){"next"==t?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==t?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=t,slide_speed="next"==t||"previous"==t?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},t.prettyPhoto.startSlideshow=function(){void 0===d?($pp_pic_holder.find(".pp_play").off("click").removeClass("pp_play").addClass("pp_pause").on("click",function(){return t.prettyPhoto.stopSlideshow(),!1}),d=setInterval(t.prettyPhoto.startSlideshow,settings.slideshow)):t.prettyPhoto.changePage("next")},t.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").off("click").removeClass("pp_pause").addClass("pp_play").on("click",function(){return t.prettyPhoto.startSlideshow(),!1}),clearInterval(d),d=undefined},t.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(t.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),t("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){t(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),t(this).remove(),t(window).off("scroll.prettyphoto"),-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto"),settings.callback(),doresize=!0,a=!1,delete settings}))},!pp_alreadyInitialized&&e()&&(pp_alreadyInitialized=!0,hashIndex=e(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){t("a["+o.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.off("click.prettyphoto").on("click.prettyphoto",t.prettyPhoto.initialize)}}(jQuery);var pp_alreadyInitialized=!1;
!function(g,i){"use strict";var u,p;g.fn.imagesLoaded===i&&(u=jQuery,p="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",u.fn.imagesLoaded=function(e){var o=this,n=u.isFunction(u.Deferred)?u.Deferred():0,a=u.isFunction(n.notify),s=o.find("img").add(o.filter("img")),r=[],h=[],m=[];function l(){var t=u(h),i=u(m);n&&(m.length?n.reject(s,t,i):n.resolve(s)),u.isFunction(e)&&e.call(o,s,t,i)}function c(t){d(t.target,"error"===t.type)}function d(t,i){t.src!==p&&-1===u.inArray(t,r)&&(r.push(t),(i?m:h).push(t),u.data(t,"imagesLoaded",{isBroken:i,src:t.src}),a&&n.notifyWith(u(t),[i,s,u(h),u(m)]),s.length===r.length)&&(setTimeout(l),s.unbind(".imagesLoaded",c))}return u.isPlainObject(e)&&u.each(e,function(t,i){"callback"===t?e=i:n&&n[t](i)}),s.length?s.bind("load.imagesLoaded error.imagesLoaded",c).each(function(t,i){var e=i.src,o=u.data(i,"imagesLoaded");o&&o.src===e?d(i,o.isBroken):i.complete&&void 0!==i.naturalWidth?d(i,0===i.naturalWidth||0===i.naturalHeight):(i.readyState||i.complete)&&(i.src=p,i.src=e)}):l(),n?n.promise(o):o}),g.yith_magnifier=function(t,i){this.t=i,this.element=g(i),this._init(t)},g.yith_magnifier.defaults={zoomWidth:"auto",zoomHeight:"auto",position:"right",tint:!1,tintOpacity:.5,lensOpacity:.5,softFocus:!1,smoothMove:3,showTitle:!0,titleOpacity:.5,adjustX:0,adjustY:0,phoneBehavior:"inside",loadingLabel:"Loading...",enableSlider:!0,slider:"carouFredSel",sliderOptions:{},from_gallery:"no",onLoad:function(){return!1},onEnter:function(){return!1},onLeave:function(){return!1},onMove:function(){return!1},onClick:function(){return!1},elements:{zoom:g(".yith_magnifier_zoom"),zoomImage:g(".yith_magnifier_zoom img").first(),gallery:g(".yith_magnifier_gallery li a")}},g.yith_magnifier.prototype={_init:function(t){var e=this;g(document).trigger("yith_magnifier_before_init"),g.each(g.yith_magnifier.defaults.elements,function(t,i){g.yith_magnifier.defaults.elements[t]=g(i,e)}),e.options=g.extend(!0,{},g.yith_magnifier.defaults,t),e.isPhone=e._isPhone(),e._loading(),e.options.onLoad(),e._initZoom(),e._initGallery(),g(document).trigger("yith_magnifier_after_init")},_initGallery:function(){var i=this,t=i.options.elements,e=t.gallery,o=t.zoom,n=t.zoomImage;0<e.length?(e.on("click",function(t){t.preventDefault(),yith_wc_zoom_magnifier_storage_object.stop_immediate_propagation&&t.stopImmediatePropagation(),"free"==g("#yith_wczm_traffic_light").val()&&(g(".yith_magnifier_gallery  .yith_magnifier_thumbnail.active-thumbnail").removeClass("active-thumbnail"),g(".yith_magnifier_gallery  .yith_magnifier_thumbnail.active-thumbnail").addClass("inactive-thumbnail"),g(this).removeClass("inactive-thumbnail"),g(this).addClass("active-thumbnail"),g(this).parent().removeClass("inactive-thumbnail"),g(this).parent().addClass("active-thumbnail"),i.options.from_gallery="yes",t=g(this),i.destroy(),o.attr("href",this.href),n.attr("src",t.data("small")).attr("srcset",t.data("small")).attr("src-orig",t.data("small")).attr("title","").attr("title",t.attr("title")),g.data(i.t,"yith_magnifier",new g.yith_magnifier(i.options,i.element)))}),i.options.enableSlider&&e.closest("ul").trigger("yith_magnifier_slider_destroy")):e.on("click",function(t){return t.preventDefault(),!1})},_loading:function(){var t;this.options.disableRightClick&&g(document).on("contextmenu",function(t){return!1}),this.mouseTrap===i&&(t=this.options.elements.zoom.width(),this.options.loadingLabel)&&g('<div class="yith_magnifier_loading">'+this.options.loadingLabel+"</div>").css({width:t,"text-align":"center",opacity:.5}).appendTo(this.options.elements.zoom.parent())},_initZoom:function(){if("free"==g("#yith_wczm_traffic_light").val()){g("#yith_wczm_traffic_light").val("blocked");var i=this,t=(i.zoom=i.options.elements.zoom,i.zoomImage=i.options.elements.zoomImage,"yith_magnifier_zoom_wrap");if(i.options.zoom_wrap_additional_css){if(g("."+t).length)return;t+=" "+i.options.zoom_wrap_additional_css}i.zoom.wrap('<div class="'+t+'"></div>'),i.IMG_zoomImage=new Image;t=g(".woocommerce-variation-add-to-cart .variation_id").val();g.isNumeric(t)&&0!=t&&"no"==i.options.from_gallery?g.ajax({data:{action:"yith_wc_zoom_magnifier_get_main_image",product_id:t,context:"frontend"},url:yith_wc_zoom_magnifier_storage_object.ajax_url,type:"post",error:function(t){console.log("ERROR - Yith_WC_Zoom_Magnifier"),console.log(t),g("#yith_wczm_traffic_light").val("free")},success:function(t){i.zoom.attr("href",t.url),i.IMG_zoomImage.src=t.url,i.IMG_smallImage=new Image,i.IMG_smallImage.src=i.zoomImage.attr("src"),t.gallery&&(g(".yith_magnifier_gallery").length?g(".yith_magnifier_gallery").closest(".thumbnails").replaceWith(t.gallery):g(".images").append(t.gallery),i.options.elements.gallery=g(".yith_magnifier_gallery li a")),g.browser&&g.browser.msie&&8==g.browser.version?g(i.IMG_zoomImage).load(function(){i._initGallery(),i._initTrap()}):g(".product .images").imagesLoaded(function(){i._initGallery(),i._initTrap()}),g(document).on("click","a.yith_expand",function(t){t.preventDefault(),g().prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1,callback:function(){g(".yith_expand").css("display","inline")}}),g.prettyPhoto.open(i.zoom[0].href,"",""),g(".yith_expand").css("display","none"),g(".pp_woocommerce .ppt").css({height:0,marginBottom:0})}),g(document).trigger("yith_magnifier_after_init_zoom"),g("#yith_wczm_traffic_light").val("free")}}):(i.IMG_zoomImage.src=i.zoom.attr("href"),i.IMG_smallImage=new Image,i.IMG_smallImage.src=i.zoomImage.attr("src"),g.browser&&g.browser.msie&&8==g.browser.version?g(i.IMG_zoomImage).load(function(){i._initTrap()}):g(".product .images").imagesLoaded(function(){i._initTrap()}),g(document).on("click","a.yith_expand",function(t){t.preventDefault(),g().prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1,callback:function(){g(".yith_expand").css("display","inline")}}),g.prettyPhoto.open(i.zoom[0].href,"",""),g(".yith_expand").css("display","none"),g(".pp_woocommerce .ppt").css({height:0,marginBottom:0})}),g(document).trigger("yith_magnifier_after_init_zoom"),g("#yith_wczm_traffic_light").val("free"))}},_initTrap:function(){var h,m=this,l=m.IMG_zoomImage,c=(m.mx=0,m.my=0,m.controlTimer=0,m.lens=null,m.tint=null,m.softFocus=null,m.zoomDiv=null,m.cw=0,m.ch=0,m.zw=0,m.destU=0,m.destV=0,m.currU=0,m.currV=0,m.mouseTrap=null,m.options.elements.zoom),d=m.options.elements.zoomImage;g(".yith_magnifier_loading").remove(),this.element.find(".yith_magnifier_mousetrap")&&this.element.find(".yith_magnifier_mousetrap").remove(),this.mouseTrap=g('<div class="yith_magnifier_mousetrap pp_woocommerce" />').css({width:yith_wc_zoom_magnifier_storage_object.mouse_trap_width,height:yith_wc_zoom_magnifier_storage_object.mouse_trap_height,top:0,left:0}).appendTo(c.parent()),"undefined"!=typeof ywzm_data&&(this.element.find(".yith_expand").remove(),g('<a href="#" class="yith_expand" style="display: inline;"></a>').insertAfter(this.mouseTrap),g(".expand-button-hidden").clone().appendTo(g(".yith_expand")),g(".yith_expand .expand-button-hidden").show()),m.isPhone&&"disable"==m.options.phoneBehavior||(h="ontouchstart"in document.documentElement,this.mouseTrap.on("touchmove mousemove",this,function(t){m.options.onMove(),m.mx=("undefined"!=typeof t.originalEvent.touches?t.originalEvent.touches[0]:t).pageX,m.my=("undefined"!=typeof t.originalEvent.touches?t.originalEvent.touches[0]:t).pageY}).on("touchend mouseleave",this,function(t){return clearTimeout(m.controlTimer),m.lens&&m.lens.fadeOut(299),m.tint&&m.tint.fadeOut(299),m.softFocus&&m.softFocus.fadeOut(299),m.zoomDiv.fadeOut(300,function(){m._onLeave()}),!1}).on("touchstart click",this,function(t){m.options.onClick()}).on("touchstart mouseenter",this,function(t){if("free"==g("#yith_wczm_traffic_light").val()){m.options.onEnter(),h&&t.preventDefault(),m.mx=("undefined"!=typeof t.originalEvent.touches?t.originalEvent.touches[0]:t).pageX,m.my=("undefined"!=typeof t.originalEvent.touches?t.originalEvent.touches[0]:t).pageY,m.zw=t.data,m.zoomDiv&&(m.zoomDiv.stop(!0,!1),m.zoomDiv.remove());var i=m.options.adjustX,e=m.options.adjustY,o=d.outerWidth(),n=d.outerHeight(),a=m.options.zoomWidth,s=m.options.zoomHeight,r=("auto"==m.options.zoomWidth&&(a=o),"auto"==m.options.zoomHeight&&(s=n),c.parent());switch(m.options.position){case"top":e-=s;break;case"right":i+=o;break;case"bottom":e+=n;break;case"left":i-=a;break;case"inside":a=o,s=n;break;default:(r=g("#"+m.options.position)).length?(a=r.innerWidth(),s=r.innerHeight()):(r=c,i+=o,e+=n)}m.isPhone&&"inside"==m.options.phoneBehavior&&(a=o,s=n,e=i=0),m.zoomDiv=g('<div class="yith_magnifier_zoom_magnifier" />').css({left:i,top:e,width:a,height:s,"background-repeat":"no-repeat",backgroundImage:"url("+l.src+")"}).appendTo(r),d.attr("title")&&m.options.showTitle&&g('<div class="yith_magnifier_title">'+d.attr("title")+"</div>").appendTo(m.zoomDiv),!m.isPhone||"disable"!=m.options.phoneBehavior?m.zoomDiv.fadeIn(500):m.lens.fadeOut(299),m.lens&&(m.lens.remove(),m.lens=null),l.width<=1?m.cw=d.outerWidth()/l.naturalWidth*m.zoomDiv.width():m.cw=d.outerWidth()/l.width*m.zoomDiv.width(),l.height<=1?m.ch=d.outerHeight()/l.naturalHeight*m.zoomDiv.height():m.ch=d.outerHeight()/l.height*m.zoomDiv.height(),m.lens=g('<div class="yith_magnifier_lens" />').css({width:m.cw,height:m.ch}).appendTo(c);t=!1;m.options.tint&&(m.tint=g("<div />").css({display:"none",position:"absolute",left:0,top:0,width:d.outerWidth(),height:d.outerHeight(),backgroundColor:m.options.tint,opacity:m.options.tintOpacity}).appendTo(c),m.lens.append(g("<img />",{src:d.attr("src")})),t=!0,m.tint.fadeIn(500)),m.options.softFocus&&(m.softFocus=g("<div />").css({position:"absolute",display:"none",top:"1px",left:"1px",width:d.outerWidth(),height:d.outerHeight(),opacity:.5}).appendTo(c),m.softFocus.append(g("<img />",{src:d.attr("src")})),0==m.lens.find("img").length&&m.lens.append(g("<img />",{src:d.attr("src")})),t=!0,m.softFocus.fadeIn(500)),t||m.lens.css("opacity",m.options.lensOpacity),"inside"!==m.options.position&&m.lens.fadeIn(500),m.zw._controlLoop()}}))},_controlLoop:function(){var t,i,e=this;this.lens&&(t=this.mx-this.zoomImage.offset().left-.5*this.cw>>0,i=this.my-this.zoomImage.offset().top-.5*this.ch>>0,t<0?t=0:t>this.zoomImage.outerWidth()-this.cw&&(t=this.zoomImage.outerWidth()-this.cw),i<0?i=0:i>this.zoomImage.outerHeight()-this.ch&&(i=this.zoomImage.outerHeight()-this.ch),this.lens.css({left:t-2,top:i-1}),this.lens.find("img").css({width:this.zoomImage.outerWidth(),height:this.zoomImage.outerHeight(),marginLeft:-t+"px ",marginTop:-i+"px"}),this.IMG_zoomImage.width<=1?this.destU=t/this.zoomImage.outerWidth()*this.IMG_zoomImage.naturalWidth>>0:this.destU=t/this.zoomImage.outerWidth()*this.IMG_zoomImage.width>>0,this.IMG_zoomImage.height<=1?this.destV=i/this.zoomImage.outerHeight()*this.IMG_zoomImage.naturalHeight>>0:this.destV=i/this.zoomImage.outerHeight()*this.IMG_zoomImage.height>>0,this.currU+=(this.destU-this.currU)/this.options.smoothMove,this.currV+=(this.destV-this.currV)/this.options.smoothMove,this.zoomDiv.css("background-position",-(this.currU>>0)+"px "+-(this.currV>>0)+"px")),this.controlTimer=setTimeout(function(){e._controlLoop()},30)},_onLeave:function(){this.options.onLeave(),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this._removeElements()},_removeElements:function(){this.lens&&(this.lens.remove(),this.lens=null),this.tint&&(this.tint.remove(),this.tint=null),this.softFocus&&(this.softFocus.remove(),this.softFocus=null),0<this.element.find(".yith_magnifier_loading").length&&this.element.find(".yith_magnifier_loading").remove()},_isPhone:function(){var t=navigator.userAgent.toLowerCase();return t.match(/iphone/i)||t.match(/ipod/i)||t.match(/android/i)},destroy:function(){this.zoom&&this.zoom.unwrap(),this.mouseTrap&&(this.mouseTrap.unbind(),this.mouseTrap.remove(),this.mouseTrap=null),this.zoomDiv&&(this.zoomDiv.remove(),this.zoomDiv=null),this.options.disableRightClick&&g(document).unbind(),this._removeElements(),this.options.elements.gallery.unbind(),this.element.removeData("yith_magnifier")}},g.fn.yith_magnifier=function(i){var e;return"string"==typeof i?(e=Array.prototype.slice.call(arguments,1),this.each(function(){var t=g.data(this,"yith_magnifier");t?g.isFunction(t[i])&&"_"!==i.charAt(0)?t[i].apply(t,e):g.error("no such method '"+i+"' for yith_magnifier instance"):g.error("cannot call methods on yith_magnifier prior to initialization; attempted to call method '"+i+"'")})):this.each(function(){g.data(this,"yith_magnifier")?g.error("yith_magnifier already istantiated."):g.data(this,"yith_magnifier",new g.yith_magnifier(i,this))}),this}}((window,jQuery));
jQuery(function(r){var i,t,o,a,e,s,l,m,d,c,g=r(".images"),n=r(".yith_magnifier_zoom"),u=r(".yith_magnifier_zoom img").first(),f=g.find(".yith_magnifier_zoom").attr("href"),v=g.find(".yith_magnifier_zoom img").attr("src"),_=g.find(".thumbnails");if("undefined"==typeof yith_magnifier_options)return!1;g.yith_magnifier(yith_magnifier_options),r(document).on("found_variation","form.variations_form",function(i,e){var r=e.image_magnifier||f,t=v;e.image.src&&(t=e.image.src),n.attr("href",r),u.attr("src",t),u.attr("srcset",t),u.attr("src-orig",t),g.data("yith_magnifier")&&g.yith_magnifier("destroy"),g.yith_magnifier(yith_magnifier_options)}).on("reset_image",function(i){n.attr("href",f),u.attr("src",v),u.attr("srcset",v),u.attr("src-orig",v),g.find(".thumbnails").replaceWith(_),g.data("yith_magnifier")&&g.yith_magnifier("destroy"),g.yith_magnifier(yith_magnifier_options)}),r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").length&&(r("form.variations_form .variations select").trigger("change"),r(".single-product.woocommerce div.product div.images div.thumbnails").css("width",r(".single-product.woocommerce div.product div.images div.thumbnails").width()),t=r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").data("circular"),o=r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").data("columns"),a=r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").data("slider_infinite"),e=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li").width(),s=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li").css("margin-left"),i=void 0===s?0:s.split("px").shift(),m=0,(l=[]).push(m),r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery li").each(function(){r(this).css("width",e+"px"),r(this).css("margin-left",s),r(this).css("margin-right",s),r(this).show(),m+=2*i+e,l.push(m),0}),d=m,r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery").css("width",d+"px"),r("#slider-next").css("top","50%"),r("#slider-next").css("transform","translateY(-50%)"),r("#slider-prev").css("top","50%"),r("#slider-prev").css("transform","translateY(-50%)"),c=0,r("body").on("click","#slider-next",function(){if(r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").next().is("li")){c++,r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"});var i=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").next();r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),i.addClass("first"),i=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").next(),r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),i.addClass("last")}else if("yes"!=t||r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").is(":animated")){if("yes"==a&&!r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").is(":animated")){for(;r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").prev().is("li");){var e=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").prev();r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),e.addClass("first"),e=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").prev(),r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),e.addClass("last")}c=0,r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"})}}else{c--,r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").css("margin-left","-"+l[c]+"px");i=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li").first(),i=(r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").after(i),r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),i.addClass("last"),r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").next());r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),i.addClass("first"),c++,r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"})}}),r("body").on("click","#slider-prev",function(){if(r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").prev().is("li")){c--,r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"});var i=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").prev();r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),i.addClass("first"),i=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").prev(),r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),i.addClass("last")}else if("yes"!=t||r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").is(":animated")){if("yes"==a&&!r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").is(":animated")){for(;r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").next().is("li");){var e=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").next();r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),e.addClass("first"),e=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").next(),r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),e.addClass("last")}c=l.length-1-o,r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"})}}else{c++,r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").css("margin-left","-"+l[c]+"px");i=r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li").last(),i=(r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").before(i),r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.first").removeClass("first"),i.addClass("first"),r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").prev());r(".single-product.woocommerce div.product div.images .yith_magnifier_gallery li.last").removeClass("last"),i.addClass("last"),c--,r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").animate({marginLeft:"-"+l[c]+"px"})}}),"yes"==r(".single-product.woocommerce div.product div.images ul.yith_magnifier_gallery").data("auto_carousel")&&setTimeout(function p(){r("#slider-next").click(),setTimeout(p,3e3)},3e3),r(document).on("mouseover",".yith_slider_arrow",function(i){r(this).find("path").css("fill",ywzm_data.slider_colors_hover_array.arrow)}),r(document).on("mouseout",".yith_slider_arrow",function(i){r(this).find("path").css("fill",ywzm_data.slider_colors_array.arrow)}))});
(function($){
$.prettyPhoto={version: '3.1.6'};
$.fn.prettyPhoto=function(pp_settings){
pp_settings=jQuery.extend({
hook: 'rel', 
animation_speed: 'fast', 
ajaxcallback: function(){},
slideshow: 5000, 
autoplay_slideshow: false, 
opacity: 0.80, 
show_title: true, 
allow_resize: true, 
allow_expand: true, 
default_width: 500,
default_height: 344,
counter_separator_label: '/', 
theme: 'pp_default', 
horizontal_padding: 20, 
hideflash: false, 
wmode: 'opaque', 
autoplay: true, 
modal: false, 
deeplinking: true, 
overlay_gallery: true, 
overlay_gallery_max: 30, 
keyboard_shortcuts: true, 
changepicturecallback: function(){}, 
callback: function(){}, 
ie6_fallback: true,
markup: '<div class="pp_pic_holder"> \
<div class="ppt">&nbsp;</div> \
<div class="pp_top"> \
<div class="pp_left"></div> \
<div class="pp_middle"></div> \
<div class="pp_right"></div> \
</div> \
<div class="pp_content_container"> \
<div class="pp_left"> \
<div class="pp_right"> \
<div class="pp_content"> \
<div class="pp_loaderIcon"></div> \
<div class="pp_fade"> \
<a href="#" class="pp_expand" title="Expand the image">\
<div class="expand-button-hidden">\
\t<svg width="19px" height="19px" viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\
\t\t<defs>\
\t\t\t<rect id="path-1" x="0" y="0" width="30" height="30"></rect>\
\t\t</defs>\
\t\t<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
\t\t\t<g id="Product-page---example-1" transform="translate(-940.000000, -1014.000000)">\
\t\t\t\t<g id="arrow-/-expand" transform="translate(934.500000, 1008.500000)">\
\t\t\t\t\t<mask id="mask-2" fill="white">\
\t\t\t\t\t\t<use xlink:href="#path-1"></use>\
\t\t\t\t\t</mask>\
\t\t\t\t\t<g id="arrow-/-expand-(Background/Mask)"></g>\
\t\t\t\t\t<path d="M21.25,8.75 L15,8.75 L15,6.25 L23.75,6.25 L23.740468,15.0000006 L21.25,15.0000006 L21.25,8.75 Z M8.75,21.25 L15,21.25 L15,23.75 L6.25,23.75 L6.25953334,14.9999988 L8.75,14.9999988 L8.75,21.25 Z" fill="#000000" mask="url(#mask-2)"></path>\
\t\t\t\t</g>\
\t\t\t</g>\
\t\t</g>\
\t</svg>\
\t</div></a> \
<div class="pp_hoverContainer"> \
<a class="pp_next" href="#">next</a> \
<a class="pp_previous" href="#">previous</a> \
</div> \
<div id="pp_full_res"></div> \
<div class="pp_details"> \
<div class="pp_nav"> \
<a href="#" class="pp_arrow_previous">Previous</a> \
<p class="currentTextHolder">0/0</p> \
<a href="#" class="pp_arrow_next">Next</a> \
</div> \
<p class="pp_description"></p> \
<div class="pp_social">{pp_social}</div> \
<a class="pp_close" href="#">Close</a> \
</div> \
</div> \
</div> \
</div> \
</div> \
</div> \
<div class="pp_bottom"> \
<div class="pp_left"></div> \
<div class="pp_middle"></div> \
<div class="pp_right"></div> \
</div> \
</div> \
<div class="pp_overlay"></div>',
gallery_markup: '<div class="pp_gallery"> \
<a href="#" class="pp_arrow_previous">Previous</a> \
<div> \
<ul> \
{gallery} \
</ul> \
</div> \
<a href="#" class="pp_arrow_next">Next</a> \
</div>',
image_markup: '<img id="fullResImage" src="{path}" />',
flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="https://www.apple.com/quicktime/download/"></embed></object>',
iframe_markup: '<iframe src="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
inline_markup: '<div class="pp_inline">{content}</div>',
custom_markup: '',
social_tools: '<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>' 
}, pp_settings);
var matchedObjects=this, percentBased=false, pp_dimensions, pp_open,
pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth,
windowHeight=$(window).height(), windowWidth=$(window).width(),
pp_slideshow;
doresize=true, scroll_pos=_get_scroll();
$(window).off('resize.prettyphoto').on('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); });
if(pp_settings.keyboard_shortcuts){
$(document).off('keydown.prettyphoto').on('keydown.prettyphoto',function(e){
if(typeof $pp_pic_holder!='undefined'){
if($pp_pic_holder.is(':visible')){
switch(e.keyCode){
case 37:
$.prettyPhoto.changePage('previous');
e.preventDefault();
break;
case 39:
$.prettyPhoto.changePage('next');
e.preventDefault();
break;
case 27:
if(!settings.modal)
$.prettyPhoto.close();
e.preventDefault();
break;
};};
};});
};
$.prettyPhoto.initialize=function(){
settings=pp_settings;
if(settings.theme=='pp_default') settings.horizontal_padding=16;
theRel=$(this).attr(settings.hook);
galleryRegExp=/\[(?:.*)\]/;
isSet=(galleryRegExp.exec(theRel)) ? true:false;
pp_images=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return $(n).attr('href'); }):$.makeArray($(this).attr('href'));
pp_titles=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt'):""; }):$.makeArray($(this).find('img').attr('alt'));
pp_descriptions=(isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel)!=-1) return ($(n).attr('title')) ? $(n).attr('title'):""; }):$.makeArray($(this).attr('title'));
if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery=false;
set_position=jQuery.inArray($(this).attr('href'), pp_images);
rel_index=(isSet) ? set_position:$("a["+settings.hook+"^='"+theRel+"']").index($(this));
_build_overlay(this);
if(settings.allow_resize)
$(window).on('scroll.prettyphoto',function(){ _center_overlay(); });
$.prettyPhoto.open();
return false;
}
$.prettyPhoto.open=function(event){
if(typeof settings=="undefined"){
settings=pp_settings;
pp_images=$.makeArray(arguments[0]);
pp_titles=(arguments[1]) ? $.makeArray(arguments[1]):$.makeArray("");
pp_descriptions=(arguments[2]) ? $.makeArray(arguments[2]):$.makeArray("");
isSet=(pp_images.length > 1) ? true:false;
set_position=(arguments[3])? arguments[3]: 0;
_build_overlay(event.target);
}
if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden');
_checkPosition($(pp_images).length);
$('.pp_loaderIcon').show();
if(settings.deeplinking)
setHashtag();
if(settings.social_tools){
facebook_like_link=settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
$pp_pic_holder.find('.pp_social').html(facebook_like_link);
}
if($ppt.is(':hidden')) $ppt.css('opacity',0).show();
$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);
$pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).length);
if(typeof pp_descriptions[set_position]!='undefined'&&pp_descriptions[set_position]!=""){
$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));
}else{
$pp_pic_holder.find('.pp_description').hide();
}
movie_width=(parseFloat(getParam('width',pp_images[set_position]))) ? getParam('width',pp_images[set_position]):settings.default_width.toString();
movie_height=(parseFloat(getParam('height',pp_images[set_position]))) ? getParam('height',pp_images[set_position]):settings.default_height.toString();
percentBased=false;
if(movie_height.indexOf('%')!=-1){ movie_height=parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased=true; }
if(movie_width.indexOf('%')!=-1){ movie_width=parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased=true; }
$pp_pic_holder.fadeIn(function(){
(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined") ? $ppt.html(unescape(pp_titles[set_position])):$ppt.html('&nbsp;');
imgPreloader="";
skipInjection=false;
switch(_getFileType(pp_images[set_position])){
case 'image':
imgPreloader=new Image();
nextImage=new Image();
if(isSet&&set_position < $(pp_images).length -1) nextImage.src=pp_images[set_position + 1];
prevImage=new Image();
if(isSet&&pp_images[set_position - 1]) prevImage.src=pp_images[set_position - 1];
$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);
imgPreloader.onload=function(){
pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);
_showContent();
};
imgPreloader.onerror=function(){
alert('Image cannot be loaded. Make sure the path is correct and image exist.');
$.prettyPhoto.close();
};
imgPreloader.src=pp_images[set_position];
break;
case 'youtube':
pp_dimensions=_fitToViewport(movie_width,movie_height);
movie_id=getParam('v',pp_images[set_position]);
if(movie_id==""){
movie_id=pp_images[set_position].split('youtu.be/');
movie_id=movie_id[1];
if(movie_id.indexOf('?') > 0)
movie_id=movie_id.substr(0,movie_id.indexOf('?'));
if(movie_id.indexOf('&') > 0)
movie_id=movie_id.substr(0,movie_id.indexOf('&'));
}
movie='//www.youtube.com/embed/'+movie_id;
(getParam('rel',pp_images[set_position])) ? movie+="?rel="+getParam('rel',pp_images[set_position]):movie+="?rel=1";
if(settings.autoplay) movie +="&autoplay=1";
toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);
break;
case 'vimeo':
pp_dimensions=_fitToViewport(movie_width,movie_height);
movie_id=pp_images[set_position];
var regExp=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;
var match=movie_id.match(regExp);
movie='//player.vimeo.com/video/'+ match[3] +'?title=0&amp;byline=0&amp;portrait=0';
if(settings.autoplay) movie +="&autoplay=1;";
vimeo_width=pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width'];
toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);
break;
case 'quicktime':
pp_dimensions=_fitToViewport(movie_width,movie_height);
pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15;
toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);
break;
case 'flash':
pp_dimensions=_fitToViewport(movie_width,movie_height);
flash_vars=pp_images[set_position];
flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length);
filename=pp_images[set_position];
filename=filename.substring(0,filename.indexOf('?'));
toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);
break;
case 'iframe':
pp_dimensions=_fitToViewport(movie_width,movie_height);
frame_url=pp_images[set_position];
frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);
toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);
break;
case 'ajax':
doresize=false;
pp_dimensions=_fitToViewport(movie_width,movie_height);
doresize=true;
skipInjection=true;
$.get(pp_images[set_position],function(responseHTML){
toInject=settings.inline_markup.replace(/{content}/g,responseHTML);
$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;
_showContent();
});
break;
case 'custom':
pp_dimensions=_fitToViewport(movie_width,movie_height);
toInject=settings.custom_markup;
break;
case 'inline':
myClone=$(pp_images[set_position]).clone().append('<br clear="all" />').css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show();
doresize=false;
pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());
doresize=true;
$(myClone).remove();
toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());
break;
};
if(!imgPreloader&&!skipInjection){
$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;
_showContent();
};});
return false;
};
$.prettyPhoto.changePage=function(direction){
currentGalleryPage=0;
if(direction=='previous'){
set_position--;
if(set_position < 0) set_position=$(pp_images).length-1;
}else if(direction=='next'){
set_position++;
if(set_position > $(pp_images).length-1) set_position=0;
}else{
set_position=direction;
};
rel_index=set_position;
if(!doresize) doresize=true;
if(settings.allow_expand){
$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');
}
_hideContent(function(){ $.prettyPhoto.open(); });
};
$.prettyPhoto.changeGalleryPage=function(direction){
if(direction=='next'){
currentGalleryPage ++;
if(currentGalleryPage > totalPage) currentGalleryPage=0;
}else if(direction=='previous'){
currentGalleryPage --;
if(currentGalleryPage < 0) currentGalleryPage=totalPage;
}else{
currentGalleryPage=direction;
};
slide_speed=(direction=='next'||direction=='previous') ? settings.animation_speed:0;
slide_to=currentGalleryPage * (itemsPerPage * itemWidth);
$pp_gallery.find('ul').animate({left:-slide_to},slide_speed);
};
$.prettyPhoto.startSlideshow=function(){
if(typeof pp_slideshow=='undefined'){
$pp_pic_holder.find('.pp_play').off('click').removeClass('pp_play').addClass('pp_pause').on('click', function(){
$.prettyPhoto.stopSlideshow();
return false;
});
pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);
}else{
$.prettyPhoto.changePage('next');
};}
$.prettyPhoto.stopSlideshow=function(){
$pp_pic_holder.find('.pp_pause').off('click').removeClass('pp_pause').addClass('pp_play').on('click', function(){
$.prettyPhoto.startSlideshow();
return false;
});
clearInterval(pp_slideshow);
pp_slideshow=undefined;
}
$.prettyPhoto.close=function(){
if($pp_overlay.is(":animated")) return;
$.prettyPhoto.stopSlideshow();
$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');
$('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); });
$pp_overlay.fadeOut(settings.animation_speed, function(){
if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible');
$(this).remove();
$(window).off('scroll.prettyphoto');
clearHashtag();
settings.callback();
doresize=true;
pp_open=false;
delete settings;
});
};
function _showContent(){
$('.pp_loaderIcon').hide();
projectedTop=scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2));
if(projectedTop < 0) projectedTop=0;
$ppt.fadeTo(settings.animation_speed,1);
$pp_pic_holder.find('.pp_content')
.animate({
height:pp_dimensions['contentHeight'],
width:pp_dimensions['contentWidth']
},settings.animation_speed);
$pp_pic_holder.animate({
'top': projectedTop,
'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0:(windowWidth/2) - (pp_dimensions['containerWidth']/2),
width:pp_dimensions['containerWidth']
},settings.animation_speed,function(){
$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);
$pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed);
if(isSet&&_getFileType(pp_images[set_position])=="image"){ $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); }
if(settings.allow_expand){
if(pp_dimensions['resized']){
$('a.pp_expand,a.pp_contract').show();
}else{
$('a.pp_expand').hide();
}}
if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open) $.prettyPhoto.startSlideshow();
settings.changepicturecallback();
pp_open=true;
});
_insert_gallery();
pp_settings.ajaxcallback();
};
function _hideContent(callback){
$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');
$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){
$('.pp_loaderIcon').show();
callback();
});
};
function _checkPosition(setCount){
(setCount > 1) ? $('.pp_nav').show():$('.pp_nav').hide();
};
function _fitToViewport(width,height){
resized=false;
_getDimensions(width,height);
imageWidth=width, imageHeight=height;
if(((pp_containerWidth > windowWidth)||(pp_containerHeight > windowHeight))&&doresize&&settings.allow_resize&&!percentBased){
resized=true, fitting=false;
while (!fitting){
if((pp_containerWidth > windowWidth)){
imageWidth=(windowWidth - 200);
imageHeight=(height/width) * imageWidth;
}else if((pp_containerHeight > windowHeight)){
imageHeight=(windowHeight - 200);
imageWidth=(width/height) * imageHeight;
}else{
fitting=true;
};
pp_containerHeight=imageHeight, pp_containerWidth=imageWidth;
};
if((pp_containerWidth > windowWidth)||(pp_containerHeight > windowHeight)){
_fitToViewport(pp_containerWidth,pp_containerHeight)
};
_getDimensions(imageWidth,imageHeight);
};
return {
width:Math.floor(imageWidth),
height:Math.floor(imageHeight),
containerHeight:Math.floor(pp_containerHeight),
containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2),
contentHeight:Math.floor(pp_contentHeight),
contentWidth:Math.floor(pp_contentWidth),
resized:resized
};};
function _getDimensions(width,height){
width=parseFloat(width);
height=parseFloat(height);
$pp_details=$pp_pic_holder.find('.pp_details');
$pp_details.width(width);
detailsHeight=parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom'));
$pp_details=$pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({
'position':'absolute',
'top':-10000
});
detailsHeight +=$pp_details.height();
detailsHeight=(detailsHeight <=34) ? 36:detailsHeight;
$pp_details.remove();
$pp_title=$pp_pic_holder.find('.ppt');
$pp_title.width(width);
titleHeight=parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom'));
$pp_title=$pp_title.clone().appendTo($('body')).css({
'position':'absolute',
'top':-10000
});
titleHeight +=$pp_title.height();
$pp_title.remove();
pp_contentHeight=height + detailsHeight;
pp_contentWidth=width;
pp_containerHeight=pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height();
pp_containerWidth=width;
}
function _getFileType(itemSrc){
if(itemSrc.match(/youtube\.com\/watch/i)||itemSrc.match(/youtu\.be/i)){
return 'youtube';
}else if(itemSrc.match(/vimeo\.com/i)){
return 'vimeo';
}else if(itemSrc.match(/\b.mov\b/i)){
return 'quicktime';
}else if(itemSrc.match(/\b.swf\b/i)){
return 'flash';
}else if(itemSrc.match(/\biframe=true\b/i)){
return 'iframe';
}else if(itemSrc.match(/\bajax=true\b/i)){
return 'ajax';
}else if(itemSrc.match(/\bcustom=true\b/i)){
return 'custom';
}else if(itemSrc.substr(0,1)=='#'){
return 'inline';
}else{
return 'image';
};};
function _center_overlay(){
if(doresize&&typeof $pp_pic_holder!='undefined'){
scroll_pos=_get_scroll();
contentHeight=$pp_pic_holder.height(), contentwidth=$pp_pic_holder.width();
projectedTop=(windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2);
if(projectedTop < 0) projectedTop=0;
if(contentHeight > windowHeight)
return;
$pp_pic_holder.css({
'top': projectedTop,
'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2)
});
};};
function _get_scroll(){
if(self.pageYOffset){
return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){
return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){
return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};
};
function _resize_overlay(){
windowHeight=$(window).height(), windowWidth=$(window).width();
if(typeof $pp_overlay!="undefined") $pp_overlay.height($(document).height()).width(windowWidth);
};
function _insert_gallery(){
if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){
itemWidth=52+5;
navWidth=(settings.theme=="facebook"||settings.theme=="pp_default") ? 50:30;
itemsPerPage=Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth);
itemsPerPage=(itemsPerPage < pp_images.length) ? itemsPerPage:pp_images.length;
totalPage=Math.ceil(pp_images.length / itemsPerPage) - 1;
if(totalPage==0){
navWidth=0;
$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();
}else{
$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();
};
galleryWidth=itemsPerPage * itemWidth;
fullGalleryWidth=pp_images.length * itemWidth;
$pp_gallery
.css('margin-left',-((galleryWidth/2) + (navWidth/2)))
.find('div:first').width(galleryWidth+5)
.find('ul').width(fullGalleryWidth)
.find('li.selected').removeClass('selected');
goToPage=(Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage):totalPage;
$.prettyPhoto.changeGalleryPage(goToPage);
$pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');
}else{
$pp_pic_holder.find('.pp_content').off('mouseenter mouseleave');
}}
function _build_overlay(caller){
if(settings.social_tools)
facebook_like_link=settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
settings.markup=settings.markup.replace('{pp_social}','');
$('body').append(settings.markup);
$pp_pic_holder=$('.pp_pic_holder') , $ppt=$('.ppt'), $pp_overlay=$('div.pp_overlay');
if(isSet&&settings.overlay_gallery){
currentGalleryPage=0;
toInject="";
for (var i=0; i < pp_images.length; i++){
if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){
classname='default';
img_src='';
}else{
classname='';
img_src=pp_images[i];
}
toInject +="<li class='"+classname+"'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>";
};
toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);
$pp_pic_holder.find('#pp_full_res').after(toInject);
$pp_gallery=$('.pp_pic_holder .pp_gallery'), $pp_gallery_li=$pp_gallery.find('li');
$pp_gallery.find('.pp_arrow_next').on('click', function(){
$.prettyPhoto.changeGalleryPage('next');
$.prettyPhoto.stopSlideshow();
return false;
});
$pp_gallery.find('.pp_arrow_previous').on('click', function(){
$.prettyPhoto.changeGalleryPage('previous');
$.prettyPhoto.stopSlideshow();
return false;
});
$pp_pic_holder.find('.pp_content').on('mouseenter',
function(){
$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();
}).on('mouseleave',
function(){
$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();
});
itemWidth=52+5;
$pp_gallery_li.each(function(i){
$(this)
.find('a')
.on('click', function(){
$.prettyPhoto.changePage(i);
$.prettyPhoto.stopSlideshow();
return false;
});
});
};
if(settings.slideshow){
$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
$pp_pic_holder.find('.pp_nav .pp_play').on('click', function(){
$.prettyPhoto.startSlideshow();
return false;
});
}
$pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme);
$pp_overlay
.css({
'opacity':0,
'height':$(document).height(),
'width':$(window).width()
})
.on('click',function(){
if(!settings.modal) $.prettyPhoto.close();
});
$('a.pp_close').on('click',function(){ $.prettyPhoto.close(); return false; });
if(settings.allow_expand){
$('a.pp_expand').on('click',function(e){
if($(this).hasClass('pp_expand')){
$(this).removeClass('pp_expand').addClass('pp_contract');
doresize=false;
}else{
$(this).removeClass('pp_contract').addClass('pp_expand');
doresize=true;
};
_hideContent(function(){ $.prettyPhoto.open(); });
return false;
});
}
$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').on('click',function(){
$.prettyPhoto.changePage('previous');
$.prettyPhoto.stopSlideshow();
return false;
});
$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').on('click',function(){
$.prettyPhoto.changePage('next');
$.prettyPhoto.stopSlideshow();
return false;
});
_center_overlay();
};
if(!pp_alreadyInitialized&&getHashtag()){
pp_alreadyInitialized=true;
hashIndex=getHashtag();
hashRel=hashIndex;
hashIndex=hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);
hashRel=hashRel.substring(0,hashRel.indexOf('/'));
setTimeout(function(){ $("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click'); },50);
}
return this.off('click.prettyphoto').on('click.prettyphoto',$.prettyPhoto.initialize);
};
function getHashtag(){
var url=location.href;
hashtag=(url.indexOf('#prettyPhoto')!==-1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)):false;
if(hashtag){  hashtag=hashtag.replace(/<|>/g,''); }
return hashtag;
};
function setHashtag(){
if(typeof theRel=='undefined') return;
location.hash=theRel + '/'+rel_index+'/';
};
function clearHashtag(){
if(location.href.indexOf('#prettyPhoto')!==-1) location.hash="prettyPhoto";
}
function getParam(name,url){
name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS="[\\?&]"+name+"=([^&#]*)";
var regex=new RegExp(regexS);
var results=regex.exec(url);
return(results==null) ? "":results[1];
}})(jQuery);
var pp_alreadyInitialized=false;