//window._wpemojiSettings={"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.1\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.1\/svg\/","svgExt":".svg","source":{"concatemoji":"\/wp-includes\/js\/wp-emoji-release.min.js"}};!function(e,a,t){var r,n,o,i,p=a.createElement("canvas"),s=p.getContext&&p.getContext("2d");function c(e,t){var a=String.fromCharCode;s.clearRect(0,0,p.width,p.height),s.fillText(a.apply(this,e),0,0);var r=p.toDataURL();return s.clearRect(0,0,p.width,p.height),s.fillText(a.apply(this,t),0,0),r===p.toDataURL()}function l(e){if(!s||!s.fillText)return!1;switch(s.textBaseline="top",s.font="600 32px Arial",e){case"flag":return!c([127987,65039,8205,9895,65039],[127987,65039,8203,9895,65039])&&(!c([55356,56826,55356,56819],[55356,56826,8203,55356,56819])&&!c([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]));case"emoji":return!c([55357,56424,8205,55356,57212],[55357,56424,8203,55356,57212])}return!1}function d(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(i=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},o=0;o+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s}); var monsterinsights_frontend={"js_events_tracking":"true","download_extensions":"doc,pdf,ppt,zip,xls,docx,pptx,xlsx","inbound_paths":"[]","home_url":"https:\/\/www.mikrolas.net","hash_tracking":"false"}; ;var MonsterInsights=function(){var t=[],a='';this.setLastClicked=function(e,n,i){e=typeof e!=='undefined'?e:[];n=typeof n!=='undefined'?n:[];i=typeof i!=='undefined'?i:!1;t.valuesArray=e;t.fieldsArray=n};this.getLastClicked=function(){return t};this.setInternalAsOutboundCategory=function(e){a=e};this.getInternalAsOutboundCategory=function(){return a};this.sendEvent=function(t){e([],t)};function s(){if(window.monsterinsights_debug_mode){return!0} else{return!1}};function e(e,n){e=typeof e!=='undefined'?e:[];n=typeof n!=='undefined'?n:{};__gaTracker('send',n);t.valuesArray=e;t.fieldsArray=n;t.tracked=!0;i('Tracked: '+e.type);i(t)};function n(e){e=typeof e!=='undefined'?e:[];t.valuesArray=e;t.fieldsArray=[];t.tracked=!1;i('Not Tracked: '+e.exit);i(t)};function i(e){if(s()){console.dir(e)}};function o(e){return e.replace(/^\s+|\s+$/gm,'')};function f(){var n=0,e=document.domain,i=e.split('.'),t='_gd'+(new Date()).getTime();while(n<(i.length-1)&&document.cookie.indexOf(t+'='+t)==-1){e=i.slice(-1-(++n)).join('.');document.cookie=t+'='+t+';domain='+e+';'};document.cookie=t+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain='+e+';';return e};function u(e){e=e.toString();e=e.substring(0,(e.indexOf('#')==-1)?e.length:e.indexOf('#'));e=e.substring(0,(e.indexOf('?')==-1)?e.length:e.indexOf('?'));e=e.substring(e.lastIndexOf('/')+1,e.length);if(e.length>0&&e.indexOf('.')!==-1){e=e.substring(e.indexOf('.')+1);return e} else{return''}};function h(){return typeof(__gaTracker)!=='undefined'&&__gaTracker&&__gaTracker.hasOwnProperty('loaded')&&__gaTracker.loaded==!0};function y(e){return e.which==1||e.which==2||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey};function c(){var e=[];if(typeof monsterinsights_frontend.download_extensions=='string'){e=monsterinsights_frontend.download_extensions.split(',')};return e};function d(){var e=[];if(typeof monsterinsights_frontend.inbound_paths=='string'){e=JSON.parse(monsterinsights_frontend.inbound_paths)};return e};function b(e){if(e.which==1){return'event.which=1'} else if(e.which==2){return'event.which=2'} else if(e.metaKey){return'metaKey'} else if(e.ctrlKey){return'ctrlKey'} else if(e.shiftKey){return'shiftKey'} else if(e.altKey){return'altKey'} else{return''}};function m(e){var h=c(),i=d(),t='unknown',g=e.href,p=u(e.href),v=f(),l=e.hostname,r=e.protocol,y=e.pathname;g=g.toString();var s,b,m=e.getAttribute('data-vars-ga-category');if(m){return m};if(g.match(/^javascript\:/i)){t='internal'} else if(r&&r.length>0&&(o(r)=='tel'||o(r)=='tel:')){t='tel'} else if(r&&r.length>0&&(o(r)=='mailto'||o(r)=='mailto:')){t='mailto'} else if(l&&v&&l.length>0&&v.length>0&&!l.endsWith('.'+v)&&l!==v){t='external'} else if(y&&JSON.stringify(i)!='{}'&&y.length>0){var w=i.length;for(var n=0;n0&&i[n].label.length>0&&y.startsWith(i[n].path)){t='internal-as-outbound';a='outbound-link-'+i[n].label;break}}} else if(l&&window.monsterinsights_experimental_mode&&l.length>0&&document.domain.length>0&&l!==document.domain){t='cross-hostname'};if(p&&(t==='unknown'||'external'===t)&&h.length>0&&p.length>0){for(s=0,b=h.length;s0&&(g.endsWith(h[s])||h[s]==p)){t='download';break}}};if(t==='unknown'){t='internal'};return t};function w(e,t){var n=(e.target&&!e.target.match(/^_(self|parent|top)$/i))?e.target:!1;if(t.ctrlKey||t.shiftKey||t.metaKey||t.which==2){n='_blank'};return n};function g(e){if(e.getAttribute('data-vars-ga-label')&&e.getAttribute('data-vars-ga-label').replace(/\n/ig,'')){return e.getAttribute('data-vars-ga-label').replace(/\n/ig,'')} else if(e.title&&e.title.replace(/\n/ig,'')){return e.title.replace(/\n/ig,'')} else if(e.innerText&&e.innerText.replace(/\n/ig,'')){return e.innerText.replace(/\n/ig,'')} else if(e.getAttribute('aria-label')&&e.getAttribute('aria-label').replace(/\n/ig,'')){return e.getAttribute('aria-label').replace(/\n/ig,'')} else if(e.alt&&e.alt.replace(/\n/ig,'')){return e.alt.replace(/\n/ig,'')} else if(e.textContent&&e.textContent.replace(/\n/ig,'')){return e.textContent.replace(/\n/ig,'')} else{return undefined}};function x(e){var i=e.children,a=0,r,n;for(var t=0;t>>0;if(i===0){return-1};t=i-1;if(arguments.length>1){t=Number(arguments[1]);if(t!=t){t=0} else if(t!=0&&t!=(1/0)&&t!=-(1/0)){t=(t>0||-1)*Math.floor(Math.abs(t))}};for(n=t>=0?Math.min(t,i-1):i-Math.abs(t);n>=0;n--){if(n in a&&a[n]===e){return n}};return-1}}},MonsterInsightsObject=new MonsterInsights(); var nrci_opts={"gesture":"Y","drag":"Y","touch":"Y","admin":"Y"}; document.addEventListener("contextmenu",kpg_nrci_cm,false);if(nrci_opts['drag']=='Y'){document.addEventListener("dragstart",kpg_nrci_cm,false);document.addEventListener("touchmove",kpg_nrci_cm,false);} if(nrci_opts['touch']=='Y'){document.addEventListener("touchstart",kpg_nrci_cm,false);} if(nrci_opts['gesture']=='Y'){document.addEventListener("gesturestart",kpg_nrci_cm,false);} function kpg_nrci_block(event){event.cancelBubble=true;if(event.preventDefault!=undefined){event.preventDefault();} if(event.stopPropagation!=undefined){event.stopPropagation();} return false;} function kpg_nrci_cm(event){try{if(event.target.tagName=="IMG"){event.cancelBubble=true;if(event.preventDefault!=undefined){event.preventDefault();} if(event.stopPropagation!=undefined){event.stopPropagation();} return false;}}catch(error){console.log("NRI error:"+error);} try{if(event.target.getAttribute("style")==null||event.target.getAttribute("style")==""){return true;} if(event.target.style.backgroundImage!=null&&event.target.style.backgroundImage!='none'&&event.target.style.backgroundImage!=''){event.cancelBubble=true;if(event.preventDefault!=undefined){event.preventDefault();} if(event.stopPropagation!=undefined){event.stopPropagation();} return false;}}catch(error){console.log("NRI error:"+error);} return true;}; (function(){var DEBUG=!1,HOST=DEBUG?"http://test.yumprint.com":"http://yumprint.com",SECURE_HOST=DEBUG?"https://test.yumprint.com":"https://yumprint.com",API_HOST=DEBUG?"http://testapi.yumprint.com":"http://api.yumprint.com",SECURE_API_HOST=DEBUG?"https://testapi.yumprint.com":"https://api.yumprint.com",ANIMATION_TIME=200,MESSAGE_TIME=1E3,TOUCH="undefined"!==typeof window&&"ontouchstart"in window||"undefined"!==typeof navigator&&(0a;a+=2)"margin"===b&&(d+=j.css(n,b+Ba[a],!0,f)),c?("content"===b&&(d-=j.css(n,"padding"+Ba[a],!0,f)),"margin"!==b&&(d-=j.css(n,"border"+Ba[a]+"Width",!0,f))):(d+=j.css(n,"padding"+Ba[a],!0,f),"padding"!==b&&(d+=j.css(n,"border"+Ba[a]+"Width",!0,f)));return d}function C(n,a,b){var c=!0,f="width"===a?n.offsetWidth:n.offsetHeight,d=Ca(n),h=j.support.boxSizing&&"border-box"===j.css(n,"boxSizing",!1,d);if(0>=f||null==f){f=Da(n,a,d);if(0>f||null==f)f=n.style[a];if(jb.test(f))return f;c=h&&(j.support.boxSizingReliable||f===n.style[a]);f=parseFloat(f)||0}return f+z(n,a,b||(h?"border":"content"),c,d)+"px"}function L(n){var a=A,b=tc[n];if(!b){b=M(n,a);if("none"===b||!b)Ua=(Ua||j("").attr("src",SECURE_API_HOST+"/proxy").appendTo("body").get(0)});var f=1,h=[],k=async();window.addEventListener("message",function(a){if(a.origin===SECURE_API_HOST)if("yumprint-proxy-ready"===a.data)k.set();else try{var b=JSON.parse(a.data),c=b.id;if(c){var d=h[c];delete h[c];d&&d(b.data)}}catch(e){}});g=function(a,b,c,d){k.await(function(){var e=f++;h[e]=d;l.contentWindow.postMessage(JSON.stringify({id:e,url:a,method:b,data:c}),SECURE_API_HOST)})}}var m=function(a){return function(b){a&&(b.success?"result"in b?a(b.result):a(!0):a(!1))}},p=function(a){if("object"===typeof a){if("start"in a){var c=a.start,d=b(c);a.start=function(a){d(t(a))};a.startUrl=c}if("next"in a){var c=a.next,e=b(c);a.next=function(a){var b;b=m(function(b){p(b);a&&a(b)});e(b)};a.nextUrl=c}}},t=function(a){return m(function(b){if(b&&b.feeds&&b.feeds.length)for(var c=0;c
").appendTo(a.find(".blog-yumprint-dialog-contents"));d.find(".blog-yumprint-star-container").replaceWith(createStars({stars:4,selected:b.rating,constant:!0,size:18,clickable:!1,hasText:!1,prefix:c}));d.find(".blog-yumprint-review-owner .blog-yumprint-image").css("background-image","url("+b.image+")");d.find(".blog-yumprint-review-owner .blog-yumprint-text").text(b.name);d.find(".blog-yumprint-time").text(b.at);d.find(".blog-yumprint-review").text(b.review||"");d.find(".blog-yumprint-review-owner").fastClick(function(){window.open(HOST+"/app/object/"+ b.shelf)})})(b[d])})} function showDialog(a){var e=function(c){var b=function(){$(".ui-draggable-dragging.dragging").remove();d.stop().fadeOut(ANIMATION_TIME,function(){d.remove();a.close&&a.close()})},d=$("
").hide().appendTo($("body")),e=$("
Cancel
").hide().click(function(){return!1}).appendTo(d.find(".blog-yumprint-dialog-wrapper"));d.click(b).show("fade",ANIMATION_TIME,function(){e.close=b;a.id&&e.attr("id",a.id);a.width&&e.css({width:a.width+"px"});a.height&&e.css({height:a.height+"px"});e.find(".blog-yumprint-dialog-contents").html(c);e.find(".blog-yumprint-dialog-title").text(a.title);e.find(".blog-yumprint-close").click(e.close);a.show&&a.show(e);e.show("fade",ANIMATION_TIME,function(){a.ready&&a.ready(e)}).css("display","inline-block");$(document).keydown(function(a){if(27===a.which)return e.close(),!1})})};a.url?$.get(a.url,e):e("")} function star(a,e,c,b,d,g,l,f){l.save();l.strokeStyle=g;f&&(l.fillStyle=g);l.beginPath();l.translate(a,e);l.moveTo(0,0-c);for(a=0;a").appendTo(a.find(".blog-yumprint-star-container")).get(0);g.width=21*e;g=g.getContext("2d");g.clearRect(0,0,84,20);star(10,10,10,5,0.5,c,g,!0);star(31,10,10,5,0.5,c,g,!0);star(52,10,10,5,0.5,c,g,!0);star(73,10,10,5,0.5,c,g,!0);c=$("").appendTo(a.find(".blog-yumprint-star-container")).get(0);c.width=21*e;e=c.getContext("2d");e.clearRect(0,0,84,20);star(10,10,10,5,0.5,b,e,!0);star(31,10,10,5,0.5,b,e,!0);star(52,10,10,5,0.5,b,e,!0);star(73,10,10,5,0.5,b,e,!0)}a=$("").appendTo(a.find(".blog-yumprint-star-container")).get(0).getContext("2d");a.clearRect(0,0,84,20);star(10,10,10,5,0.5,d,a);star(31,10,10,5,0.5,d,a);star(52,10,10,5,0.5,d,a);star(73,10,10,5,0.5,d,a)} function getPixels(a){return(a=/^(\d+)px$/.exec(a))&&a[0]||null} function initRecipe(a){if(699<$(window).width()){var e=a.find(".blog-yumprint-save");if(!e.length||!e.is(":visible")||"hidden"===e.css("visibility")||e.css("background-color")===e.css("color")||"0px"!==e.css("top")||"0px"!==e.css("left")||"0px"!==e.css("bottom")||"0px"!==e.css("right")||"0px"!==e.css("margin-top")&&""!==e.css("margin-top")||"0px"!==e.css("margin-right")&&""!==e.css("margin-right")||"0px"!==e.css("margin-bottom")&&""!==e.css("margin-bottom")||"0px"!==e.css("margin-left")&&""!==e.css("margin-left")||"0px"!==e.css("margin")&&""!==e.css("margin")||"0px"===e.css("height")||"0px"===e.css("width")||!e.text()){a.remove();return}}a.find(".blog-yumprint-print").click(function(){for(var b={title:a.find(".blog-yumprint-recipe-title").text(),image:a.find(".blog-yumprint-google-image").attr("src"),link:a.find(".blog-yumprint-recipe-source").text(),serves:a.find(".blog-yumprint-serves").text(),sections:[],stats:[]},c=0;cPrint - "+a.find(".blog-yumprint-recipe-title").text()+"'},pp_settings);var matchedObjects=this,percentBased=false,pp_dimensions,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){_center_overlay();_resize_overlay();});if(pp_settings.keyboard_shortcuts){$(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){if(typeof $pp_pic_holder!='undefined'){if($pp_pic_holder.is(':visible')){switch(e.keyCode){case 37:$.prettyPhoto.changePage('previous');e.preventDefault();break;case 39:$.prettyPhoto.changePage('next');e.preventDefault();break;case 27:if(!settings.modal) $.prettyPhoto.close();e.preventDefault();break;};};};});};$.prettyPhoto.initialize=function(){settings=pp_settings;if(settings.theme=='pp_default')settings.horizontal_padding=16;theRel=$(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return $(n).attr('href');}):$.makeArray($(this).attr('href'));pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return($(n).find('img').attr('alt'))?$(n).find('img').attr('alt'):"";}):$.makeArray($(this).find('img').attr('alt'));pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr(settings.hook).indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(this).attr('title'));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray($(this).attr('href'),pp_images);rel_index=(isSet)?set_position:$("a["+settings.hook+"^='"+theRel+"']").index($(this));_build_overlay(this);if(settings.allow_resize) $.prettyPhoto.open();return false;} $.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;pp_images=$.makeArray(arguments[0]);pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pp_images.length>1)?true:false;set_position=(arguments[3])?arguments[3]:0;_build_overlay(event.target);} if(settings.hideflash)$('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden');_checkPosition($(pp_images).size());$('.pp_loaderIcon').fadeIn(600);if(settings.deeplinking) setHashtag();if(settings.social_tools){facebook_like_link=settings.social_tools.replace('{location_href}',encodeURIComponent(location.href));$pp_pic_holder.find('.pp_social').html(facebook_like_link);} if($ppt.is(':hidden'))$ppt.css('opacity',0).show();$pp_overlay.css('opacity',0.85);$pp_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pp_images).size());if(typeof pp_descriptions[set_position]!='undefined'&&pp_descriptions[set_position]!=""){$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));}else{$pp_pic_holder.find('.pp_description').hide();} movie_width=(parseFloat(getParam('width',pp_images[set_position])))?getParam('width',pp_images[set_position]):settings.default_width.toString();movie_height=(parseFloat(getParam('height',pp_images[set_position])))?getParam('height',pp_images[set_position]):settings.default_height.toString();percentBased=false;if(movie_height.indexOf('%')!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);percentBased=true;} if(movie_width.indexOf('%')!=-1){movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;} $pp_pic_holder.fadeIn(function(){(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(' ');imgPreloader="";skipInjection=false;switch(_getFileType(pp_images[set_position])){case'image':imgPreloader=new Image();nextImage=new Image();if(isSet&&set_position<$(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image();if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.onerror=function(){alert('Image cannot be loaded. Make sure the path is correct and image exist.');$.prettyPhoto.close();};imgPreloader.src=pp_images[set_position];break;case'youtube':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=getParam('v',pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split('youtu.be/');movie_id=movie_id[1];if(movie_id.indexOf('?')>0) movie_id=movie_id.substr(0,movie_id.indexOf('?'));if(movie_id.indexOf('&')>0) movie_id=movie_id.substr(0,movie_id.indexOf('&'));} movie='http://www.youtube.com/embed/'+movie_id;(getParam('rel',pp_images[set_position]))?movie+="?rel="+getParam('rel',pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case'vimeo':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie='http://player.vimeo.com/video/'+match[3]+'?title=0&byline=0&portrait=0';if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=pp_dimensions['width']+'/embed/?moog_width='+pp_dimensions['width'];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);break;case'quicktime':pp_dimensions=_fitToViewport(movie_width,movie_height);pp_dimensions['height']+=15;pp_dimensions['contentHeight']+=15;pp_dimensions['containerHeight']+=15;toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case'flash':pp_dimensions=_fitToViewport(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars')+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf('?'));toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);break;case'iframe':pp_dimensions=_fitToViewport(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);break;case'ajax':doresize=false;pp_dimensions=_fitToViewport(movie_width,movie_height);doresize=true;skipInjection=true;$.get(pp_images[set_position],function(responseHTML){toInject=settings.inline_markup.replace(/{content}/g,responseHTML);$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();});break;case'custom':pp_dimensions=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case'inline':myClone=$(pp_images[set_position]).clone().append('
').css({'width':settings.default_width}).wrapInner('
').appendTo($('body')).show();doresize=false;pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());doresize=true;$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break;};if(!imgPreloader&&!skipInjection){$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();};});return false;};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=='previous'){set_position--;if(set_position<0)set_position=$(pp_images).size()-1;}else if(direction=='next'){set_position++;if(set_position>$(pp_images).size()-1)set_position=0;}else{set_position=direction;};rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');} _hideContent(function(){$.prettyPhoto.open();});};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=='next'){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0;}else if(direction=='previous'){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage;}else{currentGalleryPage=direction;};slide_speed=(direction=='next'||direction=='previous')?settings.animation_speed:0;slide_to=currentGalleryPage*(itemsPerPage*itemWidth);$pp_gallery.find('ul').animate({left:-slide_to},slide_speed);};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=='undefined'){$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){$.prettyPhoto.stopSlideshow();return false;});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);}else{$.prettyPhoto.changePage('next');};} $.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});clearInterval(pp_slideshow);pp_slideshow=undefined;} $.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;$.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');$('div.pp_pic_holder,div.ppt,.pp_fade, div.pp_details, .pp_loaderIcon').fadeOut(350,function(){$(this).remove();});$pp_overlay.css('opacity',0);setTimeout(function(){if(settings.hideflash)$('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible');$pp_overlay.remove();$(window).unbind('scroll.prettyphoto');clearHashtag();settings.callback();doresize=true;pp_open=false;delete settings;},350);};function _showContent(){projectedTop=scroll_pos['scrollTop']+((windowHeight/2)-(pp_dimensions['containerHeight']/2));if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find('.pp_content').css({height:pp_dimensions['contentHeight'],width:pp_dimensions['contentWidth']});$pp_pic_holder.css({'top':projectedTop,'left':((windowWidth/2)-(pp_dimensions['containerWidth']/2)<0)?0:(windowWidth/2)-(pp_dimensions['containerWidth']/2),width:pp_dimensions['containerWidth']});$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);if($pp_pic_holder.find('#pp_full_res > iframe').length==0){$('.pp_loaderIcon').stop(true,true).fadeOut();$pp_pic_holder.find('.pp_fade, div.pp_details').fadeIn(settings.animation_speed);} else{$pp_pic_holder.find('iframe').load(function(){$pp_pic_holder.css({'top':projectedTop-50,});$('.pp_loaderIcon').stop(true,true).fadeOut();$pp_pic_holder.find('.pp_fade, div.pp_details').fadeIn(settings.animation_speed);});} if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find('.pp_hoverContainer').show();}else{$pp_pic_holder.find('.pp_hoverContainer').hide();} if(settings.allow_expand){if(pp_dimensions['resized']){$('a.pp_expand,a.pp_contract').show();}else{$('a.pp_expand').hide();}} if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();settings.changepicturecallback();pp_open=true;_insert_gallery();pp_settings.ajaxcallback();};function _hideContent(callback){$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');$('.pp_loaderIcon').fadeIn(600);$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){callback();});};function _checkPosition(setCount){(setCount>1)?$('.pp_nav').show():$('.pp_nav').hide();};function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pp_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else if((pp_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;};pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;};if((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight)){_fitToViewport(pp_containerWidth,pp_containerHeight)};_getDimensions(imageWidth,imageHeight);};return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth)+(settings.horizontal_padding*2),contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized};};function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find('.pp_details');$pp_details.width(width);detailsHeight=parseFloat($pp_details.css('marginTop'))+parseFloat($pp_details.css('marginBottom'));$pp_details=$pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({'position':'absolute','top':-10000});detailsHeight+=$pp_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;$pp_details.remove();$pp_title=$pp_pic_holder.find('.ppt');$pp_title.width(width);titleHeight=parseFloat($pp_title.css('marginTop'))+parseFloat($pp_title.css('marginBottom'));$pp_title=$pp_title.clone().appendTo($('body')).css({'position':'absolute','top':-10000});titleHeight+=$pp_title.height();$pp_title.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+titleHeight+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height();pp_containerWidth=width;} function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)||itemSrc.match(/youtu\.be/i)){return'youtube';}else if(itemSrc.match(/vimeo\.com/i)){return'vimeo';}else if(itemSrc.match(/\b.mov\b/i)){return'quicktime';}else if(itemSrc.match(/\b.swf\b/i)){return'flash';}else if(itemSrc.match(/\biframe=true\b/i)){return'iframe';}else if(itemSrc.match(/\bajax=true\b/i)){return'ajax';}else if(itemSrc.match(/\bcustom=true\b/i)){return'custom';}else if(itemSrc.substr(0,1)=='#'){return'inline';}else{return'image';};};function _center_overlay(){if(doresize&&typeof $pp_pic_holder!='undefined'){scroll_pos=_get_scroll();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos['scrollTop']-(contentHeight/2);if(projectedTop<0)projectedTop=0;if(contentHeight>windowHeight) return;$pp_pic_holder.css({'top':projectedTop,'left':(windowWidth/2)+scroll_pos['scrollLeft']-(contentwidth/2)});};};function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};};function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height()).width(windowWidth);};function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=(settings.theme=="facebook"||settings.theme=="pp_default")?50:30;itemsPerPage=Math.floor((pp_dimensions['containerWidth']-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_gallery=$('.pp_pic_holder .pp_gallery'),$pp_gallery_li=$pp_gallery.find('li');$pp_gallery.find('.pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_gallery.find('.pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_gallery_li.each(function(i){$(this).find('a').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('Play') $pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});} $pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});if(settings.allow_expand){$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});} $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};if(!pp_alreadyInitialized&&getHashtag()){pp_alreadyInitialized=true;hashIndex=getHashtag();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf('/'));setTimeout(function(){$("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click');},50);} return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function getHashtag(){var url=location.href;hashtag=(url.indexOf('#prettyPhoto')!==-1)?decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)):false;return hashtag;};function setHashtag(){if(typeof theRel=='undefined')return;location.hash=theRel+'/'+rel_index+'/';};function clearHashtag(){if(location.href.indexOf('#prettyPhoto')!==-1)location.hash="prettyPhoto";} function getParam(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);var pp_alreadyInitialized=false; (function(d){d.flexslider=function(j,l){var a=d(j),c=d.extend({},d.flexslider.defaults,l),e=c.namespace,q="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,u=q?"touchend":"click",m="vertical"===c.direction,n=c.reverse,h=0g?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(d,c.pauseOnAction)});c.pausePlay&&f.pausePlay.setup();c.slideshow&&(c.pauseOnHover&&a.hover(function(){!a.manualPlay&&!a.manualPause&&a.pause()}, function(){!a.manualPause&&!a.manualPlay&&a.play()}),0');if(1':""+b+"",a.controlNavScaffold.append("
  • "+g+"
  • "),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",u,function(b){b.preventDefault();b=d(this);var g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});q&&a.controlNavScaffold.delegate("a", "click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(u,function(b){b.preventDefault();b=d(this);var g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});q&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"), a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1"+a.count+"")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1
  • '+c.prevText+'
  • '+c.nextText+"
  • ");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(u,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)}); q&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('
    ');a.controlsContainer? (a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(u,function(b){b.preventDefault();d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())});q&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+"pause").addClass(e+ "play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){k=m?d-b.touches[0].pageY:d-b.touches[0].pageX;q=m?Math.abs(k)k||a.currentSlide===a.last&&0Number(new Date)-l&&50r/2)?a.flexAnimate(m,c.pauseOnAction):s||a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}j.removeEventListener("touchend",g,!1);f=k=e=d=null}var d,e,f,r,k,l,q=!1;j.addEventListener("touchstart",function(k){a.animating?k.preventDefault():1===k.touches.length&&(a.pause(),r=m?a.h:a.w,l=Number(new Date),f=h&&n&&a.animatingTo=== a.last?0:h&&n?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:n?(a.last-a.currentSlide+a.cloneOffset)*r:(a.currentSlide+a.cloneOffset)*r,d=m?k.touches[0].pageY:k.touches[0].pageX,e=m?k.touches[0].pageX:k.touches[0].pageY,j.addEventListener("touchmove",b,!1),j.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),s?f.smoothHeight():h?(a.slides.width(a.computedW), a.update(a.pagingCount),a.setProps()):m?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!m||s){var c=s?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case "animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case "play":!g.playing&& !g.asNav&&g.play();break;case "pause":g.pause()}}};a.flexAnimate=function(b,g,p,j,l){t&&1===a.pagingCount&&(a.direction=a.currentItema.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo, b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?n?(a.count+a.cloneOffset)*r:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?n?0:(a.count+1)*r:n?(a.count-1-b+a.cloneOffset)*r:(b+a.cloneOffset)*r;a.setProps(b,"",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend", function(){a.wrapup(r)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(r)})}c.smoothHeight&&f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!s&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause= function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")};a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=t?a.pagingCount-1:a.last;return g?!0:t&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:t&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&& !t?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0===b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:n&&a.animatingTo===a.last?0:n?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo=== a.last?a.limit:f;switch(g){case "setTotal":return n?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return n?b:a.count*b;case "jumpStart":return n?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=m?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(s)a.slides.css({width:"100%", "float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(q?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+c.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing)),c.smoothHeight&&f.smoothHeight();else{var g,p;"init"===b&&(a.viewport=d('
    ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset= 0,n&&(p=d.makeArray(a.slides).reverse(),a.slides=d(p),a.container.empty().append(a.slides)));c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=n?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;m&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"), setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide")};a.doMath=function(){var b=a.slides.first(), d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()-b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxWa.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0a.w?(a.itemW+2*d)*a.count-a.w- d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-a.boxPadding};a.update=function(b,d){a.doMath();h||(ba.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1), f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f=d(b);a.count+=1;a.last=a.count-1;m&&n?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():m&&n?a.slides.eq(a.last).remove(): a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.removed(a)};f.init()};d.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,pauseOnAction:!0,pauseOnHover:!1,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:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(j){void 0===j&&(j={});if("object"===typeof j)return this.each(function(){var a=d(this),c=a.find(j.selector?j.selector:".slides > li");1===c.length?(c.fadeIn(400), j.start&&j.start(a)):void 0==a.data("flexslider")&&new d.flexslider(this,j)});var l=d(this).data("flexslider");switch(j){case "play":l.play();break;case "pause":l.pause();break;case "next":l.flexAnimate(l.getTarget("next"),!0);break;case "prev":case "previous":l.flexAnimate(l.getTarget("prev"),!0);break;default:"number"===typeof j&&l.flexAnimate(j,!0)}}})(jQuery); /*jshint asi: true, browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */ /*global jQuery: false */ (function( window, $, undefined ){ 'use strict'; var document = window.document; var Modernizr = window.Modernizr; var capitalize = function( str ) { return str.charAt(0).toUpperCase() + str.slice(1); }; var prefixes = 'Moz Webkit O Ms'.split(' '); var getStyleProperty = function( propName ) { var style = document.documentElement.style, prefixed; if ( typeof style[propName] === 'string' ) { return propName; } propName = capitalize( propName ); for ( var i=0, len = prefixes.length; i < len; i++ ) { prefixed = prefixes[i] + propName; if ( typeof style[ prefixed ] === 'string' ) { return prefixed; } } }; var transformProp = getStyleProperty('transform'), transitionProp = getStyleProperty('transitionProperty'); /*! * Modernizr v1.6ish: miniModernizr for Isotope * http://www.modernizr.com * * Developed by: * - Faruk Ates http://farukat.es/ * - Paul Irish http://paulirish.com/ * * Copyright (c) 2009-2010 * Dual-licensed under the BSD or MIT licenses. * http://www.modernizr.com/license/ */ /* * This version whittles down the script just to check support for * CSS transitions, transforms, and 3D transforms. */ var tests = { csstransforms: function() { return !!transformProp; }, csstransforms3d: function() { var test = !!getStyleProperty('perspective'); if ( test ) { var vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '), mediaQuery = '@media (' + vendorCSSPrefixes.join('transform-3d),(') + 'modernizr)', $style = $('') .appendTo('head'), $div = $('
    ').appendTo('html'); test = $div.height() === 3; $div.remove(); $style.remove(); } return test; }, csstransitions: function() { return !!transitionProp; } }; var testName; if ( Modernizr ) { for ( testName in tests) { if ( !Modernizr.hasOwnProperty( testName ) ) { Modernizr.addTest( testName, tests[ testName ] ); } } } else { Modernizr = window.Modernizr = { _version : '1.6ish: miniModernizr for Isotope' }; var classes = ' '; var result; for ( testName in tests) { result = tests[ testName ](); Modernizr[ testName ] = result; classes += ' ' + ( result ? '' : 'no-' ) + testName; } $('html').addClass( classes ); } /** * provides hooks for .css({ scale: value, translate: [x, y] }) * Progressively enhanced CSS transforms * Uses hardware accelerated 3D transforms for Safari * or falls back to 2D transforms. */ if ( Modernizr.csstransforms ) { var transformFnNotations = Modernizr.csstransforms3d ? { // 3D transform functions translate : function ( position ) { return 'translate3d(' + position[0] + 'px, ' + position[1] + 'px, 0) '; }, scale : function ( scale ) { return 'scale3d(' + scale + ', ' + scale + ', 1) '; } } : { // 2D transform functions translate : function ( position ) { return 'translate(' + position[0] + 'px, ' + position[1] + 'px) '; }, scale : function ( scale ) { return 'scale(' + scale + ') '; } } ; var setIsoTransform = function ( elem, name, value ) { var data = $.data( elem, 'isoTransform' ) || {}, newData = {}, fnName, transformObj = {}, transformValue; newData[ name ] = value; $.extend( data, newData ); for ( fnName in data ) { transformValue = data[ fnName ]; transformObj[ fnName ] = transformFnNotations[ fnName ]( transformValue ); } var translateFn = transformObj.translate || '', scaleFn = transformObj.scale || '', valueFns = translateFn + scaleFn; $.data( elem, 'isoTransform', data ); elem.style[ transformProp ] = valueFns; }; $.cssNumber.scale = true; $.cssHooks.scale = { set: function( elem, value ) { setIsoTransform( elem, 'scale', value ); }, get: function( elem, computed ) { var transform = $.data( elem, 'isoTransform' ); return transform && transform.scale ? transform.scale : 1; } }; $.fx.step.scale = function( fx ) { $.cssHooks.scale.set( fx.elem, fx.now+fx.unit ); }; $.cssNumber.translate = true; $.cssHooks.translate = { set: function( elem, value ) { setIsoTransform( elem, 'translate', value ); }, get: function( elem, computed ) { var transform = $.data( elem, 'isoTransform' ); return transform && transform.translate ? transform.translate : [ 0, 0 ]; } }; } var transitionEndEvent, transitionDurProp; if ( Modernizr.csstransitions ) { transitionEndEvent = { WebkitTransitionProperty: 'webkitTransitionEnd', // webkit MozTransitionProperty: 'transitionend', OTransitionProperty: 'oTransitionEnd otransitionend', transitionProperty: 'transitionend' }[ transitionProp ]; transitionDurProp = getStyleProperty('transitionDuration'); } /* * smartresize: debounced resize event for jQuery * * latest version and complete README available on Github: * https://github.com/louisremi/jquery.smartresize.js * * Copyright 2011 @louis_remi * Licensed under the MIT license. */ var $event = $.event, dispatchMethod = $.event.handle ? 'handle' : 'dispatch', resizeTimeout; $event.special.smartresize = { setup: function() { $(this).bind( "resize", $event.special.smartresize.handler ); }, teardown: function() { $(this).unbind( "resize", $event.special.smartresize.handler ); }, handler: function( event, execAsap ) { var context = this, args = arguments; event.type = "smartresize"; if ( resizeTimeout ) { clearTimeout( resizeTimeout ); } resizeTimeout = setTimeout(function() { $event[ dispatchMethod ].apply( context, args ); }, execAsap === "execAsap"? 0 : 100 ); } }; $.fn.smartresize = function( fn ) { return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] ); }; $.Isotope = function( options, element, callback ){ this.element = $( element ); this._create( options ); this._init( callback ); }; var isoContainerStyles = [ 'width', 'height' ]; var $window = $(window); $.Isotope.settings = { resizable: true, layoutMode : 'masonry', containerClass : 'isotope', itemClass : 'isotope-item', hiddenClass : 'isotope-hidden', hiddenStyle: { opacity: 0, scale: 0.001 }, visibleStyle: { opacity: 1, scale: 1 }, containerStyle: { position: 'relative', overflow: 'hidden' }, animationEngine: 'best-available', animationOptions: { queue: false, duration: 800 }, sortBy : 'original-order', sortAscending : true, resizesContainer : true, transformsEnabled: true, itemPositionDataEnabled: false }; $.Isotope.prototype = { _create : function( options ) { this.options = $.extend( {}, $.Isotope.settings, options ); this.styleQueue = []; this.elemCount = 0; var elemStyle = this.element[0].style; this.originalStyle = {}; var containerStyles = isoContainerStyles.slice(0); for ( var prop in this.options.containerStyle ) { containerStyles.push( prop ); } for ( var i=0, len = containerStyles.length; i < len; i++ ) { prop = containerStyles[i]; this.originalStyle[ prop ] = elemStyle[ prop ] || ''; } this.element.css( this.options.containerStyle ); this._updateAnimationEngine(); this._updateUsingTransforms(); var originalOrderSorter = { 'original-order' : function( $elem, instance ) { instance.elemCount ++; return instance.elemCount; }, random : function() { return Math.random(); } }; this.options.getSortData = $.extend( this.options.getSortData, originalOrderSorter ); this.reloadItems(); this.offset = { left: parseInt( ( this.element.css('padding-left') || 0 ), 10 ), top: parseInt( ( this.element.css('padding-top') || 0 ), 10 ) }; var instance = this; setTimeout( function() { instance.element.addClass( instance.options.containerClass ); }, 0 ); if ( this.options.resizable ) { $window.bind( 'smartresize.isotope', function() { instance.resize(); }); } this.element.delegate( '.' + this.options.hiddenClass, 'click', function(){ return false; }); }, _getAtoms : function( $elems ) { var selector = this.options.itemSelector, $atoms = selector ? $elems.filter( selector ).add( $elems.find( selector ) ) : $elems, atomStyle = { position: 'absolute' }; $atoms = $atoms.filter( function( i, atom ) { return atom.nodeType === 1; }); if ( this.usingTransforms ) { atomStyle.left = 0; atomStyle.top = 0; } $atoms.css( atomStyle ).addClass( this.options.itemClass ); this.updateSortData( $atoms, true ); return $atoms; }, _init : function( callback ) { this.$filteredAtoms = this._filter( this.$allAtoms ); this._sort(); this.reLayout( callback ); }, option : function( opts ){ if ( $.isPlainObject( opts ) ){ this.options = $.extend( true, this.options, opts ); var updateOptionFn; for ( var optionName in opts ) { updateOptionFn = '_update' + capitalize( optionName ); if ( this[ updateOptionFn ] ) { this[ updateOptionFn ](); } } } }, _updateAnimationEngine : function() { var animationEngine = this.options.animationEngine.toLowerCase().replace( /[ _\-]/g, ''); var isUsingJQueryAnimation; switch ( animationEngine ) { case 'css' : case 'none' : isUsingJQueryAnimation = false; break; case 'jquery' : isUsingJQueryAnimation = true; break; default : // best available isUsingJQueryAnimation = !Modernizr.csstransitions; } this.isUsingJQueryAnimation = isUsingJQueryAnimation; this._updateUsingTransforms(); }, _updateTransformsEnabled : function() { this._updateUsingTransforms(); }, _updateUsingTransforms : function() { var usingTransforms = this.usingTransforms = this.options.transformsEnabled && Modernizr.csstransforms && Modernizr.csstransitions && !this.isUsingJQueryAnimation; if ( !usingTransforms ) { delete this.options.hiddenStyle.scale; delete this.options.visibleStyle.scale; } this.getPositionStyles = usingTransforms ? this._translate : this._positionAbs; }, _filter : function( $atoms ) { var filter = this.options.filter === '' ? '*' : this.options.filter; if ( !filter ) { return $atoms; } var hiddenClass = this.options.hiddenClass, hiddenSelector = '.' + hiddenClass, $hiddenAtoms = $atoms.filter( hiddenSelector ), $atomsToShow = $hiddenAtoms; if ( filter !== '*' ) { $atomsToShow = $hiddenAtoms.filter( filter ); var $atomsToHide = $atoms.not( hiddenSelector ).not( filter ).addClass( hiddenClass ); this.styleQueue.push({ $el: $atomsToHide, style: this.options.hiddenStyle }); } this.styleQueue.push({ $el: $atomsToShow, style: this.options.visibleStyle }); $atomsToShow.removeClass( hiddenClass ); return $atoms.filter( filter ); }, updateSortData : function( $atoms, isIncrementingElemCount ) { var instance = this, getSortData = this.options.getSortData, $this, sortData; $atoms.each(function(){ $this = $(this); sortData = {}; for ( var key in getSortData ) { if ( !isIncrementingElemCount && key === 'original-order' ) { sortData[ key ] = $.data( this, 'isotope-sort-data' )[ key ]; } else { sortData[ key ] = getSortData[ key ]( $this, instance ); } } $.data( this, 'isotope-sort-data', sortData ); }); }, _sort : function() { var sortBy = this.options.sortBy, getSorter = this._getSorter, sortDir = this.options.sortAscending ? 1 : -1, sortFn = function( alpha, beta ) { var a = getSorter( alpha, sortBy ), b = getSorter( beta, sortBy ); if ( a === b && sortBy !== 'original-order') { a = getSorter( alpha, 'original-order' ); b = getSorter( beta, 'original-order' ); } return ( ( a > b ) ? 1 : ( a < b ) ? -1 : 0 ) * sortDir; }; this.$filteredAtoms.sort( sortFn ); }, _getSorter : function( elem, sortBy ) { return $.data( elem, 'isotope-sort-data' )[ sortBy ]; }, _translate : function( x, y ) { return { translate : [ x, y ] }; }, _positionAbs : function( x, y ) { return { left: x, top: y }; }, _pushPosition : function( $elem, x, y ) { x = Math.round( x + this.offset.left ); y = Math.round( y + this.offset.top ); var position = this.getPositionStyles( x, y ); this.styleQueue.push({ $el: $elem, style: position }); if ( this.options.itemPositionDataEnabled ) { $elem.data('isotope-item-position', {x: x, y: y} ); } }, layout : function( $elems, callback ) { var layoutMode = this.options.layoutMode; this[ '_' + layoutMode + 'Layout' ]( $elems ); if ( this.options.resizesContainer ) { var containerStyle = this[ '_' + layoutMode + 'GetContainerSize' ](); this.styleQueue.push({ $el: this.element, style: containerStyle }); } this._processStyleQueue( $elems, callback ); this.isLaidOut = true; }, _processStyleQueue : function( $elems, callback ) { var styleFn = !this.isLaidOut ? 'css' : ( this.isUsingJQueryAnimation ? 'animate' : 'css' ), animOpts = this.options.animationOptions, onLayout = this.options.onLayout, objStyleFn, processor, triggerCallbackNow, callbackFn; processor = function( i, obj ) { obj.$el[ styleFn ]( obj.style, animOpts ); }; if ( this._isInserting && this.isUsingJQueryAnimation ) { processor = function( i, obj ) { objStyleFn = obj.$el.hasClass('no-transition') ? 'css' : styleFn; obj.$el[ objStyleFn ]( obj.style, animOpts ); }; } else if ( callback || onLayout || animOpts.complete ) { var isCallbackTriggered = false, callbacks = [ callback, onLayout, animOpts.complete ], instance = this; triggerCallbackNow = true; callbackFn = function() { if ( isCallbackTriggered ) { return; } var hollaback; for (var i=0, len = callbacks.length; i < len; i++) { hollaback = callbacks[i]; if ( typeof hollaback === 'function' ) { hollaback.call( instance.element, $elems, instance ); } } isCallbackTriggered = true; }; if ( this.isUsingJQueryAnimation && styleFn === 'animate' ) { animOpts.complete = callbackFn; triggerCallbackNow = false; } else if ( Modernizr.csstransitions ) { var i = 0, firstItem = this.styleQueue[0], testElem = firstItem && firstItem.$el, styleObj; while ( !testElem || !testElem.length ) { styleObj = this.styleQueue[ i++ ]; if ( !styleObj ) { return; } testElem = styleObj.$el; } var duration = parseFloat( getComputedStyle( testElem[0] )[ transitionDurProp ] ); if ( duration > 0 ) { processor = function( i, obj ) { obj.$el[ styleFn ]( obj.style, animOpts ) .one( transitionEndEvent, callbackFn ); }; triggerCallbackNow = false; } } } $.each( this.styleQueue, processor ); if ( triggerCallbackNow ) { callbackFn(); } this.styleQueue = []; }, resize : function() { if ( this[ '_' + this.options.layoutMode + 'ResizeChanged' ]() ) { this.reLayout(); } }, reLayout : function( callback ) { this[ '_' + this.options.layoutMode + 'Reset' ](); this.layout( this.$filteredAtoms, callback ); }, addItems : function( $content, callback ) { var $newAtoms = this._getAtoms( $content ); this.$allAtoms = this.$allAtoms.add( $newAtoms ); if ( callback ) { callback( $newAtoms ); } }, insert : function( $content, callback ) { this.element.append( $content ); var instance = this; this.addItems( $content, function( $newAtoms ) { var $newFilteredAtoms = instance._filter( $newAtoms ); instance._addHideAppended( $newFilteredAtoms ); instance._sort(); instance.reLayout(); instance._revealAppended( $newFilteredAtoms, callback ); }); }, appended : function( $content, callback ) { var instance = this; this.addItems( $content, function( $newAtoms ) { instance._addHideAppended( $newAtoms ); instance.layout( $newAtoms ); instance._revealAppended( $newAtoms, callback ); }); }, _addHideAppended : function( $newAtoms ) { this.$filteredAtoms = this.$filteredAtoms.add( $newAtoms ); $newAtoms.addClass('no-transition'); this._isInserting = true; this.styleQueue.push({ $el: $newAtoms, style: this.options.hiddenStyle }); }, _revealAppended : function( $newAtoms, callback ) { var instance = this; setTimeout( function() { $newAtoms.removeClass('no-transition'); instance.styleQueue.push({ $el: $newAtoms, style: instance.options.visibleStyle }); instance._isInserting = false; instance._processStyleQueue( $newAtoms, callback ); }, 10 ); }, reloadItems : function() { this.$allAtoms = this._getAtoms( this.element.children() ); }, remove: function( $content, callback ) { this.$allAtoms = this.$allAtoms.not( $content ); this.$filteredAtoms = this.$filteredAtoms.not( $content ); var instance = this; var removeContent = function() { $content.remove(); if ( callback ) { callback.call( instance.element ); } }; if ( $content.filter( ':not(.' + this.options.hiddenClass + ')' ).length ) { this.styleQueue.push({ $el: $content, style: this.options.hiddenStyle }); this._sort(); this.reLayout( removeContent ); } else { removeContent(); } }, shuffle : function( callback ) { this.updateSortData( this.$allAtoms ); this.options.sortBy = 'random'; this._sort(); this.reLayout( callback ); }, destroy : function() { var usingTransforms = this.usingTransforms; var options = this.options; this.$allAtoms .removeClass( options.hiddenClass + ' ' + options.itemClass ) .each(function(){ var style = this.style; style.position = ''; style.top = ''; style.left = ''; style.opacity = ''; if ( usingTransforms ) { style[ transformProp ] = ''; } }); var elemStyle = this.element[0].style; for ( var prop in this.originalStyle ) { elemStyle[ prop ] = this.originalStyle[ prop ]; } this.element .unbind('.isotope') .undelegate( '.' + options.hiddenClass, 'click' ) .removeClass( options.containerClass ) .removeData('isotope'); $window.unbind('.isotope'); }, _getSegments : function( isRows ) { var namespace = this.options.layoutMode, measure = isRows ? 'rowHeight' : 'columnWidth', size = isRows ? 'height' : 'width', segmentsName = isRows ? 'rows' : 'cols', containerSize = this.element[ size ](), segments, segmentSize = this.options[ namespace ] && this.options[ namespace ][ measure ] || this.$filteredAtoms[ 'outer' + capitalize(size) ](true) || containerSize; segments = Math.floor( containerSize / segmentSize ); segments = Math.max( segments, 1 ); this[ namespace ][ segmentsName ] = segments; this[ namespace ][ measure ] = segmentSize; }, _checkIfSegmentsChanged : function( isRows ) { var namespace = this.options.layoutMode, segmentsName = isRows ? 'rows' : 'cols', prevSegments = this[ namespace ][ segmentsName ]; this._getSegments( isRows ); return ( this[ namespace ][ segmentsName ] !== prevSegments ); }, _masonryReset : function() { this.masonry = {}; this._getSegments(); var i = this.masonry.cols; this.masonry.colYs = []; while (i--) { this.masonry.colYs.push( 0 ); } }, _masonryLayout : function( $elems ) { var instance = this, props = instance.masonry; $elems.each(function(){ var $this = $(this), colSpan = Math.ceil( $this.outerWidth(true) / props.columnWidth ); colSpan = Math.min( colSpan, props.cols ); if ( colSpan === 1 ) { instance._masonryPlaceBrick( $this, props.colYs ); } else { var groupCount = props.cols + 1 - colSpan, groupY = [], groupColY, i; for ( i=0; i < groupCount; i++ ) { groupColY = props.colYs.slice( i, i+colSpan ); groupY[i] = Math.max.apply( Math, groupColY ); } instance._masonryPlaceBrick( $this, groupY ); } }); }, _masonryPlaceBrick : function( $brick, setY ) { var minimumY = Math.min.apply( Math, setY ), shortCol = 0; for (var i=0, len = setY.length; i < len; i++) { if ( setY[i] === minimumY ) { shortCol = i; break; } } var x = this.masonry.columnWidth * shortCol, y = minimumY; this._pushPosition( $brick, x, y ); var setHeight = minimumY + $brick.outerHeight(true), setSpan = this.masonry.cols + 1 - len; for ( i=0; i < setSpan; i++ ) { this.masonry.colYs[ shortCol + i ] = setHeight; } }, _masonryGetContainerSize : function() { var containerHeight = Math.max.apply( Math, this.masonry.colYs ); return { height: containerHeight }; }, _masonryResizeChanged : function() { return this._checkIfSegmentsChanged(); }, _fitRowsReset : function() { this.fitRows = { x : 0, y : 0, height : 0 }; }, _fitRowsLayout : function( $elems ) { var instance = this, containerWidth = this.element.width(), props = this.fitRows; $elems.each( function() { var $this = $(this), atomW = $this.outerWidth(true), atomH = $this.outerHeight(true); if ( props.x !== 0 && atomW + props.x > containerWidth ) { props.x = 0; props.y = props.height; } instance._pushPosition( $this, props.x, props.y ); props.height = Math.max( props.y + atomH, props.height ); props.x += atomW; }); }, _fitRowsGetContainerSize : function () { return { height : this.fitRows.height }; }, _fitRowsResizeChanged : function() { return true; }, _cellsByRowReset : function() { this.cellsByRow = { index : 0 }; this._getSegments(); this._getSegments(true); }, _cellsByRowLayout : function( $elems ) { var instance = this, props = this.cellsByRow; $elems.each( function(){ var $this = $(this), col = props.index % props.cols, row = Math.floor( props.index / props.cols ), x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2, y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2; instance._pushPosition( $this, x, y ); props.index ++; }); }, _cellsByRowGetContainerSize : function() { return { height : Math.ceil( this.$filteredAtoms.length / this.cellsByRow.cols ) * this.cellsByRow.rowHeight + this.offset.top }; }, _cellsByRowResizeChanged : function() { return this._checkIfSegmentsChanged(); }, _straightDownReset : function() { this.straightDown = { y : 0 }; }, _straightDownLayout : function( $elems ) { var instance = this; $elems.each( function( i ){ var $this = $(this); instance._pushPosition( $this, 0, instance.straightDown.y ); instance.straightDown.y += $this.outerHeight(true); }); }, _straightDownGetContainerSize : function() { return { height : this.straightDown.y }; }, _straightDownResizeChanged : function() { return true; }, _masonryHorizontalReset : function() { this.masonryHorizontal = {}; this._getSegments( true ); var i = this.masonryHorizontal.rows; this.masonryHorizontal.rowXs = []; while (i--) { this.masonryHorizontal.rowXs.push( 0 ); } }, _masonryHorizontalLayout : function( $elems ) { var instance = this, props = instance.masonryHorizontal; $elems.each(function(){ var $this = $(this), rowSpan = Math.ceil( $this.outerHeight(true) / props.rowHeight ); rowSpan = Math.min( rowSpan, props.rows ); if ( rowSpan === 1 ) { instance._masonryHorizontalPlaceBrick( $this, props.rowXs ); } else { var groupCount = props.rows + 1 - rowSpan, groupX = [], groupRowX, i; for ( i=0; i < groupCount; i++ ) { groupRowX = props.rowXs.slice( i, i+rowSpan ); groupX[i] = Math.max.apply( Math, groupRowX ); } instance._masonryHorizontalPlaceBrick( $this, groupX ); } }); }, _masonryHorizontalPlaceBrick : function( $brick, setX ) { var minimumX = Math.min.apply( Math, setX ), smallRow = 0; for (var i=0, len = setX.length; i < len; i++) { if ( setX[i] === minimumX ) { smallRow = i; break; } } var x = minimumX, y = this.masonryHorizontal.rowHeight * smallRow; this._pushPosition( $brick, x, y ); var setWidth = minimumX + $brick.outerWidth(true), setSpan = this.masonryHorizontal.rows + 1 - len; for ( i=0; i < setSpan; i++ ) { this.masonryHorizontal.rowXs[ smallRow + i ] = setWidth; } }, _masonryHorizontalGetContainerSize : function() { var containerWidth = Math.max.apply( Math, this.masonryHorizontal.rowXs ); return { width: containerWidth }; }, _masonryHorizontalResizeChanged : function() { return this._checkIfSegmentsChanged(true); }, _fitColumnsReset : function() { this.fitColumns = { x : 0, y : 0, width : 0 }; }, _fitColumnsLayout : function( $elems ) { var instance = this, containerHeight = this.element.height(), props = this.fitColumns; $elems.each( function() { var $this = $(this), atomW = $this.outerWidth(true), atomH = $this.outerHeight(true); if ( props.y !== 0 && atomH + props.y > containerHeight ) { props.x = props.width; props.y = 0; } instance._pushPosition( $this, props.x, props.y ); props.width = Math.max( props.x + atomW, props.width ); props.y += atomH; }); }, _fitColumnsGetContainerSize : function () { return { width : this.fitColumns.width }; }, _fitColumnsResizeChanged : function() { return true; }, _cellsByColumnReset : function() { this.cellsByColumn = { index : 0 }; this._getSegments(); this._getSegments(true); }, _cellsByColumnLayout : function( $elems ) { var instance = this, props = this.cellsByColumn; $elems.each( function(){ var $this = $(this), col = Math.floor( props.index / props.rows ), row = props.index % props.rows, x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2, y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2; instance._pushPosition( $this, x, y ); props.index ++; }); }, _cellsByColumnGetContainerSize : function() { return { width : Math.ceil( this.$filteredAtoms.length / this.cellsByColumn.rows ) * this.cellsByColumn.columnWidth }; }, _cellsByColumnResizeChanged : function() { return this._checkIfSegmentsChanged(true); }, _straightAcrossReset : function() { this.straightAcross = { x : 0 }; }, _straightAcrossLayout : function( $elems ) { var instance = this; $elems.each( function( i ){ var $this = $(this); instance._pushPosition( $this, instance.straightAcross.x, 0 ); instance.straightAcross.x += $this.outerWidth(true); }); }, _straightAcrossGetContainerSize : function() { return { width : this.straightAcross.x }; }, _straightAcrossResizeChanged : function() { return true; } }; var logError = function( message ) { if ( window.console ) { window.console.error( message ); } }; $.fn.isotope = function( options, callback ) { if ( typeof options === 'string' ) { var args = Array.prototype.slice.call( arguments, 1 ); this.each(function(){ var instance = $.data( this, 'isotope' ); if ( !instance ) { logError( "cannot call methods on isotope prior to initialization; " + "attempted to call method '" + options + "'" ); return; } if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) { logError( "no such method '" + options + "' for isotope instance" ); return; } instance[ options ].apply( instance, args ); }); } else { this.each(function() { var instance = $.data( this, 'isotope' ); if ( instance ) { instance.option( options ); instance._init( callback ); } else { $.data( this, 'isotope', new $.Isotope( options, this, callback ) ); } }); } return this; }; })( window, jQuery ); (function($) { if ( $.fn.carouFredSel ) { return; } $.fn.caroufredsel = $.fn.carouFredSel = function(options, configs) { if (this.length == 0) { debug( true, 'No element found for "' + this.selector + '".' ); return this; } if (this.length > 1) { return this.each(function() { $(this).carouFredSel(options, configs); }); } var $cfs = this, $tt0 = this[0], starting_position = false; if ($cfs.data('_cfs_isCarousel')) { starting_position = $cfs.triggerHandler('_cfs_triggerEvent', 'currentPosition'); $cfs.trigger('_cfs_triggerEvent', ['destroy', true]); } var FN = {}; FN._init = function(o, setOrig, start) { o = go_getObject($tt0, o); o.items = go_getItemsObject($tt0, o.items); o.scroll = go_getScrollObject($tt0, o.scroll); o.auto = go_getAutoObject($tt0, o.auto); o.prev = go_getPrevNextObject($tt0, o.prev); o.next = go_getPrevNextObject($tt0, o.next); o.pagination = go_getPaginationObject($tt0, o.pagination); o.swipe = go_getSwipeObject($tt0, o.swipe); o.mousewheel = go_getMousewheelObject($tt0, o.mousewheel); if (setOrig) { opts_orig = $.extend(true, {}, $.fn.carouFredSel.defaults, o); } opts = $.extend(true, {}, $.fn.carouFredSel.defaults, o); opts.d = cf_getDimensions(opts); crsl.direction = (opts.direction == 'up' || opts.direction == 'left') ? 'next' : 'prev'; var a_itm = $cfs.children(), avail_primary = ms_getParentSize($wrp, opts, 'width'); if (is_true(opts.cookie)) { opts.cookie = 'caroufredsel_cookie_' + conf.serialNumber; } opts.maxDimension = ms_getMaxDimension(opts, avail_primary); opts.items = in_complementItems(opts.items, opts, a_itm, start); opts[opts.d['width']] = in_complementPrimarySize(opts[opts.d['width']], opts, a_itm); opts[opts.d['height']] = in_complementSecondarySize(opts[opts.d['height']], opts, a_itm); if (opts.responsive) { if (!is_percentage(opts[opts.d['width']])) { opts[opts.d['width']] = '100%'; } } if (is_percentage(opts[opts.d['width']])) { crsl.upDateOnWindowResize = true; crsl.primarySizePercentage = opts[opts.d['width']]; opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage); if (!opts.items.visible) { opts.items.visibleConf.variable = true; } } if (opts.responsive) { opts.usePadding = false; opts.padding = [0, 0, 0, 0]; opts.align = false; opts.items.visibleConf.variable = false; } else { if (!opts.items.visible) { opts = in_complementVisibleItems(opts, avail_primary); } if (!opts[opts.d['width']]) { if (!opts.items.visibleConf.variable && is_number(opts.items[opts.d['width']]) && opts.items.filter == '*') { opts[opts.d['width']] = opts.items.visible * opts.items[opts.d['width']]; opts.align = false; } else { opts[opts.d['width']] = 'variable'; } } if (is_undefined(opts.align)) { opts.align = (is_number(opts[opts.d['width']])) ? 'center' : false; } if (opts.items.visibleConf.variable) { opts.items.visible = gn_getVisibleItemsNext(a_itm, opts, 0); } } if (opts.items.filter != '*' && !opts.items.visibleConf.variable) { opts.items.visibleConf.org = opts.items.visible; opts.items.visible = gn_getVisibleItemsNextFilter(a_itm, opts, 0); } opts.items.visible = cf_getItemsAdjust(opts.items.visible, opts, opts.items.visibleConf.adjust, $tt0); opts.items.visibleConf.old = opts.items.visible; if (opts.responsive) { if (!opts.items.visibleConf.min) { opts.items.visibleConf.min = opts.items.visible; } if (!opts.items.visibleConf.max) { opts.items.visibleConf.max = opts.items.visible; } opts = in_getResponsiveValues(opts, a_itm, avail_primary); } else { opts.padding = cf_getPadding(opts.padding); if (opts.align == 'top') { opts.align = 'left'; } else if (opts.align == 'bottom') { opts.align = 'right'; } switch (opts.align) { case 'center': case 'left': case 'right': if (opts[opts.d['width']] != 'variable') { opts = in_getAlignPadding(opts, a_itm); opts.usePadding = true; } break; default: opts.align = false; opts.usePadding = ( opts.padding[0] == 0 && opts.padding[1] == 0 && opts.padding[2] == 0 && opts.padding[3] == 0 ) ? false : true; break; } } if (!is_number(opts.scroll.duration)) { opts.scroll.duration = 500; } if (is_undefined(opts.scroll.items)) { opts.scroll.items = (opts.responsive || opts.items.visibleConf.variable || opts.items.filter != '*') ? 'visible' : opts.items.visible; } opts.auto = $.extend(true, {}, opts.scroll, opts.auto); opts.prev = $.extend(true, {}, opts.scroll, opts.prev); opts.next = $.extend(true, {}, opts.scroll, opts.next); opts.pagination = $.extend(true, {}, opts.scroll, opts.pagination); opts.auto = go_complementAutoObject($tt0, opts.auto); opts.prev = go_complementPrevNextObject($tt0, opts.prev); opts.next = go_complementPrevNextObject($tt0, opts.next); opts.pagination = go_complementPaginationObject($tt0, opts.pagination); opts.swipe = go_complementSwipeObject($tt0, opts.swipe); opts.mousewheel = go_complementMousewheelObject($tt0, opts.mousewheel); if (opts.synchronise) { opts.synchronise = cf_getSynchArr(opts.synchronise); } if (opts.auto.onPauseStart) { opts.auto.onTimeoutStart = opts.auto.onPauseStart; deprecated('auto.onPauseStart', 'auto.onTimeoutStart'); } if (opts.auto.onPausePause) { opts.auto.onTimeoutPause = opts.auto.onPausePause; deprecated('auto.onPausePause', 'auto.onTimeoutPause'); } if (opts.auto.onPauseEnd) { opts.auto.onTimeoutEnd = opts.auto.onPauseEnd; deprecated('auto.onPauseEnd', 'auto.onTimeoutEnd'); } if (opts.auto.pauseDuration) { opts.auto.timeoutDuration = opts.auto.pauseDuration; deprecated('auto.pauseDuration', 'auto.timeoutDuration'); } }; // /init FN._build = function() { $cfs.data('_cfs_isCarousel', true); var a_itm = $cfs.children(), orgCSS = in_mapCss($cfs, ['textAlign', 'float', 'position', 'top', 'right', 'bottom', 'left', 'zIndex', 'width', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft']), newPosition = 'relative'; switch (orgCSS.position) { case 'absolute': case 'fixed': newPosition = orgCSS.position; break; } if (conf.wrapper == 'parent') { sz_storeOrigCss($wrp); } else { $wrp.css(orgCSS); } $wrp.css({ 'overflow' : 'hidden', 'position' : newPosition }); sz_storeOrigCss($cfs); $cfs.data('_cfs_origCssZindex', orgCSS.zIndex); $cfs.css({ 'textAlign' : 'left', 'float' : 'none', 'position' : 'absolute', 'top' : 0, 'right' : 'auto', 'bottom' : 'auto', 'left' : 0, 'marginTop' : 0, 'marginRight' : 0, 'marginBottom' : 0, 'marginLeft' : 0 }); sz_storeMargin(a_itm, opts); sz_storeOrigCss(a_itm); if (opts.responsive) { sz_setResponsiveSizes(opts, a_itm); } }; // /build FN._bind_events = function() { FN._unbind_events(); $cfs.bind(cf_e('stop', conf), function(e, imm) { e.stopPropagation(); if (!crsl.isStopped) { if (opts.auto.button) { opts.auto.button.addClass(cf_c('stopped', conf)); } } crsl.isStopped = true; if (opts.auto.play) { opts.auto.play = false; $cfs.trigger(cf_e('pause', conf), imm); } return true; }); $cfs.bind(cf_e('finish', conf), function(e) { e.stopPropagation(); if (crsl.isScrolling) { sc_stopScroll(scrl); } return true; }); $cfs.bind(cf_e('pause', conf), function(e, imm, res) { e.stopPropagation(); tmrs = sc_clearTimers(tmrs); if (imm && crsl.isScrolling) { scrl.isStopped = true; var nst = getTime() - scrl.startTime; scrl.duration -= nst; if (scrl.pre) { scrl.pre.duration -= nst; } if (scrl.post) { scrl.post.duration -= nst; } sc_stopScroll(scrl, false); } if (!crsl.isPaused && !crsl.isScrolling) { if (res) { tmrs.timePassed += getTime() - tmrs.startTime; } } if (!crsl.isPaused) { if (opts.auto.button) { opts.auto.button.addClass(cf_c('paused', conf)); } } crsl.isPaused = true; if (opts.auto.onTimeoutPause) { var dur1 = opts.auto.timeoutDuration - tmrs.timePassed, perc = 100 - Math.ceil( dur1 * 100 / opts.auto.timeoutDuration ); opts.auto.onTimeoutPause.call($tt0, perc, dur1); } return true; }); $cfs.bind(cf_e('play', conf), function(e, dir, del, res) { e.stopPropagation(); tmrs = sc_clearTimers(tmrs); var v = [dir, del, res], t = ['string', 'number', 'boolean'], a = cf_sortParams(v, t); dir = a[0]; del = a[1]; res = a[2]; if (dir != 'prev' && dir != 'next') { dir = crsl.direction; } if (!is_number(del)) { del = 0; } if (!is_boolean(res)) { res = false; } if (res) { crsl.isStopped = false; opts.auto.play = true; } if (!opts.auto.play) { e.stopImmediatePropagation(); return debug(conf, 'Carousel stopped: Not scrolling.'); } if (crsl.isPaused) { if (opts.auto.button) { opts.auto.button.removeClass(cf_c('stopped', conf)); opts.auto.button.removeClass(cf_c('paused', conf)); } } crsl.isPaused = false; tmrs.startTime = getTime(); var dur1 = opts.auto.timeoutDuration + del; dur2 = dur1 - tmrs.timePassed; perc = 100 - Math.ceil(dur2 * 100 / dur1); if (opts.auto.progress) { tmrs.progress = setInterval(function() { var pasd = getTime() - tmrs.startTime + tmrs.timePassed, perc = Math.ceil(pasd * 100 / dur1); opts.auto.progress.updater.call(opts.auto.progress.bar[0], perc); }, opts.auto.progress.interval); } tmrs.auto = setTimeout(function() { if (opts.auto.progress) { opts.auto.progress.updater.call(opts.auto.progress.bar[0], 100); } if (opts.auto.onTimeoutEnd) { opts.auto.onTimeoutEnd.call($tt0, perc, dur2); } if (crsl.isScrolling) { $cfs.trigger(cf_e('play', conf), dir); } else { $cfs.trigger(cf_e(dir, conf), opts.auto); } }, dur2); if (opts.auto.onTimeoutStart) { opts.auto.onTimeoutStart.call($tt0, perc, dur2); } return true; }); $cfs.bind(cf_e('resume', conf), function(e) { e.stopPropagation(); if (scrl.isStopped) { scrl.isStopped = false; crsl.isPaused = false; crsl.isScrolling = true; scrl.startTime = getTime(); sc_startScroll(scrl, conf); } else { $cfs.trigger(cf_e('play', conf)); } return true; }); $cfs.bind(cf_e('prev', conf)+' '+cf_e('next', conf), function(e, obj, num, clb, que) { e.stopPropagation(); if (crsl.isStopped || $cfs.is(':hidden')) { e.stopImmediatePropagation(); return debug(conf, 'Carousel stopped or hidden: Not scrolling.'); } var minimum = (is_number(opts.items.minimum)) ? opts.items.minimum : opts.items.visible + 1; if (minimum > itms.total) { e.stopImmediatePropagation(); return debug(conf, 'Not enough items ('+itms.total+' total, '+minimum+' needed): Not scrolling.'); } var v = [obj, num, clb, que], t = ['object', 'number/string', 'function', 'boolean'], a = cf_sortParams(v, t); obj = a[0]; num = a[1]; clb = a[2]; que = a[3]; var eType = e.type.slice(conf.events.prefix.length); if (!is_object(obj)) { obj = {}; } if (is_function(clb)) { obj.onAfter = clb; } if (is_boolean(que)) { obj.queue = que; } obj = $.extend(true, {}, opts[eType], obj); if (obj.conditions && !obj.conditions.call($tt0, eType)) { e.stopImmediatePropagation(); return debug(conf, 'Callback "conditions" returned false.'); } if (!is_number(num)) { if (opts.items.filter != '*') { num = 'visible'; } else { var arr = [num, obj.items, opts[eType].items]; for (var a = 0, l = arr.length; a < l; a++) { if (is_number(arr[a]) || arr[a] == 'page' || arr[a] == 'visible') { num = arr[a]; break; } } } switch(num) { case 'page': e.stopImmediatePropagation(); return $cfs.triggerHandler(cf_e(eType+'Page', conf), [obj, clb]); break; case 'visible': if (!opts.items.visibleConf.variable && opts.items.filter == '*') { num = opts.items.visible; } break; } } if (scrl.isStopped) { $cfs.trigger(cf_e('resume', conf)); $cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]); e.stopImmediatePropagation(); return debug(conf, 'Carousel resumed scrolling.'); } if (obj.duration > 0) { if (crsl.isScrolling) { if (obj.queue) { if (obj.queue == 'last') { queu = []; } if (obj.queue != 'first' || queu.length == 0) { $cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]); } } e.stopImmediatePropagation(); return debug(conf, 'Carousel currently scrolling.'); } } tmrs.timePassed = 0; $cfs.trigger(cf_e('slide_'+eType, conf), [obj, num]); if (opts.synchronise) { var s = opts.synchronise, c = [obj, num]; for (var j = 0, l = s.length; j < l; j++) { var d = eType; if (!s[j][2]) { d = (d == 'prev') ? 'next' : 'prev'; } if (!s[j][1]) { c[0] = s[j][0].triggerHandler('_cfs_triggerEvent', ['configuration', d]); } c[1] = num + s[j][3]; s[j][0].trigger('_cfs_triggerEvent', ['slide_'+d, c]); } } return true; }); $cfs.bind(cf_e('slide_prev', conf), function(e, sO, nI) { e.stopPropagation(); var a_itm = $cfs.children(); if (!opts.circular) { if (itms.first == 0) { if (opts.infinite) { $cfs.trigger(cf_e('next', conf), itms.total-1); } return e.stopImmediatePropagation(); } } sz_resetMargin(a_itm, opts); if (!is_number(nI)) { if (opts.items.visibleConf.variable) { nI = gn_getVisibleItemsPrev(a_itm, opts, itms.total-1); } else if (opts.items.filter != '*') { var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts); nI = gn_getScrollItemsPrevFilter(a_itm, opts, itms.total-1, xI); } else { nI = opts.items.visible; } nI = cf_getAdjust(nI, opts, sO.items, $tt0); } if (!opts.circular) { if (itms.total - nI < itms.first) { nI = itms.total - itms.first; } } opts.items.visibleConf.old = opts.items.visible; if (opts.items.visibleConf.variable) { var vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0); if (opts.items.visible+nI <= vI && nI < itms.total) { nI++; vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0); } opts.items.visible = vI; } else if (opts.items.filter != '*') { var vI = gn_getVisibleItemsNextFilter(a_itm, opts, itms.total-nI); opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0); } sz_resetMargin(a_itm, opts, true); if (nI == 0) { e.stopImmediatePropagation(); return debug(conf, '0 items to scroll: Not scrolling.'); } debug(conf, 'Scrolling '+nI+' items backward.'); itms.first += nI; while (itms.first >= itms.total) { itms.first -= itms.total; } if (!opts.circular) { if (itms.first == 0 && sO.onEnd) { sO.onEnd.call($tt0, 'prev'); } if (!opts.infinite) { nv_enableNavi(opts, itms.first, conf); } } $cfs.children().slice(itms.total-nI, itms.total).prependTo($cfs); if (itms.total < opts.items.visible + nI) { $cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs); } var a_itm = $cfs.children(), i_old = gi_getOldItemsPrev(a_itm, opts, nI), i_new = gi_getNewItemsPrev(a_itm, opts), i_cur_l = a_itm.eq(nI-1), i_old_l = i_old.last(), i_new_l = i_new.last(); sz_resetMargin(a_itm, opts); var pL = 0, pR = 0; if (opts.align) { var p = cf_getAlignPadding(i_new, opts); pL = p[0]; pR = p[1]; } var oL = (pL < 0) ? opts.padding[opts.d[3]] : 0; var hiddenitems = false, i_skp = $(); if (opts.items.visible < nI) { i_skp = a_itm.slice(opts.items.visibleConf.old, nI); if (sO.fx == 'directscroll') { var orgW = opts.items[opts.d['width']]; hiddenitems = i_skp; i_cur_l = i_new_l; sc_hideHiddenItems(hiddenitems); opts.items[opts.d['width']] = 'variable'; } } var $cf2 = false, i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'), w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding), i_siz_vis = 0, a_cfs = {}, a_wsz = {}, a_cur = {}, a_old = {}, a_new = {}, a_lef = {}, a_lef_vis = {}, a_dur = sc_getDuration(sO, opts, nI, i_siz); switch(sO.fx) { case 'cover': case 'cover-fade': i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visible), opts, 'width'); break; } if (hiddenitems) { opts.items[opts.d['width']] = orgW; } sz_resetMargin(a_itm, opts, true); if (pR >= 0) { sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]); } if (pL >= 0) { sz_resetMargin(i_cur_l, opts, opts.padding[opts.d[3]]); } if (opts.align) { opts.padding[opts.d[1]] = pR; opts.padding[opts.d[3]] = pL; } a_lef[opts.d['left']] = -(i_siz - oL); a_lef_vis[opts.d['left']] = -(i_siz_vis - oL); a_wsz[opts.d['left']] = w_siz[opts.d['width']]; var _s_wrapper = function() {}, _a_wrapper = function() {}, _s_paddingold = function() {}, _a_paddingold = function() {}, _s_paddingnew = function() {}, _a_paddingnew = function() {}, _s_paddingcur = function() {}, _a_paddingcur = function() {}, _onafter = function() {}, _moveitems = function() {}, _position = function() {}; switch(sO.fx) { case 'crossfade': case 'cover': case 'cover-fade': case 'uncover': case 'uncover-fade': $cf2 = $cfs.clone(true).appendTo($wrp); break; } switch(sO.fx) { case 'crossfade': case 'uncover': case 'uncover-fade': $cf2.children().slice(0, nI).remove(); $cf2.children().slice(opts.items.visibleConf.old).remove(); break; case 'cover': case 'cover-fade': $cf2.children().slice(opts.items.visible).remove(); $cf2.css(a_lef_vis); break; } $cfs.css(a_lef); scrl = sc_setScroll(a_dur, sO.easing, conf); a_cfs[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0; if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable') { _s_wrapper = function() { $wrp.css(w_siz); }; _a_wrapper = function() { scrl.anims.push([$wrp, w_siz]); }; } if (opts.usePadding) { if (i_new_l.not(i_cur_l).length) { a_cur[opts.d['marginRight']] = i_cur_l.data('_cfs_origCssMargin'); if (pL < 0) { i_cur_l.css(a_cur); } else { _s_paddingcur = function() { i_cur_l.css(a_cur); }; _a_paddingcur = function() { scrl.anims.push([i_cur_l, a_cur]); }; } } switch(sO.fx) { case 'cover': case 'cover-fade': $cf2.children().eq(nI-1).css(a_cur); break; } if (i_new_l.not(i_old_l).length) { a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin'); _s_paddingold = function() { i_old_l.css(a_old); }; _a_paddingold = function() { scrl.anims.push([i_old_l, a_old]); }; } if (pR >= 0) { a_new[opts.d['marginRight']] = i_new_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]]; _s_paddingnew = function() { i_new_l.css(a_new); }; _a_paddingnew = function() { scrl.anims.push([i_new_l, a_new]); }; } } _position = function() { $cfs.css(a_cfs); }; var overFill = opts.items.visible+nI-itms.total; _moveitems = function() { if (overFill > 0) { $cfs.children().slice(itms.total).remove(); i_old = $( $cfs.children().slice(itms.total-(opts.items.visible-overFill)).get().concat( $cfs.children().slice(0, overFill).get() ) ); } sc_showHiddenItems(hiddenitems); if (opts.usePadding) { var l_itm = $cfs.children().eq(opts.items.visible+nI-1); l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin')); } }; var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'prev', a_dur, w_siz); _onafter = function() { sc_afterScroll($cfs, $cf2, sO); crsl.isScrolling = false; clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk); queu = sc_fireQueue($cfs, queu, conf); if (!crsl.isPaused) { $cfs.trigger(cf_e('play', conf)); } }; crsl.isScrolling = true; tmrs = sc_clearTimers(tmrs); clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk); switch(sO.fx) { case 'none': $cfs.css(a_cfs); _s_wrapper(); _s_paddingold(); _s_paddingnew(); _s_paddingcur(); _position(); _moveitems(); _onafter(); break; case 'fade': scrl.anims.push([$cfs, { 'opacity': 0 }, function() { _s_wrapper(); _s_paddingold(); _s_paddingnew(); _s_paddingcur(); _position(); _moveitems(); scrl = sc_setScroll(a_dur, sO.easing, conf); scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]); sc_startScroll(scrl, conf); }]); break; case 'crossfade': $cfs.css({ 'opacity': 0 }); scrl.anims.push([$cf2, { 'opacity': 0 }]); scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]); _a_wrapper(); _s_paddingold(); _s_paddingnew(); _s_paddingcur(); _position(); _moveitems(); break; case 'cover': scrl.anims.push([$cf2, a_cfs, function() { _s_paddingold(); _s_paddingnew(); _s_paddingcur(); _position(); _moveitems(); _onafter(); }]); _a_wrapper(); break; case 'cover-fade': scrl.anims.push([$cfs, { 'opacity': 0 }]); scrl.anims.push([$cf2, a_cfs, function() { _s_paddingold(); _s_paddingnew(); _s_paddingcur(); _position(); _moveitems(); _onafter(); }]); _a_wrapper(); break; case 'uncover': scrl.anims.push([$cf2, a_wsz, _onafter]); _a_wrapper(); _s_paddingold(); _s_paddingnew(); _s_paddingcur(); _position(); _moveitems(); break; case 'uncover-fade': $cfs.css({ 'opacity': 0 }); scrl.anims.push([$cfs, { 'opacity': 1 }]); scrl.anims.push([$cf2, a_wsz, _onafter]); _a_wrapper(); _s_paddingold(); _s_paddingnew(); _s_paddingcur(); _position(); _moveitems(); break; default: scrl.anims.push([$cfs, a_cfs, function() { _moveitems(); _onafter(); }]); _a_wrapper(); _a_paddingold(); _a_paddingnew(); _a_paddingcur(); break; } sc_startScroll(scrl, conf); cf_setCookie(opts.cookie, $cfs, conf); $cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]); return true; }); $cfs.bind(cf_e('slide_next', conf), function(e, sO, nI) { e.stopPropagation(); var a_itm = $cfs.children(); if (!opts.circular) { if (itms.first == opts.items.visible) { if (opts.infinite) { $cfs.trigger(cf_e('prev', conf), itms.total-1); } return e.stopImmediatePropagation(); } } sz_resetMargin(a_itm, opts); if (!is_number(nI)) { if (opts.items.filter != '*') { var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts); nI = gn_getScrollItemsNextFilter(a_itm, opts, 0, xI); } else { nI = opts.items.visible; } nI = cf_getAdjust(nI, opts, sO.items, $tt0); } var lastItemNr = (itms.first == 0) ? itms.total : itms.first; if (!opts.circular) { if (opts.items.visibleConf.variable) { var vI = gn_getVisibleItemsNext(a_itm, opts, nI), xI = gn_getVisibleItemsPrev(a_itm, opts, lastItemNr-1); } else { var vI = opts.items.visible, xI = opts.items.visible; } if (nI + vI > lastItemNr) { nI = lastItemNr - xI; } } opts.items.visibleConf.old = opts.items.visible; if (opts.items.visibleConf.variable) { var vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0); while (opts.items.visible-nI >= vI && nI < itms.total) { nI++; vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0); } opts.items.visible = vI; } else if (opts.items.filter != '*') { var vI = gn_getVisibleItemsNextFilter(a_itm, opts, nI); opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0); } sz_resetMargin(a_itm, opts, true); if (nI == 0) { e.stopImmediatePropagation(); return debug(conf, '0 items to scroll: Not scrolling.'); } debug(conf, 'Scrolling '+nI+' items forward.'); itms.first -= nI; while (itms.first < 0) { itms.first += itms.total; } if (!opts.circular) { if (itms.first == opts.items.visible && sO.onEnd) { sO.onEnd.call($tt0, 'next'); } if (!opts.infinite) { nv_enableNavi(opts, itms.first, conf); } } if (itms.total < opts.items.visible+nI) { $cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs); } var a_itm = $cfs.children(), i_old = gi_getOldItemsNext(a_itm, opts), i_new = gi_getNewItemsNext(a_itm, opts, nI), i_cur_l = a_itm.eq(nI-1), i_old_l = i_old.last(), i_new_l = i_new.last(); sz_resetMargin(a_itm, opts); var pL = 0, pR = 0; if (opts.align) { var p = cf_getAlignPadding(i_new, opts); pL = p[0]; pR = p[1]; } var hiddenitems = false, i_skp = $(); if (opts.items.visibleConf.old < nI) { i_skp = a_itm.slice(opts.items.visibleConf.old, nI); if (sO.fx == 'directscroll') { var orgW = opts.items[opts.d['width']]; hiddenitems = i_skp; i_cur_l = i_old_l; sc_hideHiddenItems(hiddenitems); opts.items[opts.d['width']] = 'variable'; } } var $cf2 = false, i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'), w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding), i_siz_vis = 0, a_cfs = {}, a_cfs_vis = {}, a_cur = {}, a_old = {}, a_lef = {}, a_dur = sc_getDuration(sO, opts, nI, i_siz); switch(sO.fx) { case 'uncover': case 'uncover-fade': i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visibleConf.old), opts, 'width'); break; } if (hiddenitems) { opts.items[opts.d['width']] = orgW; } if (opts.align) { if (opts.padding[opts.d[1]] < 0) { opts.padding[opts.d[1]] = 0; } } sz_resetMargin(a_itm, opts, true); sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]); if (opts.align) { opts.padding[opts.d[1]] = pR; opts.padding[opts.d[3]] = pL; } a_lef[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0; var _s_wrapper = function() {}, _a_wrapper = function() {}, _s_paddingold = function() {}, _a_paddingold = function() {}, _s_paddingcur = function() {}, _a_paddingcur = function() {}, _onafter = function() {}, _moveitems = function() {}, _position = function() {}; switch(sO.fx) { case 'crossfade': case 'cover': case 'cover-fade': case 'uncover': case 'uncover-fade': $cf2 = $cfs.clone(true).appendTo($wrp); $cf2.children().slice(opts.items.visibleConf.old).remove(); break; } switch(sO.fx) { case 'crossfade': case 'cover': case 'cover-fade': $cfs.css('zIndex', 1); $cf2.css('zIndex', 0); break; } scrl = sc_setScroll(a_dur, sO.easing, conf); a_cfs[opts.d['left']] = -i_siz; a_cfs_vis[opts.d['left']] = -i_siz_vis; if (pL < 0) { a_cfs[opts.d['left']] += pL; } if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable') { _s_wrapper = function() { $wrp.css(w_siz); }; _a_wrapper = function() { scrl.anims.push([$wrp, w_siz]); }; } if (opts.usePadding) { var i_new_l_m = i_new_l.data('_cfs_origCssMargin'); if (pR >= 0) { i_new_l_m += opts.padding[opts.d[1]]; } i_new_l.css(opts.d['marginRight'], i_new_l_m); if (i_cur_l.not(i_old_l).length) { a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin'); } _s_paddingold = function() { i_old_l.css(a_old); }; _a_paddingold = function() { scrl.anims.push([i_old_l, a_old]); }; var i_cur_l_m = i_cur_l.data('_cfs_origCssMargin'); if (pL > 0) { i_cur_l_m += opts.padding[opts.d[3]]; } a_cur[opts.d['marginRight']] = i_cur_l_m; _s_paddingcur = function() { i_cur_l.css(a_cur); }; _a_paddingcur = function() { scrl.anims.push([i_cur_l, a_cur]); }; } _position = function() { $cfs.css(a_lef); }; var overFill = opts.items.visible+nI-itms.total; _moveitems = function() { if (overFill > 0) { $cfs.children().slice(itms.total).remove(); } var l_itm = $cfs.children().slice(0, nI).appendTo($cfs).last(); if (overFill > 0) { i_new = gi_getCurrentItems(a_itm, opts); } sc_showHiddenItems(hiddenitems); if (opts.usePadding) { if (itms.total < opts.items.visible+nI) { var i_cur_l = $cfs.children().eq(opts.items.visible-1); i_cur_l.css(opts.d['marginRight'], i_cur_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]]); } l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin')); } }; var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'next', a_dur, w_siz); _onafter = function() { $cfs.css('zIndex', $cfs.data('_cfs_origCssZindex')); sc_afterScroll($cfs, $cf2, sO); crsl.isScrolling = false; clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk); queu = sc_fireQueue($cfs, queu, conf); if (!crsl.isPaused) { $cfs.trigger(cf_e('play', conf)); } }; crsl.isScrolling = true; tmrs = sc_clearTimers(tmrs); clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk); switch(sO.fx) { case 'none': $cfs.css(a_cfs); _s_wrapper(); _s_paddingold(); _s_paddingcur(); _position(); _moveitems(); _onafter(); break; case 'fade': scrl.anims.push([$cfs, { 'opacity': 0 }, function() { _s_wrapper(); _s_paddingold(); _s_paddingcur(); _position(); _moveitems(); scrl = sc_setScroll(a_dur, sO.easing, conf); scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]); sc_startScroll(scrl, conf); }]); break; case 'crossfade': $cfs.css({ 'opacity': 0 }); scrl.anims.push([$cf2, { 'opacity': 0 }]); scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]); _a_wrapper(); _s_paddingold(); _s_paddingcur(); _position(); _moveitems(); break; case 'cover': $cfs.css(opts.d['left'], $wrp[opts.d['width']]()); scrl.anims.push([$cfs, a_lef, _onafter]); _a_wrapper(); _s_paddingold(); _s_paddingcur(); _moveitems(); break; case 'cover-fade': $cfs.css(opts.d['left'], $wrp[opts.d['width']]()); scrl.anims.push([$cf2, { 'opacity': 0 }]); scrl.anims.push([$cfs, a_lef, _onafter]); _a_wrapper(); _s_paddingold(); _s_paddingcur(); _moveitems(); break; case 'uncover': scrl.anims.push([$cf2, a_cfs_vis, _onafter]); _a_wrapper(); _s_paddingold(); _s_paddingcur(); _position(); _moveitems(); break; case 'uncover-fade': $cfs.css({ 'opacity': 0 }); scrl.anims.push([$cfs, { 'opacity': 1 }]); scrl.anims.push([$cf2, a_cfs_vis, _onafter]); _a_wrapper(); _s_paddingold(); _s_paddingcur(); _position(); _moveitems(); break; default: scrl.anims.push([$cfs, a_cfs, function() { _position(); _moveitems(); _onafter(); }]); _a_wrapper(); _a_paddingold(); _a_paddingcur(); break; } sc_startScroll(scrl, conf); cf_setCookie(opts.cookie, $cfs, conf); $cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]); return true; }); $cfs.bind(cf_e('slideTo', conf), function(e, num, dev, org, obj, dir, clb) { e.stopPropagation(); var v = [num, dev, org, obj, dir, clb], t = ['string/number/object', 'number', 'boolean', 'object', 'string', 'function'], a = cf_sortParams(v, t); obj = a[3]; dir = a[4]; clb = a[5]; num = gn_getItemIndex(a[0], a[1], a[2], itms, $cfs); if (num == 0) { return false; } if (!is_object(obj)) { obj = false; } if (dir != 'prev' && dir != 'next') { if (opts.circular) { dir = (num <= itms.total / 2) ? 'next' : 'prev'; } else { dir = (itms.first == 0 || itms.first > num) ? 'next' : 'prev'; } } if (dir == 'prev') { num = itms.total-num; } $cfs.trigger(cf_e(dir, conf), [obj, num, clb]); return true; }); $cfs.bind(cf_e('prevPage', conf), function(e, obj, clb) { e.stopPropagation(); var cur = $cfs.triggerHandler(cf_e('currentPage', conf)); return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur-1, obj, 'prev', clb]); }); $cfs.bind(cf_e('nextPage', conf), function(e, obj, clb) { e.stopPropagation(); var cur = $cfs.triggerHandler(cf_e('currentPage', conf)); return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur+1, obj, 'next', clb]); }); $cfs.bind(cf_e('slideToPage', conf), function(e, pag, obj, dir, clb) { e.stopPropagation(); if (!is_number(pag)) { pag = $cfs.triggerHandler(cf_e('currentPage', conf)); } var ipp = opts.pagination.items || opts.items.visible, max = Math.ceil(itms.total / ipp)-1; if (pag < 0) { pag = max; } if (pag > max) { pag = 0; } return $cfs.triggerHandler(cf_e('slideTo', conf), [pag*ipp, 0, true, obj, dir, clb]); }); $cfs.bind(cf_e('jumpToStart', conf), function(e, s) { e.stopPropagation(); if (s) { s = gn_getItemIndex(s, 0, true, itms, $cfs); } else { s = 0; } s += itms.first; if (s != 0) { if (itms.total > 0) { while (s > itms.total) { s -= itms.total; } } $cfs.prepend($cfs.children().slice(s, itms.total)); } return true; }); $cfs.bind(cf_e('synchronise', conf), function(e, s) { e.stopPropagation(); if (s) { s = cf_getSynchArr(s); } else if (opts.synchronise) { s = opts.synchronise; } else { return debug(conf, 'No carousel to synchronise.'); } var n = $cfs.triggerHandler(cf_e('currentPosition', conf)), x = true; for (var j = 0, l = s.length; j < l; j++) { if (!s[j][0].triggerHandler(cf_e('slideTo', conf), [n, s[j][3], true])) { x = false; } } return x; }); $cfs.bind(cf_e('queue', conf), function(e, dir, opt) { e.stopPropagation(); if (is_function(dir)) { dir.call($tt0, queu); } else if (is_array(dir)) { queu = dir; } else if (!is_undefined(dir)) { queu.push([dir, opt]); } return queu; }); $cfs.bind(cf_e('insertItem', conf), function(e, itm, num, org, dev) { e.stopPropagation(); var v = [itm, num, org, dev], t = ['string/object', 'string/number/object', 'boolean', 'number'], a = cf_sortParams(v, t); itm = a[0]; num = a[1]; org = a[2]; dev = a[3]; if (is_object(itm) && !is_jquery(itm)) { itm = $(itm); } else if (is_string(itm)) { itm = $(itm); } if (!is_jquery(itm) || itm.length == 0) { return debug(conf, 'Not a valid object.'); } if (is_undefined(num)) { num = 'end'; } sz_storeMargin(itm, opts); sz_storeOrigCss(itm); var orgNum = num, before = 'before'; if (num == 'end') { if (org) { if (itms.first == 0) { num = itms.total-1; before = 'after'; } else { num = itms.first; itms.first += itm.length; } if (num < 0) { num = 0; } } else { num = itms.total-1; before = 'after'; } } else { num = gn_getItemIndex(num, dev, org, itms, $cfs); } var $cit = $cfs.children().eq(num); if ($cit.length) { $cit[before](itm); } else { debug(conf, 'Correct insert-position not found! Appending item to the end.'); $cfs.append(itm); } if (orgNum != 'end' && !org) { if (num < itms.first) { itms.first += itm.length; } } itms.total = $cfs.children().length; if (itms.first >= itms.total) { itms.first -= itms.total; } $cfs.trigger(cf_e('updateSizes', conf)); $cfs.trigger(cf_e('linkAnchors', conf)); return true; }); $cfs.bind(cf_e('removeItem', conf), function(e, num, org, dev) { e.stopPropagation(); var v = [num, org, dev], t = ['string/number/object', 'boolean', 'number'], a = cf_sortParams(v, t); num = a[0]; org = a[1]; dev = a[2]; var removed = false; if (num instanceof $ && num.length > 1) { $removed = $(); num.each(function(i, el) { var $rem = $cfs.trigger(cf_e('removeItem', conf), [$(this), org, dev]); if ( $rem ) { $removed = $removed.add($rem); } }); return $removed; } if (is_undefined(num) || num == 'end') { $removed = $cfs.children().last(); } else { num = gn_getItemIndex(num, dev, org, itms, $cfs); var $removed = $cfs.children().eq(num); if ( $removed.length ) { if (num < itms.first) { itms.first -= $removed.length; } } } if ( $removed && $removed.length ) { $removed.detach(); itms.total = $cfs.children().length; $cfs.trigger(cf_e('updateSizes', conf)); } return $removed; }); $cfs.bind(cf_e('onBefore', conf)+' '+cf_e('onAfter', conf), function(e, fn) { e.stopPropagation(); var eType = e.type.slice(conf.events.prefix.length); if (is_array(fn)) { clbk[eType] = fn; } if (is_function(fn)) { clbk[eType].push(fn); } return clbk[eType]; }); $cfs.bind(cf_e('currentPosition', conf), function(e, fn) { e.stopPropagation(); if (itms.first == 0) { var val = 0; } else { var val = itms.total - itms.first; } if (is_function(fn)) { fn.call($tt0, val); } return val; }); $cfs.bind(cf_e('currentPage', conf), function(e, fn) { e.stopPropagation(); var ipp = opts.pagination.items || opts.items.visible, max = Math.ceil(itms.total/ipp-1), nr; if (itms.first == 0) { nr = 0; } else if (itms.first < itms.total % ipp) { nr = 0; } else if (itms.first == ipp && !opts.circular) { nr = max; } else { nr = Math.round((itms.total-itms.first)/ipp); } if (nr < 0) { nr = 0; } if (nr > max) { nr = max; } if (is_function(fn)) { fn.call($tt0, nr); } return nr; }); $cfs.bind(cf_e('currentVisible', conf), function(e, fn) { e.stopPropagation(); var $i = gi_getCurrentItems($cfs.children(), opts); if (is_function(fn)) { fn.call($tt0, $i); } return $i; }); $cfs.bind(cf_e('slice', conf), function(e, f, l, fn) { e.stopPropagation(); if (itms.total == 0) { return false; } var v = [f, l, fn], t = ['number', 'number', 'function'], a = cf_sortParams(v, t); f = (is_number(a[0])) ? a[0] : 0; l = (is_number(a[1])) ? a[1] : itms.total; fn = a[2]; f += itms.first; l += itms.first; if (items.total > 0) { while (f > itms.total) { f -= itms.total; } while (l > itms.total) { l -= itms.total; } while (f < 0) { f += itms.total; } while (l < 0) { l += itms.total; } } var $iA = $cfs.children(), $i; if (l > f) { $i = $iA.slice(f, l); } else { $i = $( $iA.slice(f, itms.total).get().concat( $iA.slice(0, l).get() ) ); } if (is_function(fn)) { fn.call($tt0, $i); } return $i; }); $cfs.bind(cf_e('isPaused', conf)+' '+cf_e('isStopped', conf)+' '+cf_e('isScrolling', conf), function(e, fn) { e.stopPropagation(); var eType = e.type.slice(conf.events.prefix.length), value = crsl[eType]; if (is_function(fn)) { fn.call($tt0, value); } return value; }); $cfs.bind(cf_e('configuration', conf), function(e, a, b, c) { e.stopPropagation(); var reInit = false; if (is_function(a)) { a.call($tt0, opts); } else if (is_object(a)) { opts_orig = $.extend(true, {}, opts_orig, a); if (b !== false) reInit = true; else opts = $.extend(true, {}, opts, a); } else if (!is_undefined(a)) { if (is_function(b)) { var val = eval('opts.'+a); if (is_undefined(val)) { val = ''; } b.call($tt0, val); } else if (!is_undefined(b)) { if (typeof c !== 'boolean') c = true; eval('opts_orig.'+a+' = b'); if (c !== false) reInit = true; else eval('opts.'+a+' = b'); } else { return eval('opts.'+a); } } if (reInit) { sz_resetMargin($cfs.children(), opts); FN._init(opts_orig); FN._bind_buttons(); var sz = sz_setSizes($cfs, opts); $cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]); } return opts; }); $cfs.bind(cf_e('linkAnchors', conf), function(e, $con, sel) { e.stopPropagation(); if (is_undefined($con)) { $con = $('body'); } else if (is_string($con)) { $con = $($con); } if (!is_jquery($con) || $con.length == 0) { return debug(conf, 'Not a valid object.'); } if (!is_string(sel)) { sel = 'a.caroufredsel'; } $con.find(sel).each(function() { var h = this.hash || ''; if (h.length > 0 && $cfs.children().index($(h)) != -1) { $(this).unbind('click').click(function(e) { e.preventDefault(); $cfs.trigger(cf_e('slideTo', conf), h); }); } }); return true; }); $cfs.bind(cf_e('updatePageStatus', conf), function(e, build, sizes) { e.stopPropagation(); if (!opts.pagination.container) { return; } var ipp = opts.pagination.items || opts.items.visible, pgs = Math.ceil(itms.total/ipp); if (build) { if (opts.pagination.anchorBuilder) { opts.pagination.container.children().remove(); opts.pagination.container.each(function() { for (var a = 0; a < pgs; a++) { var i = $cfs.children().eq( gn_getItemIndex(a*ipp, 0, true, itms, $cfs) ); $(this).append(opts.pagination.anchorBuilder.call(i[0], a+1)); } }); } opts.pagination.container.each(function() { $(this).children().unbind(opts.pagination.event).each(function(a) { $(this).bind(opts.pagination.event, function(e) { e.preventDefault(); $cfs.trigger(cf_e('slideTo', conf), [a*ipp, -opts.pagination.deviation, true, opts.pagination]); }); }); }); } var selected = $cfs.triggerHandler(cf_e('currentPage', conf)) + opts.pagination.deviation; if (selected >= pgs) { selected = 0; } if (selected < 0) { selected = pgs-1; } opts.pagination.container.each(function() { $(this).children().removeClass(cf_c('selected', conf)).eq(selected).addClass(cf_c('selected', conf)); }); return true; }); $cfs.bind(cf_e('updateSizes', conf), function(e) { var vI = opts.items.visible, a_itm = $cfs.children(), avail_primary = ms_getParentSize($wrp, opts, 'width'); itms.total = a_itm.length; if (crsl.primarySizePercentage) { opts.maxDimension = avail_primary; opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage); } else { opts.maxDimension = ms_getMaxDimension(opts, avail_primary); } if (opts.responsive) { opts.items.width = opts.items.sizesConf.width; opts.items.height = opts.items.sizesConf.height; opts = in_getResponsiveValues(opts, a_itm, avail_primary); vI = opts.items.visible; sz_setResponsiveSizes(opts, a_itm); } else if (opts.items.visibleConf.variable) { vI = gn_getVisibleItemsNext(a_itm, opts, 0); } else if (opts.items.filter != '*') { vI = gn_getVisibleItemsNextFilter(a_itm, opts, 0); } if (!opts.circular && itms.first != 0 && vI > itms.first) { if (opts.items.visibleConf.variable) { var nI = gn_getVisibleItemsPrev(a_itm, opts, itms.first) - itms.first; } else if (opts.items.filter != '*') { var nI = gn_getVisibleItemsPrevFilter(a_itm, opts, itms.first) - itms.first; } else { var nI = opts.items.visible - itms.first; } debug(conf, 'Preventing non-circular: sliding '+nI+' items backward.'); $cfs.trigger(cf_e('prev', conf), nI); } opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0); opts.items.visibleConf.old = opts.items.visible; opts = in_getAlignPadding(opts, a_itm); var sz = sz_setSizes($cfs, opts); $cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]); nv_showNavi(opts, itms.total, conf); nv_enableNavi(opts, itms.first, conf); return sz; }); $cfs.bind(cf_e('destroy', conf), function(e, orgOrder) { e.stopPropagation(); tmrs = sc_clearTimers(tmrs); $cfs.data('_cfs_isCarousel', false); $cfs.trigger(cf_e('finish', conf)); if (orgOrder) { $cfs.trigger(cf_e('jumpToStart', conf)); } sz_restoreOrigCss($cfs.children()); sz_restoreOrigCss($cfs); FN._unbind_events(); FN._unbind_buttons(); if (conf.wrapper == 'parent') { sz_restoreOrigCss($wrp); } else { $wrp.replaceWith($cfs); } return true; }); $cfs.bind(cf_e('debug', conf), function(e) { debug(conf, 'Carousel width: ' + opts.width); debug(conf, 'Carousel height: ' + opts.height); debug(conf, 'Item widths: ' + opts.items.width); debug(conf, 'Item heights: ' + opts.items.height); debug(conf, 'Number of items visible: ' + opts.items.visible); if (opts.auto.play) { debug(conf, 'Number of items scrolled automatically: ' + opts.auto.items); } if (opts.prev.button) { debug(conf, 'Number of items scrolled backward: ' + opts.prev.items); } if (opts.next.button) { debug(conf, 'Number of items scrolled forward: ' + opts.next.items); } return conf.debug; }); $cfs.bind('_cfs_triggerEvent', function(e, n, o) { e.stopPropagation(); return $cfs.triggerHandler(cf_e(n, conf), o); }); }; // /bind_events FN._unbind_events = function() { $cfs.unbind(cf_e('', conf)); $cfs.unbind(cf_e('', conf, false)); $cfs.unbind('_cfs_triggerEvent'); }; // /unbind_events FN._bind_buttons = function() { FN._unbind_buttons(); nv_showNavi(opts, itms.total, conf); nv_enableNavi(opts, itms.first, conf); if (opts.auto.pauseOnHover) { var pC = bt_pauseOnHoverConfig(opts.auto.pauseOnHover); $wrp.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); }) .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); }); } if (opts.auto.button) { opts.auto.button.bind(cf_e(opts.auto.event, conf, false), function(e) { e.preventDefault(); var ev = false, pC = null; if (crsl.isPaused) { ev = 'play'; } else if (opts.auto.pauseOnEvent) { ev = 'pause'; pC = bt_pauseOnHoverConfig(opts.auto.pauseOnEvent); } if (ev) { $cfs.trigger(cf_e(ev, conf), pC); } }); } if (opts.prev.button) { opts.prev.button.bind(cf_e(opts.prev.event, conf, false), function(e) { e.preventDefault(); $cfs.trigger(cf_e('prev', conf)); }); if (opts.prev.pauseOnHover) { var pC = bt_pauseOnHoverConfig(opts.prev.pauseOnHover); opts.prev.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); }) .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); }); } } if (opts.next.button) { opts.next.button.bind(cf_e(opts.next.event, conf, false), function(e) { e.preventDefault(); $cfs.trigger(cf_e('next', conf)); }); if (opts.next.pauseOnHover) { var pC = bt_pauseOnHoverConfig(opts.next.pauseOnHover); opts.next.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); }) .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); }); } } if (opts.pagination.container) { if (opts.pagination.pauseOnHover) { var pC = bt_pauseOnHoverConfig(opts.pagination.pauseOnHover); opts.pagination.container.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); }) .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); }); } } if (opts.prev.key || opts.next.key) { $(document).bind(cf_e('keyup', conf, false, true, true), function(e) { var k = e.keyCode; if (k == opts.next.key) { e.preventDefault(); $cfs.trigger(cf_e('next', conf)); } if (k == opts.prev.key) { e.preventDefault(); $cfs.trigger(cf_e('prev', conf)); } }); } if (opts.pagination.keys) { $(document).bind(cf_e('keyup', conf, false, true, true), function(e) { var k = e.keyCode; if (k >= 49 && k < 58) { k = (k-49) * opts.items.visible; if (k <= itms.total) { e.preventDefault(); $cfs.trigger(cf_e('slideTo', conf), [k, 0, true, opts.pagination]); } } }); } if ($.fn.swipe) { var isTouch = 'ontouchstart' in window; if ((isTouch && opts.swipe.onTouch) || (!isTouch && opts.swipe.onMouse)) { var scP = $.extend(true, {}, opts.prev, opts.swipe), scN = $.extend(true, {}, opts.next, opts.swipe), swP = function() { $cfs.trigger(cf_e('prev', conf), [scP]) }, swN = function() { $cfs.trigger(cf_e('next', conf), [scN]) }; switch (opts.direction) { case 'up': case 'down': opts.swipe.options.swipeUp = swN; opts.swipe.options.swipeDown = swP; break; default: opts.swipe.options.swipeLeft = swN; opts.swipe.options.swipeRight = swP; } if (crsl.swipe) { $cfs.swipe('destroy'); } $wrp.swipe(opts.swipe.options); $wrp.css('cursor', 'move'); crsl.swipe = true; } } if ($.fn.mousewheel) { if (opts.mousewheel) { var mcP = $.extend(true, {}, opts.prev, opts.mousewheel), mcN = $.extend(true, {}, opts.next, opts.mousewheel); if (crsl.mousewheel) { $wrp.unbind(cf_e('mousewheel', conf, false)); } $wrp.bind(cf_e('mousewheel', conf, false), function(e, delta) { e.preventDefault(); if (delta > 0) { $cfs.trigger(cf_e('prev', conf), [mcP]); } else { $cfs.trigger(cf_e('next', conf), [mcN]); } }); crsl.mousewheel = true; } } if (opts.auto.play) { $cfs.trigger(cf_e('play', conf), opts.auto.delay); } if (crsl.upDateOnWindowResize) { var resizeFn = function(e) { $cfs.trigger(cf_e('finish', conf)); if (opts.auto.pauseOnResize && !crsl.isPaused) { $cfs.trigger(cf_e('play', conf)); } sz_resetMargin($cfs.children(), opts); $cfs.trigger(cf_e('updateSizes', conf)); }; var $w = $(window), onResize = null; if ($.debounce && conf.onWindowResize == 'debounce') { onResize = $.debounce(200, resizeFn); } else if ($.throttle && conf.onWindowResize == 'throttle') { onResize = $.throttle(300, resizeFn); } else { var _windowWidth = 0, _windowHeight = 0; onResize = function() { var nw = $w.width(), nh = $w.height(); if (nw != _windowWidth || nh != _windowHeight) { resizeFn(); _windowWidth = nw; _windowHeight = nh; } }; } $w.unbind('resize.carou'); $w.bind(cf_e('resize.carou', conf, false, true, true), onResize); } }; // /bind_buttons FN._unbind_buttons = function() { var ns1 = cf_e('', conf), ns2 = cf_e('', conf, false); ns3 = cf_e('', conf, false, true, true); $(document).unbind(ns3); $(window).unbind(ns3); $wrp.unbind(ns2); if (opts.auto.button) { opts.auto.button.unbind(ns2); } if (opts.prev.button) { opts.prev.button.unbind(ns2); } if (opts.next.button) { opts.next.button.unbind(ns2); } if (opts.pagination.container) { opts.pagination.container.unbind(ns2); if (opts.pagination.anchorBuilder) { opts.pagination.container.children().remove(); } } if (crsl.swipe) { $cfs.swipe('destroy'); $wrp.css('cursor', 'default'); crsl.swipe = false; } if (crsl.mousewheel) { crsl.mousewheel = false; } nv_showNavi(opts, 'hide', conf); nv_enableNavi(opts, 'removeClass', conf); }; // /unbind_buttons if (is_boolean(configs)) { configs = { 'debug': configs }; } var crsl = { 'direction' : 'next', 'isPaused' : true, 'isScrolling' : false, 'isStopped' : false, 'mousewheel' : false, 'swipe' : false }, itms = { 'total' : $cfs.children().length, 'first' : 0 }, tmrs = { 'auto' : null, 'progress' : null, 'startTime' : getTime(), 'timePassed' : 0 }, scrl = { 'isStopped' : false, 'duration' : 0, 'startTime' : 0, 'easing' : '', 'anims' : [] }, clbk = { 'onBefore' : [], 'onAfter' : [] }, queu = [], conf = $.extend(true, {}, $.fn.carouFredSel.configs, configs), opts = {}, opts_orig = $.extend(true, {}, options), $wrp = (conf.wrapper == 'parent') ? $cfs.parent() : $cfs.wrap('<'+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent(); conf.selector = $cfs.selector; conf.serialNumber = $.fn.carouFredSel.serialNumber++; conf.transition = (conf.transition && $.fn.transition) ? 'transition' : 'animate'; FN._init(opts_orig, true, starting_position); FN._build(); FN._bind_events(); FN._bind_buttons(); if (is_array(opts.items.start)) { var start_arr = opts.items.start; } else { var start_arr = []; if (opts.items.start != 0) { start_arr.push(opts.items.start); } } if (opts.cookie) { start_arr.unshift(parseInt(cf_getCookie(opts.cookie), 10)); } if (start_arr.length > 0) { for (var a = 0, l = start_arr.length; a < l; a++) { var s = start_arr[a]; if (s == 0) { continue; } if (s === true) { s = window.location.hash; if (s.length < 1) { continue; } } else if (s === 'random') { s = Math.floor(Math.random()*itms.total); } if ($cfs.triggerHandler(cf_e('slideTo', conf), [s, 0, true, { fx: 'none' }])) { break; } } } var siz = sz_setSizes($cfs, opts), itm = gi_getCurrentItems($cfs.children(), opts); if (opts.onCreate) { opts.onCreate.call($tt0, { 'width': siz.width, 'height': siz.height, 'items': itm }); } $cfs.trigger(cf_e('updatePageStatus', conf), [true, siz]); $cfs.trigger(cf_e('linkAnchors', conf)); if (conf.debug) { $cfs.trigger(cf_e('debug', conf)); } return $cfs; }; $.fn.carouFredSel.serialNumber = 1; $.fn.carouFredSel.defaults = { 'synchronise' : false, 'infinite' : true, 'circular' : true, 'responsive' : false, 'direction' : 'left', 'items' : { 'start' : 0 }, 'scroll' : { 'easing' : 'swing', 'duration' : 500, 'pauseOnHover' : false, 'event' : 'click', 'queue' : false } }; $.fn.carouFredSel.configs = { 'debug' : false, 'transition' : false, 'onWindowResize': 'throttle', 'events' : { 'prefix' : '', 'namespace' : 'cfs' }, 'wrapper' : { 'element' : 'div', 'classname' : 'caroufredsel_wrapper' }, 'classnames' : {} }; $.fn.carouFredSel.pageAnchorBuilder = function(nr) { return ''+nr+''; }; $.fn.carouFredSel.progressbarUpdater = function(perc) { $(this).css('width', perc+'%'); }; $.fn.carouFredSel.cookie = { get: function(n) { n += '='; var ca = document.cookie.split(';'); for (var a = 0, l = ca.length; a < l; a++) { var c = ca[a]; while (c.charAt(0) == ' ') { c = c.slice(1); } if (c.indexOf(n) == 0) { return c.slice(n.length); } } return 0; }, set: function(n, v, d) { var e = ""; if (d) { var date = new Date(); date.setTime(date.getTime() + (d * 24 * 60 * 60 * 1000)); e = "; expires=" + date.toGMTString(); } document.cookie = n + '=' + v + e + '; path=/'; }, remove: function(n) { $.fn.carouFredSel.cookie.set(n, "", -1); } }; function sc_setScroll(d, e, c) { if (c.transition == 'transition') { if (e == 'swing') { e = 'ease'; } } return { anims: [], duration: d, orgDuration: d, easing: e, startTime: getTime() }; } function sc_startScroll(s, c) { for (var a = 0, l = s.anims.length; a < l; a++) { var b = s.anims[a]; if (!b) { continue; } b[0][c.transition](b[1], s.duration, s.easing, b[2]); } } function sc_stopScroll(s, finish) { if (!is_boolean(finish)) { finish = true; } if (is_object(s.pre)) { sc_stopScroll(s.pre, finish); } for (var a = 0, l = s.anims.length; a < l; a++) { var b = s.anims[a]; b[0].stop(true); if (finish) { b[0].css(b[1]); if (is_function(b[2])) { b[2](); } } } if (is_object(s.post)) { sc_stopScroll(s.post, finish); } } function sc_afterScroll( $c, $c2, o ) { if ($c2) { $c2.remove(); } switch(o.fx) { case 'fade': case 'crossfade': case 'cover-fade': case 'uncover-fade': $c.css('opacity', 1); $c.css('filter', ''); break; } } function sc_fireCallbacks($t, o, b, a, c) { if (o[b]) { o[b].call($t, a); } if (c[b].length) { for (var i = 0, l = c[b].length; i < l; i++) { c[b][i].call($t, a); } } return []; } function sc_fireQueue($c, q, c) { if (q.length) { $c.trigger(cf_e(q[0][0], c), q[0][1]); q.shift(); } return q; } function sc_hideHiddenItems(hiddenitems) { hiddenitems.each(function() { var hi = $(this); hi.data('_cfs_isHidden', hi.is(':hidden')).hide(); }); } function sc_showHiddenItems(hiddenitems) { if (hiddenitems) { hiddenitems.each(function() { var hi = $(this); if (!hi.data('_cfs_isHidden')) { hi.show(); } }); } } function sc_clearTimers(t) { if (t.auto) { clearTimeout(t.auto); } if (t.progress) { clearInterval(t.progress); } return t; } function sc_mapCallbackArguments(i_old, i_skp, i_new, s_itm, s_dir, s_dur, w_siz) { return { 'width': w_siz.width, 'height': w_siz.height, 'items': { 'old': i_old, 'skipped': i_skp, 'visible': i_new }, 'scroll': { 'items': s_itm, 'direction': s_dir, 'duration': s_dur } }; } function sc_getDuration( sO, o, nI, siz ) { var dur = sO.duration; if (sO.fx == 'none') { return 0; } if (dur == 'auto') { dur = o.scroll.duration / o.scroll.items * nI; } else if (dur < 10) { dur = siz / dur; } if (dur < 1) { return 0; } if (sO.fx == 'fade') { dur = dur / 2; } return Math.round(dur); } function nv_showNavi(o, t, c) { var minimum = (is_number(o.items.minimum)) ? o.items.minimum : o.items.visible + 1; if (t == 'show' || t == 'hide') { var f = t; } else if (minimum > t) { debug(c, 'Not enough items ('+t+' total, '+minimum+' needed): Hiding navigation.'); var f = 'hide'; } else { var f = 'show'; } var s = (f == 'show') ? 'removeClass' : 'addClass', h = cf_c('hidden', c); if (o.auto.button) { o.auto.button[f]()[s](h); } if (o.prev.button) { o.prev.button[f]()[s](h); } if (o.next.button) { o.next.button[f]()[s](h); } if (o.pagination.container) { o.pagination.container[f]()[s](h); } } function nv_enableNavi(o, f, c) { if (o.circular || o.infinite) return; var fx = (f == 'removeClass' || f == 'addClass') ? f : false, di = cf_c('disabled', c); if (o.auto.button && fx) { o.auto.button[fx](di); } if (o.prev.button) { var fn = fx || (f == 0) ? 'addClass' : 'removeClass'; o.prev.button[fn](di); } if (o.next.button) { var fn = fx || (f == o.items.visible) ? 'addClass' : 'removeClass'; o.next.button[fn](di); } } function go_getObject($tt, obj) { if (is_function(obj)) { obj = obj.call($tt); } else if (is_undefined(obj)) { obj = {}; } return obj; } function go_getItemsObject($tt, obj) { obj = go_getObject($tt, obj); if (is_number(obj)) { obj = { 'visible': obj }; } else if (obj == 'variable') { obj = { 'visible': obj, 'width': obj, 'height': obj }; } else if (!is_object(obj)) { obj = {}; } return obj; } function go_getScrollObject($tt, obj) { obj = go_getObject($tt, obj); if (is_number(obj)) { if (obj <= 50) { obj = { 'items': obj }; } else { obj = { 'duration': obj }; } } else if (is_string(obj)) { obj = { 'easing': obj }; } else if (!is_object(obj)) { obj = {}; } return obj; } function go_getNaviObject($tt, obj) { obj = go_getObject($tt, obj); if (is_string(obj)) { var temp = cf_getKeyCode(obj); if (temp == -1) { obj = $(obj); } else { obj = temp; } } return obj; } function go_getAutoObject($tt, obj) { obj = go_getNaviObject($tt, obj); if (is_jquery(obj)) { obj = { 'button': obj }; } else if (is_boolean(obj)) { obj = { 'play': obj }; } else if (is_number(obj)) { obj = { 'timeoutDuration': obj }; } if (obj.progress) { if (is_string(obj.progress) || is_jquery(obj.progress)) { obj.progress = { 'bar': obj.progress }; } } return obj; } function go_complementAutoObject($tt, obj) { if (is_function(obj.button)) { obj.button = obj.button.call($tt); } if (is_string(obj.button)) { obj.button = $(obj.button); } if (!is_boolean(obj.play)) { obj.play = true; } if (!is_number(obj.delay)) { obj.delay = 0; } if (is_undefined(obj.pauseOnEvent)) { obj.pauseOnEvent = true; } if (!is_boolean(obj.pauseOnResize)) { obj.pauseOnResize = true; } if (!is_number(obj.timeoutDuration)) { obj.timeoutDuration = (obj.duration < 10) ? 2500 : obj.duration * 5; } if (obj.progress) { if (is_function(obj.progress.bar)) { obj.progress.bar = obj.progress.bar.call($tt); } if (is_string(obj.progress.bar)) { obj.progress.bar = $(obj.progress.bar); } if (obj.progress.bar) { if (!is_function(obj.progress.updater)) { obj.progress.updater = $.fn.carouFredSel.progressbarUpdater; } if (!is_number(obj.progress.interval)) { obj.progress.interval = 50; } } else { obj.progress = false; } } return obj; } function go_getPrevNextObject($tt, obj) { obj = go_getNaviObject($tt, obj); if (is_jquery(obj)) { obj = { 'button': obj }; } else if (is_number(obj)) { obj = { 'key': obj }; } return obj; } function go_complementPrevNextObject($tt, obj) { if (is_function(obj.button)) { obj.button = obj.button.call($tt); } if (is_string(obj.button)) { obj.button = $(obj.button); } if (is_string(obj.key)) { obj.key = cf_getKeyCode(obj.key); } return obj; } function go_getPaginationObject($tt, obj) { obj = go_getNaviObject($tt, obj); if (is_jquery(obj)) { obj = { 'container': obj }; } else if (is_boolean(obj)) { obj = { 'keys': obj }; } return obj; } function go_complementPaginationObject($tt, obj) { if (is_function(obj.container)) { obj.container = obj.container.call($tt); } if (is_string(obj.container)) { obj.container = $(obj.container); } if (!is_number(obj.items)) { obj.items = false; } if (!is_boolean(obj.keys)) { obj.keys = false; } if (!is_function(obj.anchorBuilder) && !is_false(obj.anchorBuilder)) { obj.anchorBuilder = $.fn.carouFredSel.pageAnchorBuilder; } if (!is_number(obj.deviation)) { obj.deviation = 0; } return obj; } function go_getSwipeObject($tt, obj) { if (is_function(obj)) { obj = obj.call($tt); } if (is_undefined(obj)) { obj = { 'onTouch': false }; } if (is_true(obj)) { obj = { 'onTouch': obj }; } else if (is_number(obj)) { obj = { 'items': obj }; } return obj; } function go_complementSwipeObject($tt, obj) { if (!is_boolean(obj.onTouch)) { obj.onTouch = true; } if (!is_boolean(obj.onMouse)) { obj.onMouse = false; } if (!is_object(obj.options)) { obj.options = {}; } if (!is_boolean(obj.options.triggerOnTouchEnd)) { obj.options.triggerOnTouchEnd = false; } return obj; } function go_getMousewheelObject($tt, obj) { if (is_function(obj)) { obj = obj.call($tt); } if (is_true(obj)) { obj = {}; } else if (is_number(obj)) { obj = { 'items': obj }; } else if (is_undefined(obj)) { obj = false; } return obj; } function go_complementMousewheelObject($tt, obj) { return obj; } function gn_getItemIndex(num, dev, org, items, $cfs) { if (is_string(num)) { num = $(num, $cfs); } if (is_object(num)) { num = $(num, $cfs); } if (is_jquery(num)) { num = $cfs.children().index(num); if (!is_boolean(org)) { org = false; } } else { if (!is_boolean(org)) { org = true; } } if (!is_number(num)) { num = 0; } if (!is_number(dev)) { dev = 0; } if (org) { num += items.first; } num += dev; if (items.total > 0) { while (num >= items.total) { num -= items.total; } while (num < 0) { num += items.total; } } return num; } function gn_getVisibleItemsPrev(i, o, s) { var t = 0, x = 0; for (var a = s; a >= 0; a--) { var j = i.eq(a); t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0; if (t > o.maxDimension) { return x; } if (a == 0) { a = i.length; } x++; } } function gn_getVisibleItemsPrevFilter(i, o, s) { return gn_getItemsPrevFilter(i, o.items.filter, o.items.visibleConf.org, s); } function gn_getScrollItemsPrevFilter(i, o, s, m) { return gn_getItemsPrevFilter(i, o.items.filter, m, s); } function gn_getItemsPrevFilter(i, f, m, s) { var t = 0, x = 0; for (var a = s, l = i.length; a >= 0; a--) { x++; if (x == l) { return x; } var j = i.eq(a); if (j.is(f)) { t++; if (t == m) { return x; } } if (a == 0) { a = l; } } } function gn_getVisibleOrg($c, o) { return o.items.visibleConf.org || $c.children().slice(0, o.items.visible).filter(o.items.filter).length; } function gn_getVisibleItemsNext(i, o, s) { var t = 0, x = 0; for (var a = s, l = i.length-1; a <= l; a++) { var j = i.eq(a); t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0; if (t > o.maxDimension) { return x; } x++; if (x == l+1) { return x; } if (a == l) { a = -1; } } } function gn_getVisibleItemsNextTestCircular(i, o, s, l) { var v = gn_getVisibleItemsNext(i, o, s); if (!o.circular) { if (s + v > l) { v = l - s; } } return v; } function gn_getVisibleItemsNextFilter(i, o, s) { return gn_getItemsNextFilter(i, o.items.filter, o.items.visibleConf.org, s, o.circular); } function gn_getScrollItemsNextFilter(i, o, s, m) { return gn_getItemsNextFilter(i, o.items.filter, m+1, s, o.circular) - 1; } function gn_getItemsNextFilter(i, f, m, s, c) { var t = 0, x = 0; for (var a = s, l = i.length-1; a <= l; a++) { x++; if (x >= l) { return x; } var j = i.eq(a); if (j.is(f)) { t++; if (t == m) { return x; } } if (a == l) { a = -1; } } } function gi_getCurrentItems(i, o) { return i.slice(0, o.items.visible); } function gi_getOldItemsPrev(i, o, n) { return i.slice(n, o.items.visibleConf.old+n); } function gi_getNewItemsPrev(i, o) { return i.slice(0, o.items.visible); } function gi_getOldItemsNext(i, o) { return i.slice(0, o.items.visibleConf.old); } function gi_getNewItemsNext(i, o, n) { return i.slice(n, o.items.visible+n); } function sz_storeMargin(i, o, d) { if (o.usePadding) { if (!is_string(d)) { d = '_cfs_origCssMargin'; } i.each(function() { var j = $(this), m = parseInt(j.css(o.d['marginRight']), 10); if (!is_number(m)) { m = 0; } j.data(d, m); }); } } function sz_resetMargin(i, o, m) { if (o.usePadding) { var x = (is_boolean(m)) ? m : false; if (!is_number(m)) { m = 0; } sz_storeMargin(i, o, '_cfs_tempCssMargin'); i.each(function() { var j = $(this); j.css(o.d['marginRight'], ((x) ? j.data('_cfs_tempCssMargin') : m + j.data('_cfs_origCssMargin'))); }); } } function sz_storeOrigCss(i) { i.each(function() { var j = $(this); j.data('_cfs_origCss', j.attr('style') || ''); }); } function sz_restoreOrigCss(i) { i.each(function() { var j = $(this); j.attr('style', j.data('_cfs_origCss') || ''); }); } function sz_setResponsiveSizes(o, all) { var visb = o.items.visible, newS = o.items[o.d['width']], seco = o[o.d['height']], secp = is_percentage(seco); all.each(function() { var $t = $(this), nw = newS - ms_getPaddingBorderMargin($t, o, 'Width'); $t[o.d['width']](nw); if (secp) { $t[o.d['height']](ms_getPercentage(nw, seco)); } }); } function sz_setSizes($c, o) { var $w = $c.parent(), $i = $c.children(), $v = gi_getCurrentItems($i, o), sz = cf_mapWrapperSizes(ms_getSizes($v, o, true), o, false); $w.css(sz); if (o.usePadding) { var p = o.padding, r = p[o.d[1]]; if (o.align && r < 0) { r = 0; } var $l = $v.last(); $l.css(o.d['marginRight'], $l.data('_cfs_origCssMargin') + r); $c.css(o.d['top'], p[o.d[0]]); $c.css(o.d['left'], p[o.d[3]]); } $c.css(o.d['width'], sz[o.d['width']]+(ms_getTotalSize($i, o, 'width')*2)); return sz; } function ms_getSizes(i, o, wrapper) { return [ms_getTotalSize(i, o, 'width', wrapper), ms_getLargestSize(i, o, 'height', wrapper)]; } function ms_getLargestSize(i, o, dim, wrapper) { if (!is_boolean(wrapper)) { wrapper = false; } if (is_number(o[o.d[dim]]) && wrapper) { return o[o.d[dim]]; } if (is_number(o.items[o.d[dim]])) { return o.items[o.d[dim]]; } dim = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight'; return ms_getTrueLargestSize(i, o, dim); } function ms_getTrueLargestSize(i, o, dim) { var s = 0; for (var a = 0, l = i.length; a < l; a++) { var j = i.eq(a); var m = (j.is(':visible')) ? j[o.d[dim]](true) : 0; if (s < m) { s = m; } } return s; } function ms_getTotalSize(i, o, dim, wrapper) { if (!is_boolean(wrapper)) { wrapper = false; } if (is_number(o[o.d[dim]]) && wrapper) { return o[o.d[dim]]; } if (is_number(o.items[o.d[dim]])) { return o.items[o.d[dim]] * i.length; } var d = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight', s = 0; for (var a = 0, l = i.length; a < l; a++) { var j = i.eq(a); s += (j.is(':visible')) ? j[o.d[d]](true) : 0; } return s; } function ms_getParentSize($w, o, d) { var isVisible = $w.is(':visible'); if (isVisible) { $w.hide(); } var s = $w.parent()[o.d[d]](); if (isVisible) { $w.show(); } return s; } function ms_getMaxDimension(o, a) { return (is_number(o[o.d['width']])) ? o[o.d['width']] : a; } function ms_hasVariableSizes(i, o, dim) { var s = false, v = false; for (var a = 0, l = i.length; a < l; a++) { var j = i.eq(a); var c = (j.is(':visible')) ? j[o.d[dim]](true) : 0; if (s === false) { s = c; } else if (s != c) { v = true; } if (s == 0) { v = true; } } return v; } function ms_getPaddingBorderMargin(i, o, d) { return i[o.d['outer'+d]](true) - i[o.d[d.toLowerCase()]](); } function ms_getPercentage(s, o) { if (is_percentage(o)) { o = parseInt( o.slice(0, -1), 10 ); if (!is_number(o)) { return s; } s *= o/100; } return s; } function cf_e(n, c, pf, ns, rd) { if (!is_boolean(pf)) { pf = true; } if (!is_boolean(ns)) { ns = true; } if (!is_boolean(rd)) { rd = false; } if (pf) { n = c.events.prefix + n; } if (ns) { n = n +'.'+ c.events.namespace; } if (ns && rd) { n += c.serialNumber; } return n; } function cf_c(n, c) { return (is_string(c.classnames[n])) ? c.classnames[n] : n; } function cf_mapWrapperSizes(ws, o, p) { if (!is_boolean(p)) { p = true; } var pad = (o.usePadding && p) ? o.padding : [0, 0, 0, 0]; var wra = {}; wra[o.d['width']] = ws[0] + pad[1] + pad[3]; return wra; } function cf_sortParams(vals, typs) { var arr = []; for (var a = 0, l1 = vals.length; a < l1; a++) { for (var b = 0, l2 = typs.length; b < l2; b++) { if (typs[b].indexOf(typeof vals[a]) > -1 && is_undefined(arr[b])) { arr[b] = vals[a]; break; } } } return arr; } function cf_getPadding(p) { if (is_undefined(p)) { return [0, 0, 0, 0]; } if (is_number(p)) { return [p, p, p, p]; } if (is_string(p)) { p = p.split('px').join('').split('em').join('').split(' '); } if (!is_array(p)) { return [0, 0, 0, 0]; } for (var i = 0; i < 4; i++) { p[i] = parseInt(p[i], 10); } switch (p.length) { case 0: return [0, 0, 0, 0]; case 1: return [p[0], p[0], p[0], p[0]]; case 2: return [p[0], p[1], p[0], p[1]]; case 3: return [p[0], p[1], p[2], p[1]]; default: return [p[0], p[1], p[2], p[3]]; } } function cf_getAlignPadding(itm, o) { var x = (is_number(o[o.d['width']])) ? Math.ceil(o[o.d['width']] - ms_getTotalSize(itm, o, 'width')) : 0; switch (o.align) { case 'left': return [0, x]; case 'right': return [x, 0]; case 'center': default: return [Math.ceil(x/2), Math.floor(x/2)]; } } function cf_getDimensions(o) { var dm = [ ['width' , 'innerWidth' , 'outerWidth' , 'height' , 'innerHeight' , 'outerHeight' , 'left', 'top' , 'marginRight' , 0, 1, 2, 3], ['height' , 'innerHeight' , 'outerHeight' , 'width' , 'innerWidth' , 'outerWidth' , 'top' , 'left', 'marginBottom', 3, 2, 1, 0] ]; var dl = dm[0].length, dx = (o.direction == 'right' || o.direction == 'left') ? 0 : 1; var dimensions = {}; for (var d = 0; d < dl; d++) { dimensions[dm[0][d]] = dm[dx][d]; } return dimensions; } function cf_getAdjust(x, o, a, $t) { var v = x; if (is_function(a)) { v = a.call($t, v); } else if (is_string(a)) { var p = a.split('+'), m = a.split('-'); if (m.length > p.length) { var neg = true, sta = m[0], adj = m[1]; } else { var neg = false, sta = p[0], adj = p[1]; } switch(sta) { case 'even': v = (x % 2 == 1) ? x-1 : x; break; case 'odd': v = (x % 2 == 0) ? x-1 : x; break; default: v = x; break; } adj = parseInt(adj, 10); if (is_number(adj)) { if (neg) { adj = -adj; } v += adj; } } if (!is_number(v) || v < 1) { v = 1; } return v; } function cf_getItemsAdjust(x, o, a, $t) { return cf_getItemAdjustMinMax(cf_getAdjust(x, o, a, $t), o.items.visibleConf); } function cf_getItemAdjustMinMax(v, i) { if (is_number(i.min) && v < i.min) { v = i.min; } if (is_number(i.max) && v > i.max) { v = i.max; } if (v < 1) { v = 1; } return v; } function cf_getSynchArr(s) { if (!is_array(s)) { s = [[s]]; } if (!is_array(s[0])) { s = [s]; } for (var j = 0, l = s.length; j < l; j++) { if (is_string(s[j][0])) { s[j][0] = $(s[j][0]); } if (!is_boolean(s[j][1])) { s[j][1] = true; } if (!is_boolean(s[j][2])) { s[j][2] = true; } if (!is_number(s[j][3])) { s[j][3] = 0; } } return s; } function cf_getKeyCode(k) { if (k == 'right') { return 39; } if (k == 'left') { return 37; } if (k == 'up') { return 38; } if (k == 'down') { return 40; } return -1; } function cf_setCookie(n, $c, c) { if (n) { var v = $c.triggerHandler(cf_e('currentPosition', c)); $.fn.carouFredSel.cookie.set(n, v); } } function cf_getCookie(n) { var c = $.fn.carouFredSel.cookie.get(n); return (c == '') ? 0 : c; } function in_mapCss($elem, props) { var css = {}; for (var p = 0, l = props.length; p < l; p++) { css[props[p]] = $elem.css(props[p]); } return css; } function in_complementItems(obj, opt, itm, sta) { if (!is_object(obj.visibleConf)) { obj.visibleConf = {}; } if (!is_object(obj.sizesConf)) { obj.sizesConf = {}; } if (obj.start == 0 && is_number(sta)) { obj.start = sta; } if (is_object(obj.visible)) { obj.visibleConf.min = obj.visible.min; obj.visibleConf.max = obj.visible.max; obj.visible = false; } else if (is_string(obj.visible)) { if (obj.visible == 'variable') { obj.visibleConf.variable = true; } else { obj.visibleConf.adjust = obj.visible; } obj.visible = false; } else if (is_function(obj.visible)) { obj.visibleConf.adjust = obj.visible; obj.visible = false; } if (!is_string(obj.filter)) { obj.filter = (itm.filter(':hidden').length > 0) ? ':visible' : '*'; } if (!obj[opt.d['width']]) { if (opt.responsive) { debug(true, 'Set a '+opt.d['width']+' for the items!'); obj[opt.d['width']] = ms_getTrueLargestSize(itm, opt, 'outerWidth'); } else { obj[opt.d['width']] = (ms_hasVariableSizes(itm, opt, 'outerWidth')) ? 'variable' : itm[opt.d['outerWidth']](true); } } if (!obj[opt.d['height']]) { obj[opt.d['height']] = (ms_hasVariableSizes(itm, opt, 'outerHeight')) ? 'variable' : itm[opt.d['outerHeight']](true); } obj.sizesConf.width = obj.width; obj.sizesConf.height = obj.height; return obj; } function in_complementVisibleItems(opt, avl) { if (opt.items[opt.d['width']] == 'variable') { opt.items.visibleConf.variable = true; } if (!opt.items.visibleConf.variable) { if (is_number(opt[opt.d['width']])) { opt.items.visible = Math.floor(opt[opt.d['width']] / opt.items[opt.d['width']]); } else { opt.items.visible = Math.floor(avl / opt.items[opt.d['width']]); opt[opt.d['width']] = opt.items.visible * opt.items[opt.d['width']]; if (!opt.items.visibleConf.adjust) { opt.align = false; } } if (opt.items.visible == 'Infinity' || opt.items.visible < 1) { debug(true, 'Not a valid number of visible items: Set to "variable".'); opt.items.visibleConf.variable = true; } } return opt; } function in_complementPrimarySize(obj, opt, all) { if (obj == 'auto') { obj = ms_getTrueLargestSize(all, opt, 'outerWidth'); } return obj; } function in_complementSecondarySize(obj, opt, all) { if (obj == 'auto') { obj = ms_getTrueLargestSize(all, opt, 'outerHeight'); } if (!obj) { obj = opt.items[opt.d['height']]; } return obj; } function in_getAlignPadding(o, all) { var p = cf_getAlignPadding(gi_getCurrentItems(all, o), o); o.padding[o.d[1]] = p[1]; o.padding[o.d[3]] = p[0]; return o; } function in_getResponsiveValues(o, all, avl) { var visb = cf_getItemAdjustMinMax(Math.ceil(o[o.d['width']] / o.items[o.d['width']]), o.items.visibleConf); if (visb > all.length) { visb = all.length; } var newS = Math.floor(o[o.d['width']]/visb); o.items.visible = visb; o.items[o.d['width']] = newS; o[o.d['width']] = visb * newS; return o; } function bt_pauseOnHoverConfig(p) { if (is_string(p)) { var i = (p.indexOf('immediate') > -1) ? true : false, r = (p.indexOf('resume') > -1) ? true : false; } else { var i = r = false; } return [i, r]; } function bt_mousesheelNumber(mw) { return (is_number(mw)) ? mw : null } function is_null(a) { return (a === null); } function is_undefined(a) { return (is_null(a) || typeof a == 'undefined' || a === '' || a === 'undefined'); } function is_array(a) { return (a instanceof Array); } function is_jquery(a) { return (a instanceof jQuery); } function is_object(a) { return ((a instanceof Object || typeof a == 'object') && !is_null(a) && !is_jquery(a) && !is_array(a) && !is_function(a)); } function is_number(a) { return ((a instanceof Number || typeof a == 'number') && !isNaN(a)); } function is_string(a) { return ((a instanceof String || typeof a == 'string') && !is_undefined(a) && !is_true(a) && !is_false(a)); } function is_function(a) { return (a instanceof Function || typeof a == 'function'); } function is_boolean(a) { return (a instanceof Boolean || typeof a == 'boolean' || is_true(a) || is_false(a)); } function is_true(a) { return (a === true || a === 'true'); } function is_false(a) { return (a === false || a === 'false'); } function is_percentage(x) { return (is_string(x) && x.slice(-1) == '%'); } function getTime() { return new Date().getTime(); } function deprecated( o, n ) { debug(true, o+' is DEPRECATED, support for it will be removed. Use '+n+' instead.'); } function debug(d, m) { if (!is_undefined(window.console) && !is_undefined(window.console.log)) { if (is_object(d)) { var s = ' ('+d.selector+')'; d = d.debug; } else { var s = ''; } if (!d) { return false; } if (is_string(m)) { m = 'carouFredSel'+s+': ' + m; } else { m = ['carouFredSel'+s+':', m]; } window.console.log(m); } return false; } $.extend($.easing, { 'quadratic': function(t) { var t2 = t * t; return t * (-t2 * t + 4 * t2 - 6 * t + 4); }, 'cubic': function(t) { return t * (4 * t * t - 9 * t + 6); }, 'elastic': function(t) { var t2 = t * t; return t * (33 * t2 * t2 - 106 * t2 * t + 126 * t2 - 67 * t + 15); } }); })(jQuery); (function($){$.fn.appear=function(fn,options){var settings=$.extend({data:undefined,one:true,accX:0,accY:0},options);return this.each(function(){var t=$(this);t.appeared=false;if(!fn){t.trigger('appear',settings.data);return;} var w=$(window);var check=function(){if(!t.is(':visible')){t.appeared=false;return;} var a=w.scrollLeft();var b=w.scrollTop();var o=t.offset();var x=o.left;var y=o.top;var ax=settings.accX;var ay=settings.accY;var th=t.height();var wh=w.height();var tw=t.width();var ww=w.width();if(y+th+ay>=b&&y<=b+wh+ay&&x+tw+ax>=a&&x<=a+ww+ax){if(!t.appeared)t.trigger('appear',settings.data);}else{t.appeared=false;}};var modifiedFn=function(){t.appeared=true;if(settings.one){w.unbind('scroll',check);var i=$.inArray(check,$.fn.appear.checks);if(i>=0)$.fn.appear.checks.splice(i,1);} fn.apply(this,arguments);};if(settings.one)t.one('appear',settings.data,modifiedFn);else t.bind('appear',settings.data,modifiedFn);w.scroll(check);$.fn.appear.checks.push(check);(check)();});};$.extend($.fn.appear,{checks:[],timeout:null,checkAll:function(){var length=$.fn.appear.checks.length;if(length>0)while(length--)($.fn.appear.checks[length])();},run:function(){if($.fn.appear.timeout)clearTimeout($.fn.appear.timeout);$.fn.appear.timeout=setTimeout($.fn.appear.checkAll,20);}});$.each(['append','prepend','after','before','attr','removeAttr','addClass','removeClass','toggleClass','remove','css','show','hide'],function(i,n){var old=$.fn[n];if(old){$.fn[n]=function(){var r=old.apply(this,arguments);$.fn.appear.run();return r;}}});})(jQuery); (function(d){var m="left",l="right",c="up",s="down",b="in",t="out",j="none",o="auto",i="swipe",p="pinch",u="tap",x="horizontal",q="vertical",g="all",e="start",h="move",f="end",n="cancel",a="ontouchstart"in window,v="TouchSwipe";var k={fingers:1,threshold:75,cancelThreshold:25,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"button, input, select, textarea, a, .noSwipe"};d.fn.swipe=function(A){var z=d(this),y=z.data(v);if(y&&typeof A==="string"){if(y[A]){return y[A].apply(this,Array.prototype.slice.call(arguments,1))}else{d.error("Method "+A+" does not exist on jQuery.swipe")}}else{if(!y&&(typeof A==="object"||!A)){return r.apply(this,arguments)}}return z};d.fn.swipe.defaults=k;d.fn.swipe.phases={PHASE_START:e,PHASE_MOVE:h,PHASE_END:f,PHASE_CANCEL:n};d.fn.swipe.directions={LEFT:m,RIGHT:l,UP:c,DOWN:s,IN:b,OUT:t};d.fn.swipe.pageScroll={NONE:j,HORIZONTAL:x,VERTICAL:q,AUTO:o};d.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:g};function r(y){if(y&&(y.allowPageScroll===undefined&&(y.swipe!==undefined||y.swipeStatus!==undefined))){y.allowPageScroll=j}if(y.click!==undefined&&y.tap===undefined){y.tap=y.click}if(!y){y={}}y=d.extend({},d.fn.swipe.defaults,y);return this.each(function(){var A=d(this);var z=A.data(v);if(!z){z=new w(this,y);A.data(v,z)}})}function w(S,ag){var aJ=(a||!ag.fallbackToMouseEvents),az=aJ?"touchstart":"mousedown",U=aJ?"touchmove":"mousemove",av=aJ?"touchend":"mouseup",D=aJ?null:"mouseleave",R="touchcancel";var ad=0,N=null,ah=0,aF=0,A=0,aj=1,aA=0,aN=0,Z=null;var H=d(S);var O="start";var aI=0;var ai=null;var I=0,Y=0,aD=0,aP=0;try{H.bind(az,at);H.bind(R,L)}catch(aG){d.error("events not supported "+az+","+R+" on jQuery.swipe")}this.enable=function(){H.bind(az,at);H.bind(R,L);return H};this.disable=function(){Q();return H};this.destroy=function(){Q();H.data(v,null);return H};this.option=function(aR,aQ){if(ag[aR]!==undefined){if(aQ===undefined){return ag[aR]}else{ag[aR]=aQ}}else{d.error("Option "+aR+" does not exist on jQuery.swipe.options")}};function at(aS){if(X()){return}if(d(aS.target).closest(ag.excludedElements,H).length>0){return}var aT=aS.originalEvent?aS.originalEvent:aS;var aR,aQ=a?aT.touches[0]:aT;O=e;if(a){aI=aT.touches.length}else{aS.preventDefault()}ad=0;N=null;aN=null;ah=0;aF=0;A=0;aj=1;aA=0;ai=T();Z=aE();z();if(!a||(aI===ag.fingers||ag.fingers===g)||ap()){aO(0,aQ);I=B();if(aI==2){aO(1,aT.touches[1]);aF=A=aa(ai[0].start,ai[1].start)}if(ag.swipeStatus||ag.pinchStatus){aR=aH(aT,O)}}else{aR=false}if(aR===false){O=n;aH(aT,O);return aR}else{ak(true)}}function P(aT){var aW=aT.originalEvent?aT.originalEvent:aT;if(O===f||O===n||af()){return}var aS,aR=a?aW.touches[0]:aW;var aU=V(aR);Y=B();if(a){aI=aW.touches.length}O=h;if(aI==2){if(aF==0){aO(1,aW.touches[1]);aF=A=aa(ai[0].start,ai[1].start)}else{V(aW.touches[1]);A=aa(ai[0].end,ai[1].end);aN=ao(ai[0].end,ai[1].end)}aj=y(aF,A);aA=Math.abs(aF-A)}if((aI===ag.fingers||ag.fingers===g)||!a||ap()){N=ar(aU.start,aU.end);C(aT,N);ad=G(aU.start,aU.end);ah=K();aK(N,ad);if(ag.swipeStatus||ag.pinchStatus){aS=aH(aW,O)}if(!ag.triggerOnTouchEnd||ag.triggerOnTouchLeave){var aQ=true;if(ag.triggerOnTouchLeave){var aV=au(this);aQ=aC(aU.end,aV)}if(!ag.triggerOnTouchEnd&&aQ){O=aM(h)}else{if(ag.triggerOnTouchLeave&&!aQ){O=aM(f)}}if(O==n||O==f){aH(aW,O)}}}else{O=n;aH(aW,O)}if(aS===false){O=n;aH(aW,O)}}function ab(aS){var aU=aS.originalEvent;if(a){if(aU.touches.length>0){aw();return true}}if(af()){aI=aP}aS.preventDefault();Y=B();if(ag.triggerOnTouchEnd||(ag.triggerOnTouchEnd==false&&O===h)){O=f;var aR=((aI===ag.fingers||ag.fingers===g)||!a);var aQ=ai[0].end.x!==0;var aT=aR&&aQ&&(an()||aB());if(aT){aH(aU,O)}else{O=n;aH(aU,O)}}else{if(!ag.triggerOnTouchEnd&&ay()){O=f;am(aU,O,u)}else{if(O===h){O=n;aH(aU,O)}}}ak(false)}function L(){aI=0;Y=0;I=0;aF=0;A=0;aj=1;z();ak(false)}function W(aQ){var aR=aQ.originalEvent;if(ag.triggerOnTouchLeave){O=aM(f);aH(aR,O)}}function Q(){H.unbind(az,at);H.unbind(R,L);H.unbind(U,P);H.unbind(av,ab);if(D){H.unbind(D,W)}ak(false)}function aM(aT){var aS=aT;var aR=aq();var aQ=ae();if(!aR){aS=n}else{if(aQ&&aT==h&&(!ag.triggerOnTouchEnd||ag.triggerOnTouchLeave)){aS=f}else{if(!aQ&&aT==f&&ag.triggerOnTouchLeave){aS=n}}}return aS}function aH(aS,aQ){var aR=undefined;if(ac()){aR=am(aS,aQ,i)}if(ap()&&aR!==false){aR=am(aS,aQ,p)}if(ay()&&aR!==false){aR=am(aS,aQ,u)}if(aQ===n){L(aS)}if(aQ===f){if(a){if(aS.touches.length==0){L(aS)}}else{L(aS)}}return aR}function am(aT,aQ,aS){var aR=undefined;if(aS==i){H.trigger("swipeStatus",[aQ,N||null,ad||0,ah||0,aI]);if(ag.swipeStatus){aR=ag.swipeStatus.call(H,aT,aQ,N||null,ad||0,ah||0,aI);if(aR===false){return false}}if(aQ==f&&aB()){H.trigger("swipe",[N,ad,ah,aI]);if(ag.swipe){aR=ag.swipe.call(H,aT,N,ad,ah,aI);if(aR===false){return false}}switch(N){case m:H.trigger("swipeLeft",[N,ad,ah,aI]);if(ag.swipeLeft){aR=ag.swipeLeft.call(H,aT,N,ad,ah,aI)}break;case l:H.trigger("swipeRight",[N,ad,ah,aI]);if(ag.swipeRight){aR=ag.swipeRight.call(H,aT,N,ad,ah,aI)}break;case c:H.trigger("swipeUp",[N,ad,ah,aI]);if(ag.swipeUp){aR=ag.swipeUp.call(H,aT,N,ad,ah,aI)}break;case s:H.trigger("swipeDown",[N,ad,ah,aI]);if(ag.swipeDown){aR=ag.swipeDown.call(H,aT,N,ad,ah,aI)}break}}}if(aS==p){H.trigger("pinchStatus",[aQ,aN||null,aA||0,ah||0,aI,aj]);if(ag.pinchStatus){aR=ag.pinchStatus.call(H,aT,aQ,aN||null,aA||0,ah||0,aI,aj);if(aR===false){return false}}if(aQ==f&&an()){switch(aN){case b:H.trigger("pinchIn",[aN||null,aA||0,ah||0,aI,aj]);if(ag.pinchIn){aR=ag.pinchIn.call(H,aT,aN||null,aA||0,ah||0,aI,aj)}break;case t:H.trigger("pinchOut",[aN||null,aA||0,ah||0,aI,aj]);if(ag.pinchOut){aR=ag.pinchOut.call(H,aT,aN||null,aA||0,ah||0,aI,aj)}break}}}if(aS==u){if(aQ===n||aQ===f){if((aI===1||!a)&&(isNaN(ad)||ad===0)){H.trigger("tap",[aT.target]);if(ag.tap){aR=ag.tap.call(H,aT,aT.target)}}}}return aR}function ae(){var aQ=true;if(ag.threshold!==null){aQ=ad>=ag.threshold}if(aQ&&ag.cancelThreshold!==null){aQ=(M(N)-ad)=ag.pinchThreshold}return true}function aq(){var aQ;if(ag.maxTimeThreshold){if(ah>=ag.maxTimeThreshold){aQ=false}else{aQ=true}}else{aQ=true}return aQ}function C(aQ,aR){if(ag.allowPageScroll===j||ap()){aQ.preventDefault()}else{var aS=ag.allowPageScroll===o;switch(aR){case m:if((ag.swipeLeft&&aS)||(!aS&&ag.allowPageScroll!=x)){aQ.preventDefault()}break;case l:if((ag.swipeRight&&aS)||(!aS&&ag.allowPageScroll!=x)){aQ.preventDefault()}break;case c:if((ag.swipeUp&&aS)||(!aS&&ag.allowPageScroll!=q)){aQ.preventDefault()}break;case s:if((ag.swipeDown&&aS)||(!aS&&ag.allowPageScroll!=q)){aQ.preventDefault()}break}}}function an(){return al()}function ap(){return!!(ag.pinchStatus||ag.pinchIn||ag.pinchOut)}function ax(){return!!(an()&&ap())}function aB(){var aQ=aq();var aS=ae();var aR=aS&&aQ;return aR}function ac(){return!!(ag.swipe||ag.swipeStatus||ag.swipeLeft||ag.swipeRight||ag.swipeUp||ag.swipeDown)}function E(){return!!(aB()&&ac())}function ay(){return!!(ag.tap)}function aw(){aD=B();aP=event.touches.length+1}function z(){aD=0;aP=0}function af(){var aQ=false;if(aD){var aR=B()-aD;if(aR<=ag.fingerReleaseThreshold){aQ=true}}return aQ}function X(){return!!(H.data(v+"_intouch")===true)}function ak(aQ){if(aQ===true){H.bind(U,P);H.bind(av,ab);if(D){H.bind(D,W)}}else{H.unbind(U,P,false);H.unbind(av,ab,false);if(D){H.unbind(D,W,false)}}H.data(v+"_intouch",aQ===true)}function aO(aR,aQ){var aS=aQ.identifier!==undefined?aQ.identifier:0;ai[aR].identifier=aS;ai[aR].start.x=ai[aR].end.x=aQ.pageX||aQ.clientX;ai[aR].start.y=ai[aR].end.y=aQ.pageY||aQ.clientY;return ai[aR]}function V(aQ){var aS=aQ.identifier!==undefined?aQ.identifier:0;var aR=J(aS);aR.end.x=aQ.pageX||aQ.clientX;aR.end.y=aQ.pageY||aQ.clientY;return aR}function J(aR){for(var aQ=0;aQ=0)){return m}else{if((aS<=360)&&(aS>=315)){return m}else{if((aS>=135)&&(aS<=225)){return l}else{if((aS>45)&&(aS<135)){return s}else{return c}}}}}function B(){var aQ=new Date();return aQ.getTime()}function au(aQ){aQ=d(aQ);var aS=aQ.offset();var aR={left:aS.left,right:aS.left+aQ.outerWidth(),top:aS.top,bottom:aS.top+aQ.outerHeight()};return aR}function aC(aQ,aR){return(aQ.x>aR.left&&aQ.xaR.top&&aQ.yt;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e){return"[object Array]"===f.call(e)}function i(e){var t=[];if(n(e))t=e;else if("number"==typeof e.length)for(var i=0,r=e.length;r>i;i++)t.push(e[i]);else t.push(e);return t}function r(e,n){function r(e,n,s){if(!(this instanceof r))return new r(e,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=i(e),this.options=t({},this.options),"function"==typeof n?s=n:t(this.options,n),s&&this.on("always",s),this.getImages(),o&&(this.jqDeferred=new o.Deferred);var c=this;setTimeout(function(){c.check()})}function f(e){this.img=e}function a(e){this.src=e,h[e]=this}r.prototype=new e,r.prototype.options={},r.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);for(var i=n.querySelectorAll("img"),r=0,o=i.length;o>r;r++){var s=i[r];this.addImage(s)}}},r.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},r.prototype.check=function(){function e(e,r){return t.options.debug&&c&&s.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},r.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify(t,e)})},r.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},o&&(o.fn.imagesLoaded=function(e,t){var n=new r(this,e,t);return n.jqDeferred.promise(o(this))}),f.prototype=new e,f.prototype.check=function(){var e=h[this.img.src]||new a(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var h={};return a.prototype=new e,a.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},a.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},a.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},a.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},a.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},a.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},r}var o=e.jQuery,s=e.console,c=s!==void 0,f=Object.prototype.toString;"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],r):e.imagesLoaded=r(e.EventEmitter,e.eventie)}(window);jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h':'';var ascend_loader_class=($('body').hasClass('ascend'))?'default_loader ':'';$("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded',allow_resize:true,default_width:690,opacity:0.85,animation_speed:'normal',deeplinking:false,default_height:388,social_tools:'',markup:'
    \
     
    \
    \
    \ \ \

    0/0

    \
    \ \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    '+ascend_loader+'
    \
    '});} prettyPhotoInit(); /*! * jQuery Transit - CSS3 transitions and transformations * (c) 2011-2012 Rico Sta. Cruz * MIT Licensed. * * http://ricostacruz.com/jquery.transit * http://github.com/rstacruz/jquery.transit */ (function(k){k.transit={version:"0.9.9",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var d=document.createElement("div");var q={};function b(v){if(v in d.style){return v}var u=["Moz","Webkit","O","ms"];var r=v.charAt(0).toUpperCase()+v.substr(1);if(v in d.style){return v}for(var t=0;t-1;q.transition=b("transition");q.transitionDelay=b("transitionDelay");q.transform=b("transform");q.transformOrigin=b("transformOrigin");q.transform3d=e();var i={transition:"transitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var f=q.transitionEnd=i[q.transition]||null;for(var p in q){if(q.hasOwnProperty(p)&&typeof k.support[p]==="undefined"){k.support[p]=q[p]}}d=null;k.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};k.cssHooks["transit:transform"]={get:function(r){return k(r).data("transform")||new j()},set:function(s,r){var t=r;if(!(t instanceof j)){t=new j(t)}if(q.transform==="WebkitTransform"&&!a){s.style[q.transform]=t.toString(true)}else{s.style[q.transform]=t.toString()}k(s).data("transform",t)}};k.cssHooks.transform={set:k.cssHooks["transit:transform"].set};if(k.fn.jquery<"1.8"){k.cssHooks.transformOrigin={get:function(r){return r.style[q.transformOrigin]},set:function(r,s){r.style[q.transformOrigin]=s}};k.cssHooks.transition={get:function(r){return r.style[q.transition]},set:function(r,s){r.style[q.transition]=s}}}n("scale");n("translate");n("rotate");n("rotateX");n("rotateY");n("rotate3d");n("perspective");n("skewX");n("skewY");n("x",true);n("y",true);function j(r){if(typeof r==="string"){this.parse(r)}return this}j.prototype={setFromString:function(t,s){var r=(typeof s==="string")?s.split(","):(s.constructor===Array)?s:[s];r.unshift(t);j.prototype.set.apply(this,r)},set:function(s){var r=Array.prototype.slice.apply(arguments,[1]);if(this.setter[s]){this.setter[s].apply(this,r)}else{this[s]=r.join(",")}},get:function(r){if(this.getter[r]){return this.getter[r].apply(this)}else{return this[r]||0}},setter:{rotate:function(r){this.rotate=o(r,"deg")},rotateX:function(r){this.rotateX=o(r,"deg")},rotateY:function(r){this.rotateY=o(r,"deg")},scale:function(r,s){if(s===undefined){s=r}this.scale=r+","+s},skewX:function(r){this.skewX=o(r,"deg")},skewY:function(r){this.skewY=o(r,"deg")},perspective:function(r){this.perspective=o(r,"px")},x:function(r){this.set("translate",r,null)},y:function(r){this.set("translate",null,r)},translate:function(r,s){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(r!==null&&r!==undefined){this._translateX=o(r,"px")}if(s!==null&&s!==undefined){this._translateY=o(s,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var r=(this.scale||"1,1").split(",");if(r[0]){r[0]=parseFloat(r[0])}if(r[1]){r[1]=parseFloat(r[1])}return(r[0]===r[1])?r[0]:r},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var r=0;r<=3;++r){if(t[r]){t[r]=parseFloat(t[r])}}if(t[3]){t[3]=o(t[3],"deg")}return t}},parse:function(s){var r=this;s.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,v,u){r.setFromString(v,u)})},toString:function(t){var s=[];for(var r in this){if(this.hasOwnProperty(r)){if((!q.transform3d)&&((r==="rotateX")||(r==="rotateY")||(r==="perspective")||(r==="transformOrigin"))){continue}if(r[0]!=="_"){if(t&&(r==="scale")){s.push(r+"3d("+this[r]+",1)")}else{if(t&&(r==="translate")){s.push(r+"3d("+this[r]+",0)")}else{s.push(r+"("+this[r]+")")}}}}}return s.join(" ")}};function m(s,r,t){if(r===true){s.queue(t)}else{if(r){s.queue(r,t)}else{t()}}}function h(s){var r=[];k.each(s,function(t){t=k.camelCase(t);t=k.transit.propertyMap[t]||k.cssProps[t]||t;t=c(t);if(k.inArray(t,r)===-1){r.push(t)}});return r}function g(s,v,x,r){var t=h(s);if(k.cssEase[x]){x=k.cssEase[x]}var w=""+l(v)+" "+x;if(parseInt(r,10)>0){w+=" "+l(r)}var u=[];k.each(t,function(z,y){u.push(y+" "+w)});return u.join(", ")}k.fn.transition=k.fn.transit=function(z,s,y,C){var D=this;var u=0;var w=true;if(typeof s==="function"){C=s;s=undefined}if(typeof y==="function"){C=y;y=undefined}if(typeof z.easing!=="undefined"){y=z.easing;delete z.easing}if(typeof z.duration!=="undefined"){s=z.duration;delete z.duration}if(typeof z.complete!=="undefined"){C=z.complete;delete z.complete}if(typeof z.queue!=="undefined"){w=z.queue;delete z.queue}if(typeof z.delay!=="undefined"){u=z.delay;delete z.delay}if(typeof s==="undefined"){s=k.fx.speeds._default}if(typeof y==="undefined"){y=k.cssEase._default}s=l(s);var E=g(z,s,y,u);var B=k.transit.enabled&&q.transition;var t=B?(parseInt(s,10)+parseInt(u,10)):0;if(t===0){var A=function(F){D.css(z);if(C){C.apply(D)}if(F){F()}};m(D,w,A);return D}var x={};var r=function(H){var G=false;var F=function(){if(G){D.unbind(f,F)}if(t>0){D.each(function(){this.style[q.transition]=(x[this]||null)})}if(typeof C==="function"){C.apply(D)}if(typeof H==="function"){H()}};if((t>0)&&(f)&&(k.transit.useTransitionEnd)){G=true;D.bind(f,F)}else{window.setTimeout(F,t)}D.each(function(){if(t>0){this.style[q.transition]=E}k(this).css(z)})};var v=function(F){this.offsetWidth;r(F)};m(D,w,v);return this};function n(s,r){if(!r){k.cssNumber[s]=true}k.transit.propertyMap[s]=q.transform;k.cssHooks[s]={get:function(v){var u=k(v).css("transit:transform");return u.get(s)},set:function(v,w){var u=k(v).css("transit:transform");u.setFromString(s,w);k(v).css({"transit:transform":u})}}}function c(r){return r.replace(/([A-Z])/g,function(s){return"-"+s.toLowerCase()})}function o(s,r){if((typeof s==="string")&&(!s.match(/^[\-0-9\.]+$/))){return s}else{return""+s+r}}function l(s){var r=s;if(k.fx.speeds[r]){r=k.fx.speeds[r]}return o(r,"ms")}k.transit.getTransitionValue=g})(jQuery);function niceScrollInit(){$("html").niceScroll({scrollspeed:60,mousescrollstep:40,cursorwidth:15,cursorborder:0,cursorcolor:'#303030',cursorborderradius:6,autohidemode:false,horizrailenabled:false});if($('#boxed').length==0){$('body, body #header-outer, body #header-secondary-outer, body #search-outer').css('padding-right','16px');}else if($('body[data-ext-responsive="true"]').length==0){$('body').css('padding-right','16px');} $('html').addClass('no-overflow-y');} var $smoothActive=$('body').attr('data-smooth-scrolling');var $smoothCache=($smoothActive==1)?true:false;if($smoothActive==1&&$(window).width()>690&&$('body').outerHeight(true)>$(window).height()&&Modernizr.csstransforms3d&&!navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)){niceScrollInit();}else{$('body').attr('data-smooth-scrolling','0');} if($smoothCache==false&&!navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)&&$(window).width()>690){!function(){function e(){var e=!1;e&&c("keydown",r),v.keyboardSupport&&!e&&u("keydown",r)}function t(){if(document.body){var t=document.body,n=document.documentElement,o=window.innerHeight,r=t.scrollHeight;if(S=document.compatMode.indexOf("CSS")>=0?n:t,w=t,e(),x=!0,top!=self)y=!0;else if(r>o&&(t.offsetHeight<=o||n.offsetHeight<=o)){var a=!1,i=function(){a||n.scrollHeight==document.height||(a=!0,setTimeout(function(){n.style.height=document.height+"px",a=!1},500))};if(n.style.height="auto",setTimeout(i,10),S.offsetHeight<=o){var l=document.createElement("div");l.style.clear="both",t.appendChild(l)}}v.fixedBackground||b||(t.style.backgroundAttachment="scroll",n.style.backgroundAttachment="scroll")}}function n(e,t,n,o){if(o||(o=1e3),d(t,n),1!=v.accelerationMax){var r=+new Date,a=r-C;if(a1&&(i=Math.min(i,v.accelerationMax),t*=i,n*=i)}C=+new Date}if(M.push({x:t,y:n,lastX:0>t?.99:-.99,lastY:0>n?.99:-.99,start:+new Date}),!T){var l=e===document.body,u=function(){for(var r=+new Date,a=0,i=0,c=0;c=v.animationTime,h=f?1:d/v.animationTime;v.pulseAlgorithm&&(h=p(h));var m=s.x*h-s.lastX>>0,w=s.y*h-s.lastY>>0;a+=m,i+=w,s.lastX+=m,s.lastY+=w,f&&(M.splice(c,1),c--)}l?window.scrollBy(a,i):(a&&(e.scrollLeft+=a),i&&(e.scrollTop+=i)),t||n||(M=[]),M.length?N(u,e,o/v.frameRate+1):T=!1};N(u,e,0),T=!0}}function o(e){x||t();var o=e.target,r=l(o);if(!r||e.defaultPrevented||s(w,"embed")||s(o,"embed")&&/\.pdf/i.test(o.src))return!0;var a=e.wheelDeltaX||0,i=e.wheelDeltaY||0;return a||i||(i=e.wheelDelta||0),!v.touchpadSupport&&f(i)?!0:(Math.abs(a)>1.2&&(a*=v.stepSize/120),Math.abs(i)>1.2&&(i*=v.stepSize/120),n(r,-a,-i),void e.preventDefault && e.preventDefault())}function r(e){var t=e.target,o=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==H.spacebar;if(/input|textarea|select|embed/i.test(t.nodeName)||t.isContentEditable||e.defaultPrevented||o)return!0;if(s(t,"button")&&e.keyCode===H.spacebar)return!0;var r,a=0,i=0,u=l(w),c=u.clientHeight;switch(u==document.body&&(c=window.innerHeight),e.keyCode){case H.up:i=-v.arrowScroll;break;case H.down:i=v.arrowScroll;break;case H.spacebar:r=e.shiftKey?1:-1,i=-r*c*.9;break;case H.pageup:i=.9*-c;break;case H.pagedown:i=.9*c;break;case H.home:i=-u.scrollTop;break;case H.end:var d=u.scrollHeight-u.scrollTop-c;i=d>0?d+10:0;break;case H.left:a=-v.arrowScroll;break;case H.right:a=v.arrowScroll;break;default:return!0}n(u,a,i),e.preventDefault()}function a(e){w=e.target}function i(e,t){for(var n=e.length;n--;)E[A(e[n])]=t;return t}function l(e){var t=[],n=S.scrollHeight;do{var o=E[A(e)];if(o)return i(t,o);if(t.push(e),n===e.scrollHeight){if(!y||S.clientHeight+100?1:-1,t=t>0?1:-1,(k.x!==e||k.y!==t)&&(k.x=e,k.y=t,M=[],C=0)}function f(e){if(e){e=Math.abs(e),D.push(e),D.shift(),clearTimeout(z);var t=h(D[0],120)&&h(D[1],120)&&h(D[2],120);return!t}}function h(e,t){return Math.floor(e/t)==e/t}function m(e){var t,n,o;return e*=v.pulseScale,1>e?t=e-(1-Math.exp(-e)):(n=Math.exp(-1),e-=1,o=1-Math.exp(-e),t=n+o*(1-n)),t*v.pulseNormalize}function p(e){return e>=1?1:0>=e?0:(1==v.pulseNormalize&&(v.pulseNormalize/=m(1)),m(e))}var w,g={frameRate:150,animationTime:400,stepSize:120,pulseAlgorithm:!0,pulseScale:8,pulseNormalize:1,accelerationDelta:20,accelerationMax:1,keyboardSupport:!0,arrowScroll:50,touchpadSupport:!0,fixedBackground:!0,excluded:""},v=g,b=!1,y=!1,k={x:0,y:0},x=!1,S=document.documentElement,D=[120,120,120],H={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},v=g,M=[],T=!1,C=+new Date,E={};setInterval(function(){E={}},1e4);var z,A=function(){var e=0;return function(t){return t.uniqueID||(t.uniqueID=e++)}}(),N=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e,t,n){window.setTimeout(e,n||1e3/60)}}(),K=/chrome/i.test(window.navigator.userAgent),L=null;"onwheel"in document.createElement("div")?L="wheel":"onmousewheel"in document.createElement("div")&&(L="mousewheel"),L&&K&&(u(L,o),u("mousedown",a),u("load",t))}();} function flexsliderInit(){$('.flex-gallery').each(function(){var $that=$(this);imagesLoaded($(this),function(instance){$that.flexslider({animation:'fade',smoothHeight:false,animationSpeed:500,useCSS:false,touch:true});$('.flex-gallery .flex-direction-nav li a.flex-next').html('');$('.flex-gallery .flex-direction-nav li a.flex-prev').html('');});});} flexsliderInit();var sliderAdvanceSpeed=parseInt($('#featured').attr('data-advance-speed'));var sliderAnimationSpeed=parseInt($('#featured').attr('data-animation-speed'));var sliderAutoplay=parseInt($('#featured').attr('data-autoplay'));if(isNaN(sliderAdvanceSpeed)){sliderAdvanceSpeed=5500;} if(isNaN(sliderAnimationSpeed)){sliderAnimationSpeed=800;} var $yPos;var img_urls=[];$('[style*="background"]').each(function(){var style=$(this).attr('style');var pattern=/background.*?url\('(.*?)'\)/g var match=pattern.exec(style);if(match){img_urls.push(match[1]);}});var imgArray=[];for(i=0;i0&&sliderHeight<500)sliderHeight=500;function customSliderHeight(){if(!$('body').hasClass('mobile')){$('#featured').attr('style','height: '+sliderHeight+'px !important');$('#featured article').css('height',sliderHeight+headerPadding2-23+'px')} else{$('#featured').attr('style','height: '+sliderHeight+'px');} if($('#header-outer[data-transparent-header="true"]').length>0)$('.orbit-wrapper').addClass('transparent-header');} customSliderHeight();var logoHeight=parseInt($('#header-outer').attr('data-logo-height'));var headerPadding=parseInt($('#header-outer').attr('data-padding'));var headerPadding2=parseInt($('#header-outer').attr('data-padding'));var extraDef=10;var headerResize=($('body').hasClass('pp-video-function'))?'1':$('#header-outer').attr('data-header-resize');var headerResizeOffExtra=0;var extraHeight=($('#wpadminbar').length>0)?$('#wpadminbar').height():0;var usingLogoImage=true;var mediaElement=($('.wp-video-shortcode').length>0)?36:0;var secondaryHeader=($('#header-outer').attr('data-using-secondary')=='1')?32:0;if(isNaN(logoHeight)){usingLogoImage=false;logoHeight=30;} if(isNaN(headerPadding)){headerPadding=28;headerPadding2=28;} if(headerResize.length==0){extraDef=0;headerResizeOffExtra=headerPadding2;} if($('header#top #logo img').length==0){logoHeight=30;} var $captionPos=(((sliderHeight-70)/2-$('div.slider-nav span.left span.white').height()/2)+headerPadding2-headerResizeOffExtra)-75;var $controlsPos=(((sliderHeight-70)/2-$('div.slider-nav span.left span.white').height()/2)+logoHeight+headerPadding*2+extraHeight+secondaryHeader)-10;var $scrollTop=0;var $videoHeight;function homeSliderInit(){$('#featured').orbit({animation:'fade',advanceSpeed:sliderAdvanceSpeed,animationSpeed:sliderAnimationSpeed,timer:sliderAutoplay});customSliderHeight();sliderAfterSetup();if(!$('body').hasClass('mobile')){$('.orbit-wrapper #featured article').css('top',((-$scrollTop/5)+logoHeight+headerPadding2+headerResizeOffExtra+extraHeight-extraDef+secondaryHeader)+'px');$('.orbit-wrapper div.slider-nav span.right, .orbit-wrapper div.slider-nav span.left').html('');}else{$('.orbit-wrapper div.slider-nav span.right').html('');$('.orbit-wrapper div.slider-nav span.left').html('');}} function homeSliderInit2(){if($('#featured').length>0&&$().orbit){$('#featured article .post-title h2 span').show();var sliderBackgroundColor=$('#featured').attr('data-bg-color');if(sliderBackgroundColor.length==0)sliderBackgroundColor='#000000';$('#featured article').css('background-color',sliderBackgroundColor);var $firstBg=$('#featured').find('.slide:first-child > article').attr('style');var pattern=/url\(["']?([^'")]+)['"]?\)/;var match=pattern.exec($firstBg);if(match&&match[1].indexOf('.')!==-1){var slideImg=new Image();slideImg.onload=function(){homeSliderInit();} slideImg.src=match[1];}else{homeSliderInit();} if($('.slider-nav > span').find('.white').length==0){$('.slider-nav > span').append('');} if($('body').hasClass('mobile')){$('#featured h2, #featured .video').swipe({swipeRight:function(e){$('.slider-nav .left').trigger('click');e.stopImmediatePropagation();return false;},swipeLeft:function(e){$('.slider-nav .right').trigger('click');e.stopImmediatePropagation();return false;}})}}} homeSliderInit2();function sliderAfterSetup(){$('#featured .mejs-container').css('width',$('#featured .video').width());$('#featured .mejs-container').css('height',$('#featured .video').width()/1.7777);$('body:not(.mobile) .orbit-wrapper #featured .orbit-slide:not(".has-video") article .container').css('top',$captionPos+"px");$('body:not(.mobile) .orbit-wrapper #featured .orbit-slide.has-video article .container').css('top',$videoHeight+"px");$('body:not(.mobile) .orbit-wrapper .slider-nav > span').css('top',$controlsPos+"px");$('body:not(.mobile) .orbit-wrapper #featured .slide article').css({'top':((-$scrollTop/5)+logoHeight+headerPadding2+headerResizeOffExtra+extraHeight-extraDef+secondaryHeader)+'px'});if(!$('body').hasClass('mobile')&&headerResize.length==0){$('#featured article').css('height',sliderHeight-32+'px')} $(window).trigger('resize');} function videoSlidePos(){$('#featured > div').has('.video').each(function(){if($(window).width()>1300){$('#featured .orbit-slide.has-video .video, #featured .orbit-slide.has-video h2').css('top','0');$('#featured .orbit-slide.has-video .post-title > a').css('top','10px');$videoHeight=((sliderHeight-28)/2)-((410-mediaElement)/2)+headerPadding2-headerResizeOffExtra;} else if($(window).width()>1000&&$(window).width()<1081){$('#featured .orbit-slide.has-video .video, #featured .orbit-slide.has-video h2').css('top','0');$('#featured .orbit-slide.has-video .post-title > a').css('top','10px');$videoHeight=((sliderHeight-28)/2)-((290-mediaElement)/2)+headerPadding2-headerResizeOffExtra;} else{$videoHeight=((sliderHeight-28)/2)-((336-mediaElement)/2)+headerPadding2-headerResizeOffExtra;}});} videoSlidePos();function controlsAndInfoPos(){$scrollTop=$(window).scrollTop();$('body:not(.mobile) .orbit-wrapper #featured .orbit-slide:not(".has-video") article .container').css({'opacity':1-($scrollTop/(sliderHeight-130)),'top':($scrollTop*-0.2)+$captionPos+"px"});$('body:not(.mobile) .orbit-wrapper #featured .orbit-slide.has-video article .container').css({'opacity':1-($scrollTop/(sliderHeight-130)),'top':($scrollTop*-0.2)+$videoHeight+"px"});if($('#boxed').length==0){$('body:not(.mobile) .orbit-wrapper .slider-nav > span').css({'opacity':1-($scrollTop/(sliderHeight-130)),'top':($scrollTop*-0.4)+$controlsPos+"px"});}} controlsInit();function controlsInit(){if($('#boxed').length>0){if(1-$scrollTop/(sliderHeight-$controlsPos-20)>=0){$(window).off('scroll',hideControls);$(window).on('scroll',showControls);}else{$(window).off('scroll',showControls);$(window).on('scroll',hideControls);}}else{$(window).off('scroll',showControls);$(window).off('scroll',hideControls);}} function showControls(){if(1-$scrollTop/(sliderHeight-$controlsPos-20)>=0){$('body:not(.mobile) .orbit-wrapper .slider-nav > span.left').stop(true,true).animate({'left':'0px'},450,'easeOutCubic');if($('body').attr('data-smooth-scrolling')=='1'){$('body:not(.mobile) .orbit-wrapper .slider-nav > span.right').stop(true,true).animate({'right':'15px'},450,'easeOutCubic');}else{$('body:not(.mobile) .orbit-wrapper .slider-nav > span.right').stop(true,true).animate({'right':'0px'},450,'easeOutCubic');} $(window).off('scroll',showControls);$(window).on('scroll',hideControls);}} function hideControls(){if(1-$scrollTop/(sliderHeight-$controlsPos-20)<0){$('body:not(.mobile) .orbit-wrapper .slider-nav > span.left').stop(true,true).animate({'left':'-80px'},450,'easeOutCubic');$('body:not(.mobile) .orbit-wrapper .slider-nav > span.right').stop(true,true).animate({'right':'-80px'},450,'easeOutCubic');$(window).off('scroll',hideControls);$(window).on('scroll',showControls);}} function homeSliderParallaxScroll(){$('#featured .mejs-mediaelement, #featured .iframe-embed').each(function(){if($(this).parents('.container').css('opacity')<=0){$(this).css('visibility','hidden').hide();}else{$(this).css('visibility','visible').show();}});if(!$('body').hasClass('mobile')){controlsAndInfoPos();$('body:not(.mobile) .orbit-wrapper #featured .slide:not(:transparent) article').css({'top':((-$scrollTop/5)+logoHeight+headerPadding2+headerResizeOffExtra+extraHeight-extraDef+secondaryHeader)+'px'});}} function homeSliderMobile(){if(!$('body').hasClass('mobile')){$('.orbit-wrapper #featured article').css('top',((-$scrollTop/5)+logoHeight+headerPadding2+headerResizeOffExtra+extraHeight-extraDef+secondaryHeader)+'px');$('.orbit-wrapper div.slider-nav span.right, .orbit-wrapper div.slider-nav span.left').html('');}else{$('.orbit-wrapper div.slider-nav span.right').html('');$('.orbit-wrapper div.slider-nav span.left').html('');} videoSlidePos();controlsAndInfoPos();customSliderHeight();if(!$('body').hasClass('mobile')&&headerResize.length==0){$('#featured article').css('height',sliderHeight-32+'px')}} if($('#featured').length>0){$(window).off('scroll.hsps');$(window).on('scroll.hsps',homeSliderParallaxScroll);$(window).off('resize.hsps');$(window).on('resize.hsps',homeSliderMobile);} $('.jp-video-container .jp-play, jp-video-container .jp-seek-bar').click(function(){$(this).parents('.jp-video-container').prev('.jp-jplayer').find('video').show().css('display','block');$(this).parents('.jp-video-container').prev('.jp-jplayer').find('.jp-jplayer > img').hide();});$('#featured .span_12 a.more-info').click(function(){if(!$(this).find('.btv').is(":visible")){$(this).parent().parent().find('h2, > a').css('opacity',1);$(this).parent().parent().find('.video').stop().animate({'top':'-400px'},800,'easeOutCubic');$(this).parent().parent().find('h2').stop().animate({'top':'-400px'},800,'easeOutCubic');$(this).parent().parent().find('> a').stop().animate({'top':'-380px'},800,'easeOutCubic');$(this).find('.btv').show();$(this).find('.mi').hide();} else{$(this).parent().parent().find('.video').stop().animate({'top':'0px'},800,'easeOutCubic');$(this).parent().parent().find('h2').stop().animate({'top':'0px'},800,'easeOutCubic');$(this).parent().parent().find('> a').stop().animate({'top':'0px'},800,'easeOutCubic');$(this).find('.mi').show();$(this).find('.btv').hide();} return false;});function initSF(){$(".sf-menu").superfish({delay:700,speed:'fast',speedOut:'fast',animation:{opacity:'show'}});} var $navLeave;function addOrRemoveSF(){if(window.innerWidth<1000&&$('body').attr('data-responsive')=='1'){$('body').addClass('mobile');$('header#top nav').hide();} else{$('body').removeClass('mobile');$('header#top nav').show();$('#mobile-menu').hide();$('.sf-sub-indicator').css('height',$('a.sf-with-ul').height());}} addOrRemoveSF();initSF();$(window).resize(addOrRemoveSF);function SFArrows(){$('.sf-sub-indicator').css('height',$('a.sf-with-ul').height());} SFArrows();function standardCarouselInit(){$('.carousel:not(".clients")').each(function(){var $that=$(this);var maxCols=($(this).parents('.carousel-wrap').attr('data-full-width')=='true')?'auto':3;var scrollNum=($(this).parents('.carousel-wrap').attr('data-full-width')=='true')?'auto':'';var colWidth=($(this).parents('.carousel-wrap').attr('data-full-width')=='true')?500:353;var scrollSpeed,easing;var $autoplayBool=($(this).attr('data-autorotate')=='true')?true:false;(parseInt($(this).attr('data-scroll-speed')))?scrollSpeed=parseInt($(this).attr('data-scroll-speed')):scrollSpeed=700;($(this).attr('data-easing').length>0)?easing=$(this).attr('data-easing'):easing='linear';var $element=$that;if($that.find('img').length==0)$element=$('body');imagesLoaded($element,function(instance){$that.carouFredSel({circular:true,responsive:true,items:{width:colWidth,visible:{min:1,max:maxCols}},swipe:{onTouch:true,onMouse:true,options:{excludedElements:"button, input, select, textarea, .noSwipe",tap:function(event,target){if($(target).attr('href')&&!$(target).is('[target="_blank"]')&&!$(target).is('[rel^="prettyPhoto"]'))window.open($(target).attr('href'),'_self');}},onBefore:function(){$that.find('.work-item').trigger('mouseleave');$that.find('.work-item .work-info a').trigger('mouseup');}},scroll:{items:scrollNum,easing:easing,duration:scrollSpeed},prev:{button:function(){return $that.parents('.carousel-wrap').find('.carousel-prev');}},next:{button:function(){return $that.parents('.carousel-wrap').find('.carousel-next');}},auto:{play:$autoplayBool}}).animate({'opacity':1},1300);$that.parents('.carousel-wrap').wrap('