function SwipeLoad(){var n="ontouchstart"in window;n&&($(".carousel-portlet .carousel").swiperight(function(){$(this).carousel("prev")}),$(".carousel-portlet .carousel").swipeleft(function(){$(this).carousel("next")}))}function SwipeLoad(n){var t="ontouchstart"in window;t&&($(".carousel-portlet .carousel",n).swiperight(function(){$(this).carousel("prev")}),$(".carousel-portlet .carousel",n).swipeleft(function(){$(this).carousel("next")}))}function createCookie(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/"}function getCookie(n){var i=document.cookie,u=n+"=",t=i.indexOf("; "+u),r;if(t==-1){if(t=i.indexOf(u),t!=0)return null}else t+=2,r=document.cookie.indexOf(";",t),r==-1&&(r=i.length);return unescape(i.substring(t+u.length,r))}function eraseCookie(n){document.cookie=n+"=; Max-Age=0"}function findBootstrapEnvironment(){var u=["xs","sm","md","lg"],i=window.document,n=i.createElement("div"),t,r;for(i.body.appendChild(n),t=u.length-1;t>=0;t--)if(r=u[t],n.className="hidden-"+r,n.offsetParent===null)return i.body.removeChild(n),r;return""}function SetMobileTarget(){var t=getCookie("MobileTarget"),n;t==null?(eraseCookie("MobileTarget"),n=findBootstrapEnvironment(),createCookie("MobileTarget",n,100)):(eraseCookie("MobileTarget"),n=findBootstrapEnvironment(),createCookie("MobileTarget",n,100))}(function(n,t,i){typeof define=="function"&&define.amd?define(["jquery"],function(r){return i(r,n,t),r.mobile}):i(n.jQuery,n,t)})(this,document,function(n,t,i){(function(n,t,i,r){function a(n){while(n&&typeof n.originalEvent!="undefined")n=n.originalEvent;return n}function wt(t,i){var u=t.type,e,o,c,f,s,l,v,h,y;if(t=n.Event(t),t.type=i,e=t.originalEvent,o=n.event.props,u.search(/^(mouse|click)/)>-1&&(o=yt),e)for(v=o.length,f;v;)f=o[--v],t[f]=e[f];if(u.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),u.search(/^touch/)!==-1&&(c=a(e),u=c.touches,s=c.changedTouches,l=u&&u.length?u[0]:s&&s.length?s[0]:r,l))for(h=0,y=tt.length;h<y;h++)f=tt[h],t[f]=l[f];return t}function p(t){for(var i={},r,u;t;){r=n.data(t,o);for(u in r)r[u]&&(i[u]=i.hasVirtualBinding=!0);t=t.parentNode}return i}function bt(t,i){for(var r;t;){if(r=n.data(t,o),r&&(!i||r[i]))return t;t=t.parentNode}return null}function kt(){c=!1}function ut(){c=!0}function dt(){s=0;v.length=0;k=!1;ut()}function gt(){kt()}function nt(){ft();h=setTimeout(function(){h=0;dt()},n.vmouse.resetTimerDuration)}function ft(){h&&(clearTimeout(h),h=0)}function e(t,i,r){var u;return(r&&r[t]||!r&&bt(i.target,t))&&(u=wt(i,t),n(i.target).trigger(u)),u}function et(t){var r=n.data(t.target,w),i;k||s&&s===r||(i=e("v"+t.type,t),i&&(i.isDefaultPrevented()&&t.preventDefault(),i.isPropagationStopped()&&t.stopPropagation(),i.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function ot(t){var o=a(t).touches,r,i,u;o&&o.length===1&&(r=t.target,i=p(r),i.hasVirtualBinding&&(s=pt++,n.data(r,w,s),ft(),gt(),f=!1,u=a(t).touches[0],it=u.pageX,rt=u.pageY,e("vmouseover",t,i),e("vmousedown",t,i)))}function st(n){c||(f||e("vmousecancel",n,p(n.target)),f=!0,nt())}function ht(t){if(!c){var i=a(t).touches[0],o=f,r=n.vmouse.moveDistanceThreshold,u=p(t.target);f=f||Math.abs(i.pageX-it)>r||Math.abs(i.pageY-rt)>r;f&&!o&&e("vmousecancel",t,u);e("vmousemove",t,u);nt()}}function ct(n){if(!c){ut();var t=p(n.target),i,r;e("vmouseup",n,t);f||(i=e("vclick",n,t),i&&i.isDefaultPrevented()&&(r=a(n).changedTouches[0],v.push({touchID:s,x:r.clientX,y:r.clientY}),k=!0));e("vmouseout",n,t);f=!1;nt()}}function lt(t){var i=n.data(t,o),r;if(i)for(r in i)if(i[r])return!0;return!1}function at(){}function ni(t){var i=t.substr(1);return{setup:function(){lt(this)||n.data(this,o,{});var r=n.data(this,o);r[t]=!0;u[t]=(u[t]||0)+1;u[t]===1&&y.bind(i,et);n(this).bind(i,at);d&&(u.touchstart=(u.touchstart||0)+1,u.touchstart===1&&y.bind("touchstart",ot).bind("touchend",ct).bind("touchmove",ht).bind("scroll",st))},teardown:function(){--u[t];u[t]||y.unbind(i,et);d&&(--u.touchstart,u.touchstart||y.unbind("touchstart",ot).unbind("touchmove",ht).unbind("touchend",ct).unbind("scroll",st));var r=n(this),f=n.data(this,o);f&&(f[t]=!1);r.unbind(i,at);lt(this)||r.removeData(o)}}}var o="virtualMouseBindings",w="virtualTouchID",b="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),tt="clientX clientY pageX pageY screenX screenY".split(" "),vt=n.event.mouseHooks?n.event.mouseHooks.props:[],yt=n.event.props.concat(vt),u={},h=0,it=0,rt=0,f=!1,v=[],k=!1,c=!1,d="addEventListener"in i,y=n(i),pt=1,s=0,g,l;for(n.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},l=0;l<b.length;l++)n.event.special[b[l]]=ni(b[l]);d&&i.addEventListener("click",function(t){var f=v.length,e=t.target,o,s,i,r,u,h;if(f)for(o=t.clientX,s=t.clientY,g=n.vmouse.clickDistanceThreshold,i=e;i;){for(r=0;r<f;r++)if(u=v[r],h=0,i===e&&Math.abs(u.x-o)<g&&Math.abs(u.y-s)<g||n.data(i,w)===u.touchID){t.preventDefault();t.stopPropagation();return}i=i.parentNode}},!0)})(n,t,i),function(n){n.mobile={}}(n),function(n){var t={touch:"ontouchend"in i};n.mobile.support=n.mobile.support||{};n.extend(n.support,t);n.extend(n.mobile.support,t)}(n),function(n,t,r){function f(t,i,u,f){var e=u.type;u.type=i;f?n.event.trigger(u,r,t):n.event.dispatch.call(t,u);u.type=e}var u=n(i),e=n.mobile.support.touch,s="touchmove scroll",h=e?"touchstart":"mousedown",c=e?"touchend":"mouseup",o=e?"touchmove":"mousemove";n.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,i){n.fn[i]=function(n){return n?this.bind(i,n):this.trigger(i)};n.attrFn&&(n.attrFn[i]=!0)});n.event.special.scrollstart={enabled:!0,setup:function(){function u(n,r){t=r;f(i,t?"scrollstart":"scrollstop",n)}var i=this,e=n(i),t,r;e.bind(s,function(i){n.event.special.scrollstart.enabled&&(t||u(i,!0),clearTimeout(r),r=setTimeout(function(){u(i,!1)},50))})},teardown:function(){n(this).unbind(s)}};n.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var i=this,r=n(i),t=!1;r.bind("vmousedown",function(e){function o(){clearTimeout(c)}function s(){o();r.unbind("vclick",l).unbind("vmouseup",o);u.unbind("vmousecancel",s)}function l(n){s();t||h!==n.target?t&&n.preventDefault():f(i,"tap",n)}if(t=!1,e.which&&e.which!==1)return!1;var h=e.target,c;r.bind("vmouseup",o).bind("vclick",l);u.bind("vmousecancel",s);c=setTimeout(function(){n.event.special.tap.emitTapOnTaphold||(t=!0);f(i,"taphold",n.Event("taphold",{target:h}))},n.event.special.tap.tapholdThreshold)})},teardown:function(){n(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup");u.unbind("vmousecancel")}};n.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(n){var u=t.pageXOffset,f=t.pageYOffset,i=n.clientX,r=n.clientY;return n.pageY===0&&Math.floor(r)>Math.floor(n.pageY)||n.pageX===0&&Math.floor(i)>Math.floor(n.pageX)?(i=i-u,r=r-f):(r<n.pageY-f||i<n.pageX-u)&&(i=n.pageX-u,r=n.pageY-f),{x:i,y:r}},start:function(t){var r=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=n.event.special.swipe.getLocation(r);return{time:(new Date).getTime(),coords:[i.x,i.y],origin:n(t.target)}},stop:function(t){var r=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=n.event.special.swipe.getLocation(r);return{time:(new Date).getTime(),coords:[i.x,i.y]}},handleSwipe:function(t,i,r,u){if(i.time-t.time<n.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-i.coords[0])>n.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-i.coords[1])<n.event.special.swipe.verticalDistanceThreshold){var e=t.coords[0]>i.coords[0]?"swipeleft":"swiperight";return f(r,"swipe",n.Event("swipe",{target:u,swipestart:t,swipestop:i}),!0),f(r,e,n.Event(e,{target:u,swipestart:t,swipestop:i}),!0),!0}return!1},eventInProgress:!1,setup:function(){var i,r=this,f=n(r),t={};i=n.data(this,"mobile-events");i||(i={length:0},n.data(this,"mobile-events",i));i.length++;i.swipe=t;t.start=function(i){if(!n.event.special.swipe.eventInProgress){n.event.special.swipe.eventInProgress=!0;var e,s=n.event.special.swipe.start(i),h=i.target,f=!1;t.move=function(t){s&&!t.isDefaultPrevented()&&(e=n.event.special.swipe.stop(t),f||(f=n.event.special.swipe.handleSwipe(s,e,r,h),f&&(n.event.special.swipe.eventInProgress=!1)),Math.abs(s.coords[0]-e.coords[0])>n.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())};t.stop=function(){f=!0;n.event.special.swipe.eventInProgress=!1;u.off(o,t.move);t.move=null};u.on(o,t.move).one(c,t.stop)}};f.on(h,t.start)},teardown:function(){var i,t;i=n.data(this,"mobile-events");i&&(t=i.swipe,delete i.swipe,i.length--,i.length===0&&n.removeData(this,"mobile-events"));t&&(t.start&&n(this).off(h,t.start),t.move&&u.off(o,t.move),t.stop&&u.off(c,t.stop))}};n.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,i){n.event.special[t]={setup:function(){n(this).bind(i,n.noop)},teardown:function(){n(this).unbind(i)}}})}(n,this)});$(document).ready(function(){SetMobileTarget()});$(window).resize(function(){SetMobileTarget()})