").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){l.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var e,i=0;e=this.tabs[i];i++)!0===t||-1!==l.inArray(i,t)?l(e).addClass("ui-state-disabled").attr("aria-disabled","true"):l(e).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&l.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=l(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=l(this).outerHeight(!0)}),this.panels.each(function(){l(this).height(Math.max(0,i-l(this).innerHeight()+l(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,l(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,a=l(t.currentTarget).closest("li"),s=a[0]===i[0],n=s&&e.collapsible,r=n?l():this._getPanelForTab(a),h=i.length?this._getPanelForTab(i):l(),i={oldTab:i,oldPanel:h,newTab:n?l():a,newPanel:r};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||s&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!n&&this.tabs.index(a),this.active=s?l():a,this.xhr&&this.xhr.abort(),h.length||r.length||l.error("jQuery UI Tabs: Mismatching fragment identifier."),r.length&&this.load(this.tabs.index(a),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,a=e.newPanel,s=e.oldPanel;function n(){i.running=!1,i._trigger("activate",t,e)}function r(){e.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&i.options.show?i._show(a,i.options.show,n):(a.show(),n())}this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){e.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r()}):(e.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),r()),s.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&s.length?e.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===l(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:l.noop}))},_findActive:function(t){return!1===t?l():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+t+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){l.data(this,"ui-tabs-destroy")?l(this).remove():l(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=l(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),l.isArray(t)?l.map(t,function(t){return t!==i?t:null}):l.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==l.inArray(t,e))return;e=l.isArray(e)?l.merge([t],e).sort():[t]}this._setupDisabled(e)}},load:function(t,a){t=this._getIndex(t);function s(t,e){"abort"===e&&n.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr}var n=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),r=this._getPanelForTab(i),h={tab:i,panel:r};this._isLocal(t[0])||(this.xhr=l.ajax(this._ajaxSettings(t,a,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(i.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){r.html(t),n._trigger("load",a,h),s(i,e)},1)}).fail(function(t,e){setTimeout(function(){s(t,e)},1)})))},_ajaxSettings:function(t,i,a){var s=this;return{url:t.attr("href"),beforeSend:function(t,e){return s._trigger("beforeLoad",i,l.extend({jqXHR:t,ajaxSettings:e},a))}}},_getPanelForTab:function(t){t=l(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}});var a});
jQuery(function(s){if("undefined"==typeof wc_single_product_params)return!1;s("body").on("init",".wc-tabs-wrapper, .woocommerce-tabs",function(){s(".wc-tab, .woocommerce-tabs .panel:not(.panel .panel)").hide();var t=window.location.hash,e=window.location.href,i=s(this).find(".wc-tabs, ul.tabs").first();0<=t.toLowerCase().indexOf("comment-")||"#reviews"===t||"#tab-reviews"===t?i.find("li.reviews_tab a").click():0
\t\t\t\t\t\t\t\t\t\t\t\t\t1\t\t\t\t\t\t\t2\t\t\t\t\t\t\t3\t\t\t\t\t\t\t4\t\t\t\t\t\t\t5\t\t\t\t\t\t\t\t\t\t\t')}).on("click","#respond p.stars a",function(){var t=s(this),e=s(this).closest("#respond").find("#rating"),i=s(this).closest(".stars");return e.val(t.text()),t.siblings("a").removeClass("active"),t.addClass("active"),i.addClass("selected"),!1}).on("click","#respond #submit",function(){var t=s(this).closest("#respond").find("#rating"),e=t.val();if(0 .woocommerce-product-gallery__image",start:function(){e.css("opacity",1)},after:function(t){i.initZoomForTarget(i.$images.eq(t.currentSlide))}},t);e.flexslider(o),s(".woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:eq(0) .wp-post-image").one("load",function(){var i=s(this);i&&setTimeout(function(){var t=i.closest(".woocommerce-product-gallery__image").height(),e=i.closest(".flex-viewport");t&&e&&e.height(t)},100)}).each(function(){this.complete&&s(this).trigger("load")})},e.prototype.initZoom=function(){this.initZoomForTarget(this.$images.first())},e.prototype.initZoomForTarget=function(t){if(!this.zoom_enabled)return!1;var i=this.$target.width(),o=!1;if(s(t).each(function(t,e){if(s(e).find("img").data("large_image_width")>i)return!(o=!0)}),o){var e=s.extend({touch:!1},wc_single_product_params.zoom_options);"ontouchstart"in document.documentElement&&(e.on="click"),t.trigger("zoom.destroy"),t.zoom(e),setTimeout(function(){t.find(":hover").length&&t.trigger("mouseover")},100)}},e.prototype.initPhotoswipe=function(){this.zoom_enabled&&0🔍'),this.$target.on("click",".woocommerce-product-gallery__trigger",this.openPhotoswipe),this.$target.on("click",".woocommerce-product-gallery__image a",function(t){t.preventDefault()}),this.flexslider_enabled||this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)):this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)},e.prototype.onResetSlidePosition=function(){this.$target.flexslider(0)},e.prototype.getGalleryItems=function(){var t=this.$images,r=[];return 0':''),I=e(n.theme?'':''),n.theme&&k?(U='',n.title&&(U+='"),U+='
',U+="
"):n.theme?(U='"):U=k?'':'',w=e(U),y&&(n.theme?(w.css(h),w.addClass("ui-widget-content")):w.css(s)),n.theme||I.css(n.overlayCSS),I.css("position",k?"fixed":"absolute"),(r||n.forceIframe)&&v.css("opacity",0);var C=[v,I,w],S=e(k?"body":t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var O=f&&(!e.support.boxModel||e("object,embed",k?null:t).length>0);if(u||O){if(k&&n.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(u||!e.support.boxModel)&&!k)var E=a(t,"borderTopWidth"),T=a(t,"borderLeftWidth"),M=E?"(0 - "+E+")":0,B=T?"(0 - "+T+")":0;e.each(C,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)k?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),k?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),B&&o.setExpression("left",B),M&&o.setExpression("top",M);else if(n.centerY)k&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0;else if(!n.centerY&&k){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+(n.css&&n.css.top?parseInt(n.css.top,10):0)+') + "px"';o.setExpression("top",i)}})}if(y&&(n.theme?w.find(".ui-widget-content").append(y):w.append(y),(y.jquery||y.nodeType)&&e(y).show()),(r||n.forceIframe)&&n.showOverlay&&v.show(),n.fadeIn){var j=n.onBlock?n.onBlock:c,H=n.showOverlay&&!y?j:c,z=y?j:c;n.showOverlay&&I._fadeIn(n.fadeIn,H),y&&w._fadeIn(n.fadeIn,z)}else n.showOverlay&&I.show(),y&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(i(1,t,n),k?(p=w[0],b=e(n.focusableElements,p),n.focusInput&&setTimeout(l,20)):d(w[0],n.centerX,n.centerY),n.timeout){var W=setTimeout(function(){k?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data("blockUI.timeout",W)}}}function o(t,o){var s,l=t==window,d=e(t),a=d.data("blockUI.history"),c=d.data("blockUI.timeout");c&&(clearTimeout(c),d.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),i(0,t,o),null===o.onUnblock&&(o.onUnblock=d.data("blockUI.onUnblock"),d.removeData("blockUI.onUnblock"));var r;r=l?e(document.body).children().filter(".blockUI").add("body > .blockUI"):d.find(">.blockUI"),o.cursorReset&&(r.length>1&&(r[1].style.cursor=o.cursorReset),r.length>2&&(r[2].style.cursor=o.cursorReset)),l&&(p=b=null),o.fadeOut?(s=r.length,r.stop().fadeOut(o.fadeOut,function(){0==--s&&n(r,a,o,t)})):n(r,a,o,t)}function n(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function i(t,o,n){var i=o==window,l=e(o);if((t||(!i||p)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(d,n,s):e(document).unbind(d,s)}}function s(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&p&&t.data.constrainTabKey){var o=b,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){l(i)},10),!1}var s=t.data,d=e(t.target);return d.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t),d.parents("div."+s.blockMsgClass).length>0||0===d.parents().children().filter("div.blockUI").length}function l(e){if(b){var t=b[!0===e?b.length-1:0];t&&t.focus()}}function d(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-a(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-a(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),o&&(i.top=l>0?l+"px":"0")}function a(t,o){return parseInt(e.css(t,o),10)||0}e.fn._fadeIn=e.fn.fadeIn;var c=e.noop||function(){},r=/MSIE/.test(navigator.userAgent),u=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),f=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){o(window,e)},e.growlUI=function(t,o,n,i){var s=e('');t&&s.append(""+t+"
"),o&&s.append(""+o+"
"),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.mouseover(function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(o){if(this[0]===window)return e.blockUI(o),this;var n=e.extend({},e.blockUI.defaults,o||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,o)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){o(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"Please wait...
",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var p=null,b=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();
!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(m){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u'),i(".password-input").append(''),i(".show-password-input").click(function(){i(this).toggleClass("display-password"),i(this).hasClass("display-password")?i(this).siblings(['input[name="password"]','input[type="password"]']).prop("type","text"):i(this).siblings('input[name="password"]').prop("type","password")})});
jQuery(function(r){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,o=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function a(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function s(e){t&&(localStorage.setItem(o,e),sessionStorage.setItem(o,e))}var e={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(e){e&&e.fragments&&(r.each(e.fragments,function(e,t){r(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),r(document.body).trigger("wc_fragments_refreshed"))},error:function(){r(document.body).trigger("wc_fragments_ajax_error")}};function n(){r.ajax(e)}if(t){var i=null;r(document.body).on("wc_fragment_refresh updated_wc_div",function(){n()}),r(document.body).on("added_to_cart removed_from_cart",function(e,t,r){var n=sessionStorage.getItem(o);null!==n&&n!==undefined&&""!==n||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(r)}),r(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(n,864e5)}),r(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&n()}),r(window).on("pageshow",function(e){e.originalEvent.persisted&&(r(".widget_shopping_cart_content").empty(),r(document.body).trigger("wc_fragment_refresh"))});try{var c=r.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(o),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=1*m+864e5,w=(new Date).getTime();if(d 1&&(value===null||typeof value!=="object")){
options=jQuery.extend({}, options);
if(value===null){
options.expires=-1;
}
if(typeof options.expires==='number'){
var days=options.expires, t=options.expires=new Date();
t.setDate(t.getDate() + days);
}
return (document.cookie=[
encodeURIComponent(key), '=',
options.raw ? String(value):encodeURIComponent(String(value)),
options.expires ? '; expires=' + options.expires.toUTCString():'',
options.path ? '; path=' + options.path:'',
options.domain ? '; domain=' + options.domain:'',
options.secure ? '; secure':''
].join(''));
}
options=value||{};
var result, decode=options.raw ? function (s){ return s; }:decodeURIComponent;
return (result=new RegExp('(?:^|;)' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]):null;
};
jQuery.easing['jswing']=jQuery.easing['swing'];
jQuery.extend(jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d){
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d){
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d){
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d){
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d){
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d){
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d){
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d){
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d){
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d){
return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d){
return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d){
if(t==0) return b;
if(t==d) return b+c;
if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d){
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d){
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d){
if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
},
easeOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b;
},
easeInOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d/2)==2) return b+c; if(!p) p=d*(.3*1.5);
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d){
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d){
if((t/=d) < (1/2.75)){
return c*(7.5625*t*t) + b;
}else if(t < (2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
}else if(t < (2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
}else{
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}},
easeInOutBounce: function (x, t, b, c, d){
if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}});
(function(window, $, undefined){
$.fn.touchwipe=function(settings){
var config={
min_move_x: 20,
min_move_y: 20,
wipeLeft: function(){ },
wipeRight: function(){ },
wipeUp: function(){ },
wipeDown: function(){ },
preventDefaultEvents: true
};
if(settings) $.extend(config, settings);
this.each(function(){
var startX;
var startY;
var isMoving=false;
function cancelTouch(){
this.removeEventListener('touchmove', onTouchMove);
startX=null;
isMoving=false;
}
function onTouchMove(e){
if(config.preventDefaultEvents){
e.preventDefault();
}
if(isMoving){
var x=e.touches[0].pageX;
var y=e.touches[0].pageY;
var dx=startX - x;
var dy=startY - y;
if(Math.abs(dx) >=config.min_move_x){
cancelTouch();
if(dx > 0){
config.wipeLeft();
}else{
config.wipeRight();
}}
else if(Math.abs(dy) >=config.min_move_y){
cancelTouch();
if(dy > 0){
config.wipeDown();
}else{
config.wipeUp();
}}
}}
function onTouchStart(e){
if(e.touches.length==1){
startX=e.touches[0].pageX;
startY=e.touches[0].pageY;
isMoving=true;
this.addEventListener('touchmove', onTouchMove, false);
}}
if('ontouchstart' in document.documentElement){
this.addEventListener('touchstart', onTouchStart, false);
}});
return this;
};
$.elastislide=function(options, element){
this.$el=$(element);
this._init(options);
};
$.elastislide.defaults={
speed:450,
easing:'',
margin:15,
border:2,
minItems:1,
current:0,
onClick:function(){ return false; }};
$.elastislide.prototype={
_init:function(options){
this.options=$.extend(true, {}, $.elastislide.defaults, options);
this.$slider=this.$el.find('ul');
this.$items=this.$slider.children('li');
this.itemsCount=this.$items.length;
this.$esCarousel=this.$slider.parent();
this._validateOptions();
this._configure();
this._addControls();
this._initEvents();
this.$slider.show();
this._slideToCurrent(false);
},
_validateOptions:function(){
if(this.options.speed < 0)
this.options.speed=450;
if(this.options.margin < 0)
this.options.margin=4;
if(this.options.border < 0)
this.options.border=1;
if(this.options.minItems < 1||this.options.minItems > this.itemsCount)
this.options.minItems=1;
if(this.options.current > this.itemsCount - 1)
this.options.current=0;
},
_configure:function(){
this.current=this.options.current;
this.visibleWidth=this.$esCarousel.width();
if(this.visibleWidth < this.options.minItems *(this.options.imageW + 2 * this.options.border) +(this.options.minItems - 1) * this.options.margin){
this._setDim(( this.visibleWidth -(this.options.minItems - 1) * this.options.margin) / this.options.minItems);
this._setCurrentValues();
this.fitCount=this.options.minItems;
}else{
this._setDim();
this._setCurrentValues();
}
this.$slider.css({
width:this.sliderW
});
},
_setDim:function(elW){
this.$items.css({
marginRight:this.options.margin,
width:(elW) ? elW:this.options.imageW + 2 * this.options.border
}).children('a').css({
borderWidth:this.options.border
});
},
_setCurrentValues:function(){
this.itemW=this.$items.outerWidth(true);
this.sliderW=this.itemW * this.itemsCount;
this.visibleWidth=this.$esCarousel.width();
this.fitCount=Math.floor(this.visibleWidth / this.itemW);
},
_addControls:function(){
this.$navNext=$('Next');
this.$navPrev=$('Previous');
$('')
.append(this.$navPrev)
.append(this.$navNext)
.appendTo(this.$el);
},
_toggleControls:function(dir, status){
if(dir&&status){
if(status===1)
(dir==='right') ? this.$navNext.show():this.$navPrev.show();
else
(dir==='right') ? this.$navNext.hide():this.$navPrev.hide();
}
else if(this.current===this.itemsCount - 1||this.fitCount >=this.itemsCount)
this.$navNext.hide();
},
_initEvents:function(){
var instance=this;
$(window).bind('resize.elastislide', function(event){
instance._setCurrentValues();
if(instance.visibleWidth < instance.options.minItems *(instance.options.imageW + 2 * instance.options.border) +(instance.options.minItems - 1) * instance.options.margin){
instance._setDim(( instance.visibleWidth -(instance.options.minItems - 1) * instance.options.margin) / instance.options.minItems);
instance._setCurrentValues();
instance.fitCount=instance.options.minItems;
}else{
instance._setDim();
instance._setCurrentValues();
}
instance.$slider.css({
width:instance.sliderW + 10
});
clearTimeout(instance.resetTimeout);
instance.resetTimeout=setTimeout(function(){
instance._slideToCurrent();
}, 200);
});
this.$navNext.bind('click.elastislide', function(event){
instance._slide('right');
});
this.$navPrev.bind('click.elastislide', function(event){
instance._slide('left');
});
this.$items.bind('click.elastislide', function(event){
instance.options.onClick($(this));
});
instance.$slider.touchwipe({
wipeLeft:function(){
instance._slide('right');
},
wipeRight:function(){
instance._slide('left');
}});
},
_slide:function(dir, val, anim, callback){
if(this.$slider.is(':animated'))
return false;
var ml=parseFloat(this.$slider.css('margin-left'));
if(val===undefined){
var amount=this.fitCount * this.itemW, val;
if(amount < 0) return false;
if(dir==='right'&&this.sliderW -(Math.abs(ml) + amount) < this.visibleWidth){
amount=this.sliderW -(Math.abs(ml) + this.visibleWidth) - this.options.margin;
this._toggleControls('right', -1);
this._toggleControls('left', 1);
}
else if(dir==='left'&&Math.abs(ml) - amount < 0){
amount=Math.abs(ml);
this._toggleControls('left', -1);
this._toggleControls('right', 1);
}else{
var fml;
(dir==='right')
? fml=Math.abs(ml) + this.options.margin + Math.abs(amount)
: fml=Math.abs(ml) - this.options.margin - Math.abs(amount);
if(fml > 0)
this._toggleControls('left', 1);
else
this._toggleControls('left', -1);
if(fml < this.sliderW - this.visibleWidth)
this._toggleControls('right', 1);
else
this._toggleControls('right', -1);
}
(dir==='right') ? val='-=' + amount:val='+=' + amount
}else{
var fml=Math.abs(val);
if(Math.max(this.sliderW, this.visibleWidth) - fml < this.visibleWidth){
val=-(Math.max(this.sliderW, this.visibleWidth) - this.visibleWidth);
if(val!==0)
val +=this.options.margin;
this._toggleControls('right', -1);
fml=Math.abs(val);
}
if(fml > 0)
this._toggleControls('left', 1);
else
this._toggleControls('left', -1);
if(Math.max(this.sliderW, this.visibleWidth) - this.visibleWidth > fml + this.options.margin)
this._toggleControls('right', 1);
else
this._toggleControls('right', -1);
}
$.fn.applyStyle=(anim===undefined) ? $.fn.animate:$.fn.css;
var sliderCSS={ marginLeft:val };
var instance=this;
this.$slider.applyStyle(sliderCSS, $.extend(true, [], { duration:this.options.speed, easing:this.options.easing, complete:function(){
if(callback) callback.call();
}}));
},
_slideToCurrent:function(anim){
var amount=this.current * this.itemW;
this._slide('', -amount, anim);
},
add:function($newelems, callback){
this.$items=this.$items.add($newelems);
this.itemsCount=this.$items.length;
this._setDim();
this._setCurrentValues();
this.$slider.css({
width:this.sliderW
});
this._slideToCurrent();
if(callback) callback.call($newelems);
},
destroy:function(callback){
this._destroy(callback);
},
_destroy:function(callback){
this.$el.unbind('.elastislide').removeData('elastislide');
$(window).unbind('.elastislide');
if(callback) callback.call();
}};
var logError=function(message){
if(this.console){
console.error(message);
}};
$.fn.elastislide=function(options){
if(typeof options==='string'){
var args=Array.prototype.slice.call(arguments, 1);
this.each(function(){
var instance=$.data(this, 'elastislide');
if(!instance){
logError("cannot call methods on elastislide prior to initialization; " +
"attempted to call method '" + options + "'");
return;
}
if(!$.isFunction(instance[options])||options.charAt(0)==="_"){
logError("no such method '" + options + "' for elastislide instance");
return;
}
instance[ options ].apply(instance, args);
});
}else{
this.each(function(){
var instance=$.data(this, 'elastislide');
if(!instance){
$.data(this, 'elastislide', new $.elastislide(options, this));
}});
}
return this;
};})(window, jQuery);
!function(m){var a=!0;m.flexslider=function(g,e){var h=m(g);"undefined"==typeof e.rtl&&"rtl"==m("html").attr("dir")&&(e.rtl=!0),h.vars=m.extend({},m.flexslider.defaults,e);var t,c=h.vars.namespace,S=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,u=("ontouchstart"in window||S||window.DocumentTouch&&document instanceof DocumentTouch)&&h.vars.touch,l="click touchend MSPointerUp keyup",d="",x="vertical"===h.vars.direction,y=h.vars.reverse,b=0'),1").attr("href","#").text(n),"thumbnails"===h.vars.controlNav&&(e=m("").attr("src",t.attr("data-thumb"))),""!==t.attr("data-thumb-alt")&&e.attr("alt",t.attr("data-thumb-alt")),"thumbnails"===h.vars.controlNav&&!0===h.vars.thumbCaptions){var r=t.attr("data-thumbcaption");if(""!==r&&undefined!==r){var s=m("").addClass(c+"caption").text(r);e.append(s)}}var o=m("");e.appendTo(o),o.append(""),h.controlNavScaffold.append(o),n++}h.controlsContainer?m(h.controlsContainer).append(h.controlNavScaffold):h.append(h.controlNavScaffold),p.controlNav.set(),p.controlNav.active(),h.controlNavScaffold.delegate("a, img",l,function(e){if(e.preventDefault(),""===d||d===e.type){var t=m(this),a=h.controlNav.index(t);t.hasClass(c+"active")||(h.direction=a>h.currentSlide?"next":"prev",h.flexAnimate(a,h.vars.pauseOnAction))}""===d&&(d=e.type),p.setToClearWatchedEvent()})},setupManual:function(){h.controlNav=h.manualControls,p.controlNav.active(),h.controlNav.bind(l,function(e){if(e.preventDefault(),""===d||d===e.type){var t=m(this),a=h.controlNav.index(t);t.hasClass(c+"active")||(a>h.currentSlide?h.direction="next":h.direction="prev",h.flexAnimate(a,h.vars.pauseOnAction))}""===d&&(d=e.type),p.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===h.vars.controlNav?"img":"a";h.controlNav=m("."+c+"control-nav li "+e,h.controlsContainer?h.controlsContainer:h)},active:function(){h.controlNav.removeClass(c+"active").eq(h.animatingTo).addClass(c+"active")},update:function(e,t){1'+h.count+"")):1===h.pagingCount?h.controlNavScaffold.find("li").remove():h.controlNav.eq(t).closest("li").remove(),p.controlNav.set(),1'+h.vars.prevText+''+h.vars.nextText+"");h.customDirectionNav?h.directionNav=h.customDirectionNav:h.controlsContainer?(m(h.controlsContainer).append(e),h.directionNav=m("."+c+"direction-nav li a",h.controlsContainer)):(h.append(e),h.directionNav=m("."+c+"direction-nav li a",h)),p.directionNav.update(),h.directionNav.bind(l,function(e){var t;e.preventDefault(),""!==d&&d!==e.type||(t=m(this).hasClass(c+"next")?h.getTarget("next"):h.getTarget("prev"),h.flexAnimate(t,h.vars.pauseOnAction)),""===d&&(d=e.type),p.setToClearWatchedEvent()})},update:function(){var e=c+"disabled";1===h.pagingCount?h.directionNav.addClass(e).attr("tabindex","-1"):h.vars.animationLoop?h.directionNav.removeClass(e).removeAttr("tabindex"):0===h.animatingTo?h.directionNav.removeClass(e).filter("."+c+"prev").addClass(e).attr("tabindex","-1"):h.animatingTo===h.last?h.directionNav.removeClass(e).filter("."+c+"next").addClass(e).attr("tabindex","-1"):h.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=m('');h.controlsContainer?(h.controlsContainer.append(e),h.pausePlay=m("."+c+"pauseplay a",h.controlsContainer)):(h.append(e),h.pausePlay=m("."+c+"pauseplay a",h)),p.pausePlay.update(h.vars.slideshow?c+"pause":c+"play"),h.pausePlay.bind(l,function(e){e.preventDefault(),""!==d&&d!==e.type||(m(this).hasClass(c+"pause")?(h.manualPause=!0,h.manualPlay=!1,h.pause()):(h.manualPause=!1,h.manualPlay=!0,h.play())),""===d&&(d=e.type),p.setToClearWatchedEvent()})},update:function(e){"play"===e?h.pausePlay.removeClass(c+"pause").addClass(c+"play").html(h.vars.playText):h.pausePlay.removeClass(c+"play").addClass(c+"pause").html(h.vars.pauseText)}},touch:function(){var i,r,s,o,l,d,e,n,c,u=!1,t=0,a=0,v=0;if(S){g.style.msTouchAction="none",g._gesture=new MSGesture,(g._gesture.target=g).addEventListener("MSPointerDown",function p(e){e.stopPropagation(),h.animating?e.preventDefault():(h.pause(),g._gesture.addPointer(e.pointerId),v=0,o=x?h.h:h.w,d=Number(new Date),s=b&&y&&h.animatingTo===h.last?0:b&&y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:b&&h.currentSlide===h.last?h.limit:b?(h.itemW+h.vars.itemMargin)*h.move*h.currentSlide:y?(h.last-h.currentSlide+h.cloneOffset)*o:(h.currentSlide+h.cloneOffset)*o)},!1),g._slider=h,g.addEventListener("MSGestureChange",function m(e){e.stopPropagation();var t=e.target._slider;if(!t)return;var a=-e.translationX,n=-e.translationY;if(v+=x?n:a,l=(t.vars.rtl?-1:1)*v,u=x?Math.abs(v)o/2)?t.flexAnimate(n,t.vars.pauseOnAction):w||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}s=l=r=i=null,v=0},!1)}else e=function(e){h.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(h.pause(),o=x?h.h:h.w,d=Number(new Date),t=e.touches[0].pageX,a=e.touches[0].pageY,s=b&&y&&h.animatingTo===h.last?0:b&&y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:b&&h.currentSlide===h.last?h.limit:b?(h.itemW+h.vars.itemMargin)*h.move*h.currentSlide:y?(h.last-h.currentSlide+h.cloneOffset)*o:(h.currentSlide+h.cloneOffset)*o,i=x?a:t,r=x?t:a,g.addEventListener("touchmove",n,!1),g.addEventListener("touchend",c,!1))},n=function(e){t=e.touches[0].pageX,a=e.touches[0].pageY,l=x?i-a:(h.vars.rtl?-1:1)*(i-t);(!(u=x?Math.abs(l)o/2)?h.flexAnimate(a,h.vars.pauseOnAction):w||h.flexAnimate(h.currentSlide,h.vars.pauseOnAction,!0)}g.removeEventListener("touchend",c,!1),s=l=r=i=null},g.addEventListener("touchstart",e,!1)},resize:function(){!h.animating&&h.is(":visible")&&(b||h.doMath(),w?p.smoothHeight():b?(h.slides.width(h.computedW),h.update(h.pagingCount),h.setProps()):x?(h.viewport.height(h.h),h.setProps(h.h,"setTotal")):(h.vars.smoothHeight&&p.smoothHeight(),h.newSlides.width(h.computedW),h.setProps(h.computedW,"setTotal")))},smoothHeight:function(e){if(!x||w){var t=w?h:h.viewport;e?t.animate({height:h.slides.eq(h.animatingTo).innerHeight()},e):t.innerHeight(h.slides.eq(h.animatingTo).innerHeight())}},sync:function(e){var t=m(h.vars.sync).data("flexslider"),a=h.animatingTo;switch(e){case"animate":t.flexAnimate(a,h.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=m(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=p.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){p.pauseInvisible.isHidden()?h.startTimeout?clearTimeout(h.startTimeout):h.pause():h.started?h.play():0h.currentSlide?"next":"prev"),v&&1===h.pagingCount&&(h.direction=h.currentItemh.limit&&1!==h.visible?h.limit:l):0===h.currentSlide&&e===h.count-1&&h.vars.animationLoop&&"next"!==h.direction?y?(h.count+h.cloneOffset)*d:0:h.currentSlide===h.last&&0===e&&h.vars.animationLoop&&"prev"!==h.direction?y?0:(h.count+1)*d:y?(h.count-1-e+h.cloneOffset)*d:(e+h.cloneOffset)*d,h.setProps(o,"",h.vars.animationSpeed),h.transitions?(h.vars.animationLoop&&h.atEnd||(h.animating=!1,h.currentSlide=h.animatingTo),h.container.unbind("webkitTransitionEnd transitionend"),h.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(h.ensureAnimationEnd),h.wrapup(d)}),clearTimeout(h.ensureAnimationEnd),h.ensureAnimationEnd=setTimeout(function(){h.wrapup(d)},h.vars.animationSpeed+100)):h.container.animate(h.args,h.vars.animationSpeed,h.vars.easing,function(){h.wrapup(d)})}h.vars.smoothHeight&&p.smoothHeight(h.vars.animationSpeed)}},h.wrapup=function(e){w||b||(0===h.currentSlide&&h.animatingTo===h.last&&h.vars.animationLoop?h.setProps(e,"jumpEnd"):h.currentSlide===h.last&&0===h.animatingTo&&h.vars.animationLoop&&h.setProps(e,"jumpStart")),h.animating=!1,h.currentSlide=h.animatingTo,h.vars.after(h)},h.animateSlides=function(){!h.animating&&a&&h.flexAnimate(h.getTarget("next"))},h.pause=function(){clearInterval(h.animatedSlides),h.animatedSlides=null,h.playing=!1,h.vars.pausePlay&&p.pausePlay.update("play"),h.syncExists&&p.sync("pause")},h.play=function(){h.playing&&clearInterval(h.animatedSlides),h.animatedSlides=h.animatedSlides||setInterval(h.animateSlides,h.vars.slideshowSpeed),h.started=h.playing=!0,h.vars.pausePlay&&p.pausePlay.update("pause"),h.syncExists&&p.sync("play")},h.stop=function(){h.pause(),h.stopped=!0},h.canAdvance=function(e,t){var a=v?h.pagingCount-1:h.last;return!!t||(v&&h.currentItem===h.count-1&&0===e&&"prev"===h.direction||(!v||0!==h.currentItem||e!==h.pagingCount-1||"next"===h.direction)&&((e!==h.currentSlide||v)&&(!!h.vars.animationLoop||(!h.atEnd||0!==h.currentSlide||e!==a||"next"===h.direction)&&(!h.atEnd||h.currentSlide!==a||0!==e||"next"!==h.direction))))},h.getTarget=function(e){return"next"===(h.direction=e)?h.currentSlide===h.last?0:h.currentSlide+1:0===h.currentSlide?h.last:h.currentSlide-1},h.setProps=function(e,t,a){var n,i=(n=e||(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo,function(){if(b)return"setTouch"===t?e:y&&h.animatingTo===h.last?0:y?h.limit-(h.itemW+h.vars.itemMargin)*h.move*h.animatingTo:h.animatingTo===h.last?h.limit:n;switch(t){case"setTotal":return y?(h.count-1-h.currentSlide+h.cloneOffset)*e:(h.currentSlide+h.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return y?e:h.count*e;case"jumpStart":return y?h.count*e:e;default:return e}}()*(h.vars.rtl?1:-1)+"px");h.transitions&&(i=x?"translate3d(0,"+i+",0)":"translate3d("+parseInt(i)+"px,0,0)",a=a!==undefined?a/1e3+"s":"0s",h.container.css("-"+h.pfx+"-transition-duration",a),h.container.css("transition-duration",a)),h.args[h.prop]=i,(h.transitions||a===undefined)&&h.container.css(h.args),h.container.css("transform",i)},h.setup=function(e){var t,a;w?(h.vars.rtl?h.slides.css({width:"100%","float":"right",marginLeft:"-100%",position:"relative"}):h.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(u?h.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+h.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(h.currentSlide).css({opacity:1,zIndex:2}):0==h.vars.fadeFirstSlide?h.slides.css({opacity:0,display:"block",zIndex:1}).eq(h.currentSlide).css({zIndex:2}).css({opacity:1}):h.slides.css({opacity:0,display:"block",zIndex:1}).eq(h.currentSlide).css({zIndex:2}).animate({opacity:1},h.vars.animationSpeed,h.vars.easing)),h.vars.smoothHeight&&p.smoothHeight()):("init"===e&&(h.viewport=m('').css({overflow:"hidden",position:"relative"}).appendTo(h).append(h.container),h.cloneCount=0,h.cloneOffset=0,y&&(a=m.makeArray(h.slides).reverse(),h.slides=m(a),h.container.empty().append(h.slides))),h.vars.animationLoop&&!b&&(h.cloneCount=2,h.cloneOffset=1,"init"!==e&&h.container.find(".clone").remove(),h.container.append(p.uniqueID(h.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(p.uniqueID(h.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),h.newSlides=m(h.vars.selector,h),t=y?h.count-1-h.currentSlide+h.cloneOffset:h.currentSlide+h.cloneOffset,x&&!b?(h.container.height(200*(h.count+h.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){h.newSlides.css({display:"block"}),h.doMath(),h.viewport.height(h.h),h.setProps(t*h.h,"init")},"init"===e?100:0)):(h.container.width(200*(h.count+h.cloneCount)+"%"),h.setProps(t*h.computedW,"init"),setTimeout(function(){h.doMath(),h.vars.rtl?h.newSlides.css({width:h.computedW,marginRight:h.computedM,"float":"right",display:"block"}):h.newSlides.css({width:h.computedW,marginRight:h.computedM,"float":"left",display:"block"}),h.vars.smoothHeight&&p.smoothHeight()},"init"===e?100:0)));b||h.slides.removeClass(c+"active-slide").eq(h.currentSlide).addClass(c+"active-slide"),h.vars.init(h)},h.doMath=function(){var e=h.slides.first(),t=h.vars.itemMargin,a=h.vars.minItems,n=h.vars.maxItems;h.w=h.viewport===undefined?h.width():h.viewport.width(),h.isFirefox&&(h.w=h.width()),h.h=e.height(),h.boxPadding=e.outerWidth()-e.width(),b?(h.itemT=h.vars.itemWidth+t,h.itemM=t,h.minW=a?a*h.itemT:h.w,h.maxW=n?n*h.itemT-t:h.w,h.itemW=h.minW>h.w?(h.w-t*(a-1))/a:h.maxWh.w?h.w:h.vars.itemWidth,h.visible=Math.floor(h.w/h.itemW),h.move=0h.w?h.itemW*(h.count-1)+t*(h.count-1):(h.itemW+t)*h.count-h.w-t):(h.itemW=h.w,h.itemM=t,h.pagingCount=h.count,h.last=h.count-1),h.computedW=h.itemW-h.boxPadding,h.computedM=h.itemM},h.update=function(e,t){h.doMath(),b||(eh.controlNav.length?p.controlNav.update("add"):("remove"===t&&!b||h.pagingCounth.last&&(h.currentSlide-=1,h.animatingTo-=1),p.controlNav.update("remove",h.last))),h.vars.directionNav&&p.directionNav.update()},h.addSlide=function(e,t){var a=m(e);h.count+=1,h.last=h.count-1,x&&y?t!==undefined?h.slides.eq(h.count-t).after(a):h.container.prepend(a):t!==undefined?h.slides.eq(t).before(a):h.container.append(a),h.update(t,"add"),h.slides=m(h.vars.selector+":not(.clone)",h),h.setup(),h.vars.added(h)},h.removeSlide=function(e){var t=isNaN(e)?h.slides.index(m(e)):e;h.count-=1,h.last=h.count-1,isNaN(e)?m(e,h.slides).remove():x&&y?h.slides.eq(h.last).remove():h.slides.eq(e).remove(),h.doMath(),h.update(t,"remove"),h.slides=m(h.vars.selector+":not(.clone)",h),h.setup(),h.vars.removed(h)},p.init()},m(window).blur(function(e){a=!1}).focus(function(e){a=!0}),m.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},m.fn.flexslider=function(n){if(n===undefined&&(n={}),"object"==typeof n)return this.each(function(){var e=m(this),t=n.selector?n.selector:".slides > li",a=e.find(t);1===a.length&&!1===n.allowOneSlide||0===a.length?(a.fadeIn(400),n.start&&n.start(e)):e.data("flexslider")===undefined&&new m.flexslider(this,n)});var e=m(this).data("flexslider");switch(n){case"play":e.play();break;case"pause":e.pause();break;case"stop":e.stop();break;case"next":e.flexAnimate(e.getTarget("next"),!0);break;case"prev":case"previous":e.flexAnimate(e.getTarget("prev"),!0);break;default:"number"==typeof n&&e.flexAnimate(n,!0)}}}(jQuery);
//////////////////////////////////////////////////////////////////////////////////
(function ($){
function format(str){
for (var i=1; i < arguments.length; i++){
str=str.replace('%' + (i - 1), arguments[i]);
}
return str;
}
function CloudZoom(jWin, opts){
var sImg=$('img', jWin);
var img1;
var img2;
var zoomDiv=null;
var $mouseTrap=null;
var lens=null;
var $tint=null;
var softFocus=null;
var $ie6Fix=null;
var zoomImage;
var controlTimer=0;
var cw, ch;
var destU=0;
var destV=0;
var currV=0;
var currU=0;
var filesLoaded=0;
var mx,
my;
var ctx=this, zw;
setTimeout(function (){
if($mouseTrap===null){
var w=jWin.width();
jWin.parent().append(format('Loading...
', w / 3, (w / 2) - (w / 6))).find(':last').css('opacity', 0.5);
}}, 200);
var ie6FixRemove=function (){
if($ie6Fix!==null){
$ie6Fix.remove();
$ie6Fix=null;
}};
this.removeBits=function (){
if(lens){
lens.remove();
lens=null;
}
if($tint){
$tint.remove();
$tint=null;
}
if(softFocus){
softFocus.remove();
softFocus=null;
}
ie6FixRemove();
$('.cloud-zoom-loading', jWin.parent()).remove();
};
this.destroy=function (){
jWin.data('zoom', null);
if($mouseTrap){
$mouseTrap.unbind();
$mouseTrap.remove();
$mouseTrap=null;
}
if(zoomDiv){
zoomDiv.remove();
zoomDiv=null;
}
this.removeBits();
};
this.fadedOut=function (){
if(zoomDiv){
zoomDiv.remove();
zoomDiv=null;
}
this.removeBits();
};
this.controlLoop=function (){
if(lens){
var x=(mx - sImg.offset().left - (cw * 0.5)) >> 0;
var y=(my - sImg.offset().top - (ch * 0.5)) >> 0;
if(x < 0){
x=0;
}
else if(x > (sImg.outerWidth() - cw)){
x=(sImg.outerWidth() - cw);
}
if(y < 0){
y=0;
}
else if(y > (sImg.outerHeight() - ch)){
y=(sImg.outerHeight() - ch);
}
lens.css({
left: x,
top: y
});
lens.css('background-position', (-x) + 'px ' + (-y) + 'px');
destU=(((x) / sImg.outerWidth()) * zoomImage.width) >> 0;
destV=(((y) / sImg.outerHeight()) * zoomImage.height) >> 0;
currU +=(destU - currU) / opts.smoothMove;
currV +=(destV - currV) / opts.smoothMove;
zoomDiv.css('background-position', (-(currU >> 0) + 'px ') + (-(currV >> 0) + 'px'));
}
controlTimer=setTimeout(function (){
ctx.controlLoop();
}, 30);
};
this.init2=function (img, id){
filesLoaded++;
if(id===1){
zoomImage=img;
}
if(filesLoaded===2){
this.init();
}};
this.init=function (){
$('.cloud-zoom-loading', jWin.parent()).remove();
$mouseTrap=jWin.parent().append(format("", sImg.outerWidth(), sImg.outerHeight(), 0, 0)).find(':last');
$mouseTrap.bind('mousemove', this, function (event){
mx=event.pageX;
my=event.pageY;
});
$mouseTrap.bind('mouseleave', this, function (event){
clearTimeout(controlTimer);
if(lens){ lens.fadeOut(299); }
if($tint){ $tint.fadeOut(299); }
if(softFocus){ softFocus.fadeOut(299); }
zoomDiv.fadeOut(300, function (){
ctx.fadedOut();
});
return false;
});
$mouseTrap.bind('mouseenter', this, function (event){
mx=event.pageX;
my=event.pageY;
zw=event.data;
if(zoomDiv){
zoomDiv.stop(true, false);
zoomDiv.remove();
}
var xPos=opts.adjustX,
yPos=opts.adjustY;
var siw=sImg.outerWidth();
var sih=sImg.outerHeight();
var w=opts.zoomWidth;
var h=opts.zoomHeight;
if(opts.zoomWidth=='auto'){
w=siw;
}
if(opts.zoomHeight=='auto'){
h=sih;
}
var appendTo=jWin.parent();
switch (opts.position){
case 'top':
yPos -=h;
break;
case 'right':
xPos +=siw;
break;
case 'bottom':
yPos +=sih;
break;
case 'left':
xPos -=w;
break;
case 'inside':
w=siw;
h=sih;
break;
default:
appendTo=$('#' + opts.position);
if(!appendTo.length){
appendTo=jWin;
xPos +=siw;
yPos +=sih;
}else{
w=appendTo.innerWidth();
h=appendTo.innerHeight();
}}
zoomDiv=appendTo.append(format('', xPos, yPos, w, h, zoomImage.src)).find(':last');
if(sImg.attr('title')&&opts.showTitle){
zoomDiv.append(format('%0
', sImg.attr('title'))).find(':last').css('opacity', opts.titleOpacity);
}
if($.browser.msie&&$.browser.version < 7){
$ie6Fix=$('').css({
position: "absolute",
left: xPos,
top: yPos,
zIndex: 99,
width: w,
height: h
}).insertBefore(zoomDiv);
}
zoomDiv.fadeIn(500);
if(lens){
lens.remove();
lens=null;
}
cw=(sImg.outerWidth() / zoomImage.width) * zoomDiv.width();
ch=(sImg.outerHeight() / zoomImage.height) * zoomDiv.height();
lens=jWin.append(format("", cw, ch)).find(':last');
$mouseTrap.css('cursor', lens.css('cursor'));
var noTrans=false;
if(opts.tint){
$tint=jWin.append(format('', sImg.outerWidth(), sImg.outerHeight(), opts.tint)).find(':last');
$tint.css('opacity', opts.tintOpacity);
noTrans=true;
$tint.fadeIn(500);
}
if(opts.softFocus){
lens.css('background', 'url("' + sImg.attr('src') + '")');
softFocus=jWin.append(format('', sImg.outerWidth() - 2, sImg.outerHeight() - 2, opts.tint)).find(':last');
softFocus.css('background', 'url("' + sImg.attr('src') + '")');
softFocus.css('opacity', 0.5);
noTrans=true;
softFocus.fadeIn(500);
}
if(!noTrans){
lens.css('opacity', opts.lensOpacity);
}
if(opts.position!=='inside'){ lens.fadeIn(500); }
zw.controlLoop();
return;
});
};
img1=new Image();
$(img1).load(function (){
ctx.init2(this, 0);
});
img1.src=sImg.attr('src');
img2=new Image();
$(img2).load(function (){
ctx.init2(this, 1);
});
img2.src=jWin.attr('href');
}
$.fn.CloudZoom=function (options){
try {
document.execCommand ("BackgroundImageCache", false, true);
} catch (e){}
this.each(function (){
var relOpts, opts;
eval('var a={' + $(this).attr('rel') + '}');
relOpts=a;
if($(this).is('.cloud-zoom')){
$(this).css({
'position': 'relative',
'display': 'block'
});
$('img', $(this)).css({
'display': 'block'
});
if($(this).parent().attr('id')!='wrap'){
$(this).wrap('');
}
opts=$.extend({}, $.fn.CloudZoom.defaults, options);
opts=$.extend({}, opts, relOpts);
$(this).data('zoom', new CloudZoom($(this), opts));
}else if($(this).is('.cloud-zoom-gallery')){
opts=$.extend({}, relOpts, options);
$(this).data('relOpts', opts);
$(this).bind('click', $(this), function (event){
var data=event.data.data('relOpts');
$('#' + data.useZoom).data('zoom').destroy();
$('#' + data.useZoom).attr('href', event.data.attr('href'));
$('#' + data.useZoom + ' img').attr('src', event.data.data('relOpts').smallImage);
$('#zoom-cb').attr('href', event.data.attr('href'));
$('#' + event.data.data('relOpts').useZoom).CloudZoom();
return false;
});
}});
return this;
};
$.fn.CloudZoom.defaults={
zoomWidth: 'auto',
zoomHeight: 'auto',
position: 'right',
tint: false,
tintOpacity: 0.5,
lensOpacity: 0.5,
softFocus: false,
smoothMove: 3,
showTitle: false,
titleOpacity: 0.5,
adjustX: 0,
adjustY: 0
};})(jQuery);
(function ($, document, window){
var
defaults={
transition: "elastic",
speed: 300,
width: false,
initialWidth: "600",
innerWidth: false,
maxWidth: false,
height: false,
initialHeight: "450",
innerHeight: false,
maxHeight: false,
scalePhotos: true,
scrolling: true,
inline: false,
html: false,
iframe: false,
fastIframe: true,
photo: false,
href: false,
title: false,
rel: false,
opacity: 0.9,
preloading: true,
current: "image {current} of {total}",
previous: "previous",
next: "next",
close: "close",
open: false,
returnFocus: true,
reposition: true,
loop: true,
slideshow: false,
slideshowAuto: true,
slideshowSpeed: 2500,
slideshowStart: "start slideshow",
slideshowStop: "stop slideshow",
onOpen: false,
onLoad: false,
onComplete: false,
onCleanup: false,
onClosed: false,
overlayClose: true,
escKey: true,
arrowKey: true,
top: false,
bottom: false,
left: false,
right: false,
fixed: false,
data: undefined
},
colorbox='colorbox',
prefix='cbox',
boxElement=prefix + 'Element',
event_open=prefix + '_open',
event_load=prefix + '_load',
event_complete=prefix + '_complete',
event_cleanup=prefix + '_cleanup',
event_closed=prefix + '_closed',
event_purge=prefix + '_purge',
isIE = !$.support.opacity&&!$.support.style,
isIE6=isIE&&!window.XMLHttpRequest,
event_ie6=prefix + '_IE6',
$overlay,
$box,
$wrap,
$content,
$topBorder,
$leftBorder,
$rightBorder,
$bottomBorder,
$related,
$window,
$loaded,
$loadingBay,
$loadingOverlay,
$title,
$current,
$slideshow,
$next,
$prev,
$close,
$groupControls,
settings,
interfaceHeight,
interfaceWidth,
loadedHeight,
loadedWidth,
element,
index,
photo,
open,
active,
closing,
loadingTimer,
publicMethod,
div="div",
init;
function $tag(tag, id, css){
var element=document.createElement(tag);
if(id){
element.id=prefix + id;
}
if(css){
element.style.cssText=css;
}
return $(element);
}
function getIndex(increment){
var
max=$related.length,
newIndex=(index + increment) % max;
return (newIndex < 0) ? max + newIndex:newIndex;
}
function setSize(size, dimension){
return Math.round((/%/.test(size) ? ((dimension==='x' ? $window.width():$window.height()) / 100):1) * parseInt(size, 10));
}
function isImage(url){
return settings.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(url);
}
function makeSettings(){
var i;
settings=$.extend({}, $.data(element, colorbox));
for (i in settings){
if($.isFunction(settings[i])&&i.slice(0, 2)!=='on'){
settings[i]=settings[i].call(element);
}}
settings.rel=settings.rel||element.rel||'nofollow';
settings.href=settings.href||$(element).attr('href');
settings.title=settings.title||element.title;
if(typeof settings.href==="string"){
settings.href=$.trim(settings.href);
}}
function trigger(event, callback){
$.event.trigger(event);
if(callback){
callback.call(element);
}}
function slideshow(){
var
timeOut,
className=prefix + "Slideshow_",
click="click." + prefix,
start,
stop,
clear;
if(settings.slideshow&&$related[1]){
start=function (){
$slideshow
.text(settings.slideshowStop)
.unbind(click)
.bind(event_complete, function (){
if(settings.loop||$related[index + 1]){
timeOut=setTimeout(publicMethod.next, settings.slideshowSpeed);
}})
.bind(event_load, function (){
clearTimeout(timeOut);
})
.one(click + ' ' + event_cleanup, stop);
$box.removeClass(className + "off").addClass(className + "on");
timeOut=setTimeout(publicMethod.next, settings.slideshowSpeed);
};
stop=function (){
clearTimeout(timeOut);
$slideshow
.text(settings.slideshowStart)
.unbind([event_complete, event_load, event_cleanup, click].join(' '))
.one(click, function (){
publicMethod.next();
start();
});
$box.removeClass(className + "on").addClass(className + "off");
};
if(settings.slideshowAuto){
start();
}else{
stop();
}}else{
$box.removeClass(className + "off " + className + "on");
}}
function launch(target){
if(!closing){
element=target;
makeSettings();
$related=$(element);
index=0;
if(settings.rel!=='nofollow'){
$related=$('.' + boxElement).filter(function (){
var relRelated=$.data(this, colorbox).rel||this.rel;
return (relRelated===settings.rel);
});
index=$related.index(element);
if(index===-1){
$related=$related.add(element);
index=$related.length - 1;
}}
if(!open){
open=active=true;
$box.show();
if(settings.returnFocus){
$(element).blur().one(event_closed, function (){
$(this).focus();
});
}
$overlay.css({"opacity": +settings.opacity, "cursor": settings.overlayClose ? "pointer":"auto"}).show();
settings.w=setSize(settings.initialWidth, 'x');
settings.h=setSize(settings.initialHeight, 'y');
publicMethod.position();
if(isIE6){
$window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function (){
$overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()});
}).trigger('resize.' + event_ie6);
}
trigger(event_open, settings.onOpen);
$groupControls.add($title).hide();
$close.html(settings.close).show();
}
publicMethod.load(true);
}}
function appendHTML(){
if(!$box&&document.body){
init=false;
$window=$(window);
$box=$tag(div).attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6':'IE'):''}).hide();
$overlay=$tag(div, "Overlay", isIE6 ? 'position:absolute':'').hide();
$wrap=$tag(div, "Wrapper");
$content=$tag(div, "Content").append($loaded=$tag(div, "LoadedContent", 'width:0; height:0; overflow:hidden'),
$loadingOverlay=$tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic")),
$title=$tag(div, "Title"),
$current=$tag(div, "Current"),
$next=$tag(div, "Next"),
$prev=$tag(div, "Previous"),
$slideshow=$tag(div, "Slideshow").bind(event_open, slideshow),
$close=$tag(div, "Close")
);
$wrap.append($tag(div).append($tag(div, "TopLeft"),
$topBorder=$tag(div, "TopCenter"),
$tag(div, "TopRight")
),
$tag(div, false, 'clear:left').append($leftBorder=$tag(div, "MiddleLeft"),
$content,
$rightBorder=$tag(div, "MiddleRight")
),
$tag(div, false, 'clear:left').append($tag(div, "BottomLeft"),
$bottomBorder=$tag(div, "BottomCenter"),
$tag(div, "BottomRight")
)
).find('div div').css({'float': 'left'});
$loadingBay=$tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none');
$groupControls=$next.add($prev).add($current).add($slideshow);
$(document.body).append($overlay, $box.append($wrap, $loadingBay));
}}
function addBindings(){
if($box){
if(!init){
init=true;
interfaceHeight=$topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
interfaceWidth=$leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
loadedHeight=$loaded.outerHeight(true);
loadedWidth=$loaded.outerWidth(true);
$box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth});
$next.click(function (){
publicMethod.next();
});
$prev.click(function (){
publicMethod.prev();
});
$close.click(function (){
publicMethod.close();
});
$overlay.click(function (){
if(settings.overlayClose){
publicMethod.close();
}});
$(document).bind('keydown.' + prefix, function (e){
var key=e.keyCode;
if(open&&settings.escKey&&key===27){
e.preventDefault();
publicMethod.close();
}
if(open&&settings.arrowKey&&$related[1]){
if(key===37){
e.preventDefault();
$prev.click();
}else if(key===39){
e.preventDefault();
$next.click();
}}
});
$('.' + boxElement, document).live('click', function (e){
if(!(e.which > 1||e.shiftKey||e.altKey||e.metaKey)){
e.preventDefault();
launch(this);
}});
}
return true;
}
return false;
}
if($.colorbox){
return;
}
$(appendHTML);
publicMethod=$.fn[colorbox]=$[colorbox]=function (options, callback){
var $this=this;
options=options||{};
appendHTML();
if(addBindings()){
if(!$this[0]){
if($this.selector){
return $this;
}
$this=$('');
options.open=true;
}
if(callback){
options.onComplete=callback;
}
$this.each(function (){
$.data(this, colorbox, $.extend({}, $.data(this, colorbox)||defaults, options));
}).addClass(boxElement);
if(($.isFunction(options.open)&&options.open.call($this))||options.open){
launch($this[0]);
}}
return $this;
};
publicMethod.position=function (speed, loadedCallback){
var
top=0,
left=0,
offset=$box.offset(),
scrollTop=$window.scrollTop(),
scrollLeft=$window.scrollLeft();
$window.unbind('resize.' + prefix);
$box.css({top: -9e4, left: -9e4});
if(settings.fixed&&!isIE6){
offset.top -=scrollTop;
offset.left -=scrollLeft;
$box.css({position: 'fixed'});
}else{
top=scrollTop;
left=scrollLeft;
$box.css({position: 'absolute'});
}
if(settings.right!==false){
left +=Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0);
}else if(settings.left!==false){
left +=setSize(settings.left, 'x');
}else{
left +=Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
}
if(settings.bottom!==false){
top +=Math.max($window.height() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
}else if(settings.top!==false){
top +=setSize(settings.top, 'y');
}else{
top +=Math.round(Math.max($window.height() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
}
$box.css({top: offset.top, left: offset.left});
speed=($box.width()===settings.w + loadedWidth&&$box.height()===settings.h + loadedHeight) ? 0:speed||0;
$wrap[0].style.width=$wrap[0].style.height="9999px";
function modalDimensions(that){
$topBorder[0].style.width=$bottomBorder[0].style.width=$content[0].style.width=that.style.width;
$content[0].style.height=$leftBorder[0].style.height=$rightBorder[0].style.height=that.style.height;
}
$box.dequeue().animate({width: settings.w + loadedWidth, height: settings.h + loadedHeight, top: top, left: left}, {
duration: speed,
complete: function (){
modalDimensions(this);
active=false;
$wrap[0].style.width=(settings.w + loadedWidth + interfaceWidth) + "px";
$wrap[0].style.height=(settings.h + loadedHeight + interfaceHeight) + "px";
if(settings.reposition){
setTimeout(function (){
$window.bind('resize.' + prefix, publicMethod.position);
}, 1);
}
if(loadedCallback){
loadedCallback();
}},
step: function (){
modalDimensions(this);
}});
};
publicMethod.resize=function (options){
if(open){
options=options||{};
if(options.width){
settings.w=setSize(options.width, 'x') - loadedWidth - interfaceWidth;
}
if(options.innerWidth){
settings.w=setSize(options.innerWidth, 'x');
}
$loaded.css({width: settings.w});
if(options.height){
settings.h=setSize(options.height, 'y') - loadedHeight - interfaceHeight;
}
if(options.innerHeight){
settings.h=setSize(options.innerHeight, 'y');
}
if(!options.innerHeight&&!options.height){
$loaded.css({height: "auto"});
settings.h=$loaded.height();
}
$loaded.css({height: settings.h});
publicMethod.position(settings.transition==="none" ? 0:settings.speed);
}};
publicMethod.prep=function (object){
if(!open){
return;
}
var callback, speed=settings.transition==="none" ? 0:settings.speed;
$loaded.remove();
$loaded=$tag(div, 'LoadedContent').append(object);
function getWidth(){
settings.w=settings.w||$loaded.width();
settings.w=settings.mw&&settings.mw < settings.w ? settings.mw:settings.w;
return settings.w;
}
function getHeight(){
settings.h=settings.h||$loaded.height();
settings.h=settings.mh&&settings.mh < settings.h ? settings.mh:settings.h;
return settings.h;
}
$loaded.hide()
.appendTo($loadingBay.show())
.css({width: getWidth(), overflow: settings.scrolling ? 'auto':'hidden'})
.css({height: getHeight()})
.prependTo($content);
$loadingBay.hide();
$(photo).css({'float': 'none'});
if(isIE6){
$('select').not($box.find('select')).filter(function (){
return this.style.visibility!=='hidden';
}).css({'visibility': 'hidden'}).one(event_cleanup, function (){
this.style.visibility='inherit';
});
}
callback=function (){
var preload, i, total=$related.length, iframe, frameBorder='frameBorder', allowTransparency='allowTransparency', complete, src, img;
if(!open){
return;
}
function removeFilter(){
if(isIE){
$box[0].style.removeAttribute('filter');
}}
complete=function (){
clearTimeout(loadingTimer);
$loadingOverlay.hide();
trigger(event_complete, settings.onComplete);
};
if(isIE){
if(photo){
$loaded.fadeIn(100);
}}
$title.html(settings.title).add($loaded).show();
if(total > 1){
if(typeof settings.current==="string"){
$current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
}
$next[(settings.loop||index < total - 1) ? "show":"hide"]().html(settings.next);
$prev[(settings.loop||index) ? "show":"hide"]().html(settings.previous);
if(settings.slideshow){
$slideshow.show();
}
if(settings.preloading){
preload=[
getIndex(-1),
getIndex(1)
];
while (i=$related[preload.pop()]){
src=$.data(i, colorbox).href||i.href;
if($.isFunction(src)){
src=src.call(i);
}
if(isImage(src)){
img=new Image();
img.src=src;
}}
}}else{
$groupControls.hide();
}
if(settings.iframe){
iframe=$tag('iframe')[0];
if(frameBorder in iframe){
iframe[frameBorder]=0;
}
if(allowTransparency in iframe){
iframe[allowTransparency]="true";
}
iframe.name=prefix + (+new Date());
if(settings.fastIframe){
complete();
}else{
$(iframe).one('load', complete);
}
iframe.src=settings.href;
if(!settings.scrolling){
iframe.scrolling="no";
}
$(iframe).addClass(prefix + 'Iframe').appendTo($loaded).one(event_purge, function (){
iframe.src="//about:blank";
});
}else{
complete();
}
if(settings.transition==='fade'){
$box.fadeTo(speed, 1, removeFilter);
}else{
removeFilter();
}};
if(settings.transition==='fade'){
$box.fadeTo(speed, 0, function (){
publicMethod.position(0, callback);
});
}else{
publicMethod.position(speed, callback);
}};
publicMethod.load=function (launched){
var href, setResize, prep=publicMethod.prep;
active=true;
photo=false;
element=$related[index];
if(!launched){
makeSettings();
}
trigger(event_purge);
trigger(event_load, settings.onLoad);
settings.h=settings.height ?
setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
settings.innerHeight&&setSize(settings.innerHeight, 'y');
settings.w=settings.width ?
setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
settings.innerWidth&&setSize(settings.innerWidth, 'x');
settings.mw=settings.w;
settings.mh=settings.h;
if(settings.maxWidth){
settings.mw=setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
settings.mw=settings.w&&settings.w < settings.mw ? settings.w:settings.mw;
}
if(settings.maxHeight){
settings.mh=setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
settings.mh=settings.h&&settings.h < settings.mh ? settings.h:settings.mh;
}
href=settings.href;
loadingTimer=setTimeout(function (){
$loadingOverlay.show();
}, 100);
if(settings.inline){
$tag(div).hide().insertBefore($(href)[0]).one(event_purge, function (){
$(this).replaceWith($loaded.children());
});
prep($(href));
}else if(settings.iframe){
prep(" ");
}else if(settings.html){
prep(settings.html);
}else if(isImage(href)){
$(photo=new Image())
.addClass(prefix + 'Photo')
.error(function (){
settings.title=false;
prep($tag(div, 'Error').text('This image could not be loaded'));
})
.load(function (){
var percent;
photo.onload=null;
if(settings.scalePhotos){
setResize=function (){
photo.height -=photo.height * percent;
photo.width -=photo.width * percent;
};
if(settings.mw&&photo.width > settings.mw){
percent=(photo.width - settings.mw) / photo.width;
setResize();
}
if(settings.mh&&photo.height > settings.mh){
percent=(photo.height - settings.mh) / photo.height;
setResize();
}}
if(settings.h){
photo.style.marginTop=Math.max(settings.h - photo.height, 0) / 2 + 'px';
}
if($related[1]&&(settings.loop||$related[index + 1])){
photo.style.cursor='pointer';
photo.onclick=function (){
publicMethod.next();
};}
if(isIE){
photo.style.msInterpolationMode='bicubic';
}
setTimeout(function (){
prep(photo);
}, 1);
});
setTimeout(function (){
photo.src=href;
}, 1);
}else if(href){
$loadingBay.load(href, settings.data, function (data, status, xhr){
prep(status==='error' ? $tag(div, 'Error').text('Request unsuccessful: ' + xhr.statusText):$(this).contents());
});
}};
publicMethod.next=function (){
if(!active&&$related[1]&&(settings.loop||$related[index + 1])){
index=getIndex(1);
publicMethod.load();
}};
publicMethod.prev=function (){
if(!active&&$related[1]&&(settings.loop||index)){
index=getIndex(-1);
publicMethod.load();
}};
publicMethod.close=function (){
if(open&&!closing){
closing=true;
open=false;
trigger(event_cleanup, settings.onCleanup);
$window.unbind('.' + prefix + ' .' + event_ie6);
$overlay.fadeTo(200, 0);
$box.stop().fadeTo(300, 0, function (){
$box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
trigger(event_purge);
$loaded.remove();
setTimeout(function (){
closing=false;
trigger(event_closed, settings.onClosed);
}, 1);
});
}};
publicMethod.remove=function (){
$([]).add($box).add($overlay).remove();
$box=null;
$('.' + boxElement)
.removeData(colorbox)
.removeClass(boxElement)
.die();
};
publicMethod.element=function (){
return $(element);
};
publicMethod.settings=defaults;
}(jQuery, document, this));
(function($){
$.fn.bxSlider=function(options){
var defaults={
mode: 'vertical', // 'horizontal', 'vertical', 'fade'
infiniteLoop: false,
hideControlOnEnd: true,
controls: true,
speed: 500,
easing: 'easeOutCubic',
pager: false,
pagerSelector: null,
pagerType: 'full', // 'full', 'short' - if 'full' pager displays 1,2,3... if 'short' pager displays 1 / 4
pagerLocation: 'bottom', // 'bottom', 'top' - location of pager
pagerShortSeparator: '/',
pagerActiveClass: 'pager-active',
nextText: '',
nextImage: '',
nextSelector: null,
prevText: '',
prevImage: '',
prevSelector: null,
captions: false,
captionsSelector: null,
auto: false,
autoDirection: 'next', // 'next', 'prev' - direction in which auto show will traverse
autoControls: false,
autoControlsSelector: null,
autoStart: true,
autoHover: false,
autoDelay: 0,
pause: 3000,
startText: 'start',
startImage: '',
stopText: 'stop',
stopImage: '',
ticker: false,
tickerSpeed: 5000,
tickerDirection: 'next', // 'next', 'prev' - direction in which ticker show will traverse
tickerHover: false,
wrapperClass: 'bx-wrapper',
startingSlide: 0,
displaySlideQty: 1,
moveSlideQty: 1,
randomStart: false,
onBeforeSlide: function(){},
onAfterSlide: function(){},
onLastSlide: function(){},
onFirstSlide: function(){},
onNextSlide: function(){},
onPrevSlide: function(){},
buildPager: null
}
var options=$.extend(defaults, options);
var base=this;
var $parent='';
var $origElement='';
var $children='';
var $outerWrapper='';
var $firstChild='';
var childrenWidth='';
var childrenOuterWidth='';
var wrapperWidth='';
var wrapperHeight='';
var $pager='';
var interval='';
var $autoControls='';
var $stopHtml='';
var $startContent='';
var $stopContent='';
var autoPlaying=true;
var loaded=false;
var childrenMaxWidth=0;
var childrenMaxHeight=0;
var currentSlide=0;
var origLeft=0;
var origTop=0;
var origShowWidth=0;
var origShowHeight=0;
var tickerLeft=0;
var tickerTop=0;
var isWorking=false;
var firstSlide=0;
var lastSlide=$children.length - 1;
this.goToSlide=function(number, stopAuto){
if(!isWorking){
isWorking=true;
currentSlide=number;
options.onBeforeSlide(currentSlide, $children.length, $children.eq(currentSlide));
if(typeof(stopAuto)=='undefined'){
var stopAuto=true;
}
if(stopAuto){
if(options.auto){
base.stopShow(true);
}}
slide=number;
if(slide==firstSlide){
options.onFirstSlide(currentSlide, $children.length, $children.eq(currentSlide));
}
if(slide==lastSlide){
options.onLastSlide(currentSlide, $children.length, $children.eq(currentSlide));
}
if(options.mode=='horizontal'){
$parent.animate({'left': '-'+getSlidePosition(slide, 'left')+'px'}, options.speed, options.easing, function(){
isWorking=false;
options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
});
}else if(options.mode=='vertical'){
$parent.animate({'top': '-'+getSlidePosition(slide, 'top')+'px'}, options.speed, options.easing, function(){
isWorking=false;
options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
});
}else if(options.mode=='fade'){
setChildrenFade();
}
checkEndControls();
if(options.moveSlideQty > 1){
number=Math.floor(number / options.moveSlideQty);
}
makeSlideActive(number);
showCaptions();
}}
this.goToNextSlide=function(stopAuto){
if(typeof(stopAuto)=='undefined'){
var stopAuto=true;
}
if(stopAuto){
if(options.auto){
base.stopShow(true);
}}
if(!options.infiniteLoop){
if(!isWorking){
var slideLoop=false;
currentSlide=(currentSlide + (options.moveSlideQty));
if(currentSlide <=lastSlide){
checkEndControls();
options.onNextSlide(currentSlide, $children.length, $children.eq(currentSlide));
base.goToSlide(currentSlide);
}else{
currentSlide -=options.moveSlideQty;
}}
}else{
if(!isWorking){
isWorking=true;
var slideLoop=false;
currentSlide=(currentSlide + options.moveSlideQty);
if(currentSlide > lastSlide){
currentSlide=currentSlide % $children.length;
slideLoop=true;
}
options.onNextSlide(currentSlide, $children.length, $children.eq(currentSlide));
options.onBeforeSlide(currentSlide, $children.length, $children.eq(currentSlide));
if(options.mode=='horizontal'){
var parentLeft=(options.moveSlideQty * childrenOuterWidth);
$parent.animate({'left': '-='+parentLeft+'px'}, options.speed, options.easing, function(){
isWorking=false;
if(slideLoop){
$parent.css('left', '-'+getSlidePosition(currentSlide, 'left')+'px');
}
options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
});
}else if(options.mode=='vertical'){
var parentTop=(options.moveSlideQty * childrenMaxHeight);
$parent.animate({'top': '-='+parentTop+'px'}, options.speed, options.easing, function(){
isWorking=false;
if(slideLoop){
$parent.css('top', '-'+getSlidePosition(currentSlide, 'top')+'px');
}
options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
});
}else if(options.mode=='fade'){
setChildrenFade();
}
if(options.moveSlideQty > 1){
makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
}else{
makeSlideActive(currentSlide);
}
showCaptions();
}}
}
this.goToPreviousSlide=function(stopAuto){
if(typeof(stopAuto)=='undefined'){
var stopAuto=true;
}
if(stopAuto){
if(options.auto){
base.stopShow(true);
}}
if(!options.infiniteLoop){
if(!isWorking){
var slideLoop=false;
currentSlide=currentSlide - options.moveSlideQty;
if(currentSlide < 0){
currentSlide=0;
if(options.hideControlOnEnd){
$('.bx-prev', $outerWrapper).hide();
}}
checkEndControls();
options.onPrevSlide(currentSlide, $children.length, $children.eq(currentSlide));
base.goToSlide(currentSlide);
}}else{
if(!isWorking){
isWorking=true;
var slideLoop=false;
currentSlide=(currentSlide - (options.moveSlideQty));
if(currentSlide < 0){
negativeOffset=(currentSlide % $children.length);
if(negativeOffset==0){
currentSlide=0;
}else{
currentSlide=($children.length) + negativeOffset;
}
slideLoop=true;
}
options.onPrevSlide(currentSlide, $children.length, $children.eq(currentSlide));
options.onBeforeSlide(currentSlide, $children.length, $children.eq(currentSlide));
if(options.mode=='horizontal'){
var parentLeft=(options.moveSlideQty * childrenOuterWidth);
$parent.animate({'left': '+='+parentLeft+'px'}, options.speed, options.easing, function(){
isWorking=false;
if(slideLoop){
$parent.css('left', '-'+getSlidePosition(currentSlide, 'left')+'px');
}
options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
});
}else if(options.mode=='vertical'){
var parentTop=(options.moveSlideQty * childrenMaxHeight);
$parent.animate({'top': '+='+parentTop+'px'}, options.speed, options.easing, function(){
isWorking=false;
if(slideLoop){
$parent.css('top', '-'+getSlidePosition(currentSlide, 'top')+'px');
}
options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
});
}else if(options.mode=='fade'){
setChildrenFade();
}
if(options.moveSlideQty > 1){
makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
}else{
makeSlideActive(currentSlide);
}
showCaptions();
}}
}
this.goToFirstSlide=function(stopAuto){
if(typeof(stopAuto)=='undefined'){
var stopAuto=true;
}
base.goToSlide(firstSlide, stopAuto);
}
this.goToLastSlide=function(){
if(typeof(stopAuto)=='undefined'){
var stopAuto=true;
}
base.goToSlide(lastSlide, stopAuto);
}
this.getCurrentSlide=function(){
return currentSlide;
}
this.getSlideCount=function(){
return $children.length;
}
this.stopShow=function(changeText){
clearInterval(interval);
if(typeof(changeText)=='undefined'){
var changeText=true;
}
if(changeText&&options.autoControls){
$autoControls.html($startContent).removeClass('stop').addClass('start');
autoPlaying=false;
}}
this.startShow=function(changeText){
if(typeof(changeText)=='undefined'){
var changeText=true;
}
setAutoInterval();
if(changeText&&options.autoControls){
$autoControls.html($stopContent).removeClass('start').addClass('stop');
autoPlaying=true;
}}
this.stopTicker=function(changeText){
$parent.stop();
if(typeof(changeText)=='undefined'){
var changeText=true;
}
if(changeText&&options.ticker){
$autoControls.html($startContent).removeClass('stop').addClass('start');
autoPlaying=false;
}}
this.startTicker=function(changeText){
if(options.mode=='horizontal'){
if(options.tickerDirection=='next'){
var stoppedLeft=parseInt($parent.css('left'));
var remainingDistance=(origShowWidth + stoppedLeft) + $children.eq(0).width();
}else if(options.tickerDirection=='prev'){
var stoppedLeft=-parseInt($parent.css('left'));
var remainingDistance=(stoppedLeft) - $children.eq(0).width();
}
var finishingSpeed=(remainingDistance * options.tickerSpeed) / origShowWidth;
moveTheShow(tickerLeft, remainingDistance, finishingSpeed);
}else if(options.mode=='vertical'){
if(options.tickerDirection=='next'){
var stoppedTop=parseInt($parent.css('top'));
var remainingDistance=(origShowHeight + stoppedTop) + $children.eq(0).height();
}else if(options.tickerDirection=='prev'){
var stoppedTop=-parseInt($parent.css('top'));
var remainingDistance=(stoppedTop) - $children.eq(0).height();
}
var finishingSpeed=(remainingDistance * options.tickerSpeed) / origShowHeight;
moveTheShow(tickerTop, remainingDistance, finishingSpeed);
if(typeof(changeText)=='undefined'){
var changeText=true;
}
if(changeText&&options.ticker){
$autoControls.html($stopContent).removeClass('start').addClass('stop');
autoPlaying=true;
}}
}
this.initShow=function(){
$parent=$(this);
$origElement=$parent.clone();
$children=$parent.children();
$outerWrapper='';
$firstChild=$parent.children(':first');
childrenWidth=$firstChild.width();
childrenMaxWidth=0;
childrenOuterWidth=$firstChild.outerWidth();
childrenMaxHeight=0;
wrapperWidth=getWrapperWidth();
wrapperHeight=getWrapperHeight();
isWorking=false;
$pager='';
currentSlide=0;
origLeft=0;
origTop=0;
interval='';
$autoControls='';
$stopHtml='';
$startContent='';
$stopContent='';
autoPlaying=true;
loaded=false;
origShowWidth=0;
origShowHeight=0;
tickerLeft=0;
tickerTop=0;
firstSlide=0;
lastSlide=$children.length - 1;
$children.each(function(index){
if($(this).outerHeight() > childrenMaxHeight){
childrenMaxHeight=$(this).outerHeight();
}
if($(this).outerWidth() > childrenMaxWidth){
childrenMaxWidth=$(this).outerWidth();
}});
if(options.randomStart){
var randomNumber=Math.floor(Math.random() * $children.length);
currentSlide=randomNumber;
origLeft=childrenOuterWidth * (options.moveSlideQty + randomNumber);
origTop=childrenMaxHeight * (options.moveSlideQty + randomNumber);
}else{
currentSlide=options.startingSlide;
origLeft=childrenOuterWidth * (options.moveSlideQty + options.startingSlide);
origTop=childrenMaxHeight * (options.moveSlideQty + options.startingSlide);
}
initCss();
if(options.pager&&!options.ticker){
if(options.pagerType=='full'){
showPager('full');
}else if(options.pagerType=='short'){
showPager('short');
}}
if(options.controls&&!options.ticker){
setControlsVars();
}
if(options.auto||options.ticker){
if(options.autoControls){
setAutoControlsVars();
}
if(options.autoStart){
setTimeout(function(){
base.startShow(true);
}, options.autoDelay);
}else{
base.stopShow(true);
}
if(options.autoHover&&!options.ticker){
setAutoHover();
}}
if(options.moveSlideQty > 1){
makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
}else{
makeSlideActive(currentSlide);
}
checkEndControls();
if(options.captions){
showCaptions();
}
options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
}
this.destroyShow=function(){
clearInterval(interval);
$('.bx-next, .bx-prev, .bx-pager, .bx-auto', $outerWrapper).remove();
$parent.unwrap().unwrap().removeAttr('style');
$parent.children().removeAttr('style').not('.pager').remove();
$children.removeClass('pager');
}
this.reloadShow=function(){
base.destroyShow();
base.initShow();
}
function initCss(){
setChildrenLayout(options.startingSlide);
if(options.mode=='horizontal'){
$parent
.wrap('')
.wrap('')
.css({
width: '999999px',
position: 'relative',
left: '-'+(origLeft)+'px'
});
$parent.children().css({
width: childrenWidth,
'float': 'left',
listStyle: 'none'
});
$outerWrapper=$parent.parent().parent();
$children.addClass('pager');
}else if(options.mode=='vertical'){
$parent
.wrap('')
.wrap('')
.css({
height: '999999px',
position: 'relative',
top: '-'+(origTop)+'px'
});
$parent.children().css({
listStyle: 'none',
height: childrenMaxHeight
});
$outerWrapper=$parent.parent().parent();
$children.addClass('pager');
}else if(options.mode=='fade'){
$parent
.wrap('')
.wrap('');
$parent.children().css({
listStyle: 'none',
position: 'absolute',
top: 0,
left: 0,
zIndex: 98
});
$outerWrapper=$parent.parent().parent();
$children.not(':eq('+currentSlide+')').fadeTo(0, 0);
$children.eq(currentSlide).css('zIndex', 99);
}
if(options.captions&&options.captionsSelector==null){
$outerWrapper.append('');
}}
function setChildrenLayout(){
if(options.mode=='horizontal'||options.mode=='vertical'){
var $prependedChildren=getArraySample($children, 0, options.moveSlideQty, 'backward');
$.each($prependedChildren, function(index){
$parent.prepend($(this));
});
var totalNumberAfterWindow=($children.length + options.moveSlideQty) - 1;
var pagerExcess=$children.length - options.displaySlideQty;
var numberToAppend=totalNumberAfterWindow - pagerExcess;
var $appendedChildren=getArraySample($children, 0, numberToAppend, 'forward');
if(options.infiniteLoop){
$.each($appendedChildren, function(index){
$parent.append($(this));
});
}}
}
function setControlsVars(){
if(options.nextImage!=''){
nextContent=options.nextImage;
nextType='image';
}else{
nextContent=options.nextText;
nextType='text';
}
if(options.prevImage!=''){
prevContent=options.prevImage;
prevType='image';
}else{
prevContent=options.prevText;
prevType='text';
}
showControls(nextType, nextContent, prevType, prevContent);
}
function setAutoInterval(){
if(options.auto){
if(!options.infiniteLoop){
if(options.autoDirection=='next'){
interval=setInterval(function(){
currentSlide +=options.moveSlideQty;
if(currentSlide > lastSlide){
currentSlide=currentSlide % $children.length;
}
base.goToSlide(currentSlide, false);
}, options.pause);
}else if(options.autoDirection=='prev'){
interval=setInterval(function(){
currentSlide -=options.moveSlideQty;
if(currentSlide < 0){
negativeOffset=(currentSlide % $children.length);
if(negativeOffset==0){
currentSlide=0;
}else{
currentSlide=($children.length) + negativeOffset;
}}
base.goToSlide(currentSlide, false);
}, options.pause);
}}else{
if(options.autoDirection=='next'){
interval=setInterval(function(){
base.goToNextSlide(false);
}, options.pause);
}else if(options.autoDirection=='prev'){
interval=setInterval(function(){
base.goToPreviousSlide(false);
}, options.pause);
}}
}else if(options.ticker){
options.tickerSpeed *=10;
$('.pager', $outerWrapper).each(function(index){
origShowWidth +=$(this).width();
origShowHeight +=$(this).height();
});
if(options.tickerDirection=='prev'&&options.mode=='horizontal'){
$parent.css('left', '-'+(origShowWidth+origLeft)+'px');
}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){
$parent.css('top', '-'+(origShowHeight+origTop)+'px');
}
if(options.mode=='horizontal'){
tickerLeft=parseInt($parent.css('left'));
moveTheShow(tickerLeft, origShowWidth, options.tickerSpeed);
}else if(options.mode=='vertical'){
tickerTop=parseInt($parent.css('top'));
moveTheShow(tickerTop, origShowHeight, options.tickerSpeed);
}
if(options.tickerHover){
setTickerHover();
}}
}
function moveTheShow(leftCss, distance, speed){
if(options.mode=='horizontal'){
if(options.tickerDirection=='next'){
$parent.animate({'left': '-='+distance+'px'}, speed, 'linear', function(){
$parent.css('left', leftCss);
moveTheShow(leftCss, origShowWidth, options.tickerSpeed);
});
}else if(options.tickerDirection=='prev'){
$parent.animate({'left': '+='+distance+'px'}, speed, 'linear', function(){
$parent.css('left', leftCss);
moveTheShow(leftCss, origShowWidth, options.tickerSpeed);
});
}}else if(options.mode=='vertical'){
if(options.tickerDirection=='next'){
$parent.animate({'top': '-='+distance+'px'}, speed, 'linear', function(){
$parent.css('top', leftCss);
moveTheShow(leftCss, origShowHeight, options.tickerSpeed);
});
}else if(options.tickerDirection=='prev'){
$parent.animate({'top': '+='+distance+'px'}, speed, 'linear', function(){
$parent.css('top', leftCss);
moveTheShow(leftCss, origShowHeight, options.tickerSpeed);
});
}}
}
function setAutoControlsVars(){
if(options.startImage!=''){
startContent=options.startImage;
startType='image';
}else{
startContent=options.startText;
startType='text';
}
if(options.stopImage!=''){
stopContent=options.stopImage;
stopType='image';
}else{
stopContent=options.stopText;
stopType='text';
}
showAutoControls(startType, startContent, stopType, stopContent);
}
function setAutoHover(){
$outerWrapper.find('.bx-window').hover(function(){
if(autoPlaying){
base.stopShow(false);
}}, function(){
if(autoPlaying){
base.startShow(false);
}});
}
function setTickerHover(){
$parent.hover(function(){
if(autoPlaying){
base.stopTicker(false);
}}, function(){
if(autoPlaying){
base.startTicker(false);
}});
}
function setChildrenFade(){
$children.not(':eq('+currentSlide+')').fadeTo(options.speed, 0).css('zIndex', 98);
$children.eq(currentSlide).css('zIndex', 99).fadeTo(options.speed, 1, function(){
isWorking=false;
if(jQuery.browser.msie){
$children.eq(currentSlide).get(0).style.removeAttribute('filter');
}
options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
});
};
function makeSlideActive(number){
if(options.pagerType=='full'&&options.pager){
$('a', $pager).removeClass(options.pagerActiveClass);
$('a', $pager).eq(number).addClass(options.pagerActiveClass);
}else if(options.pagerType=='short'&&options.pager){
$('.bx-pager-current', $pager).html(currentSlide+1);
}}
function showControls(nextType, nextContent, prevType, prevContent){
var $nextHtml=$('');
var $prevHtml=$('');
if(nextType=='text'){
$nextHtml.html(nextContent);
}else{
$nextHtml.html('');
}
if(prevType=='text'){
$prevHtml.html(prevContent);
}else{
$prevHtml.html('');
}
if(options.prevSelector){
$(options.prevSelector).append($prevHtml);
}else{
$outerWrapper.append($prevHtml);
}
if(options.nextSelector){
$(options.nextSelector).append($nextHtml);
}else{
$outerWrapper.append($nextHtml);
}
$nextHtml.click(function(){
base.goToNextSlide();
return false;
});
$prevHtml.click(function(){
base.goToPreviousSlide();
return false;
});
}
function showPager(type){
var pagerQty=$children.length;
if(options.moveSlideQty > 1){
if($children.length % options.moveSlideQty!=0){
pagerQty=Math.ceil($children.length / options.moveSlideQty);
}else{
pagerQty=$children.length / options.moveSlideQty;
}}
var pagerString='';
if(options.buildPager){
for(var i=0; i "),e=i.children()[0];return I("body").append(i),t=e.offsetWidth,i.css("overflow","scroll"),t===(e=e.offsetWidth)&&(e=i[0].clientWidth),i.remove(),o=t-e},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),e=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===i||"auto"===i&&t.width