(function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$(''); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); var $j=jQuery.noConflict(); $j(document).ready(function($){ initQodeLike(); }); function initQodeLike(){ $j(document).on('click','.qode-like', function(){ var $likeLink=$j(this); var $id=$j(this).attr('id'); if($likeLink.hasClass('liked')) return false; var $type=''; if(typeof $j(this).data('type')!=='undefined'){ $type=$j(this).data('type'); } var $dataToPass={ action: 'qode_like', likes_id: $id, type: $type } var like=$j.post(qodeLike.ajaxurl, $dataToPass, function(data){ $likeLink.html(data).addClass('liked').attr('title','You already like this!'); if($type!='portfolio_list'){ $likeLink.find('span').css('opacity',1); }}); return false; }); }; !function(e,n){e.wp=e.wp||{},e.wp.mediaelement=new function(){var e={};return{initialize:function(){(e="undefined"!=typeof _wpmejsSettings?n.extend(!0,{},_wpmejsSettings):e).classPrefix="mejs-",e.success=e.success||function(e){var n,t;e.rendererName&&-1!==e.rendererName.indexOf("flash")&&(n=e.attributes.autoplay&&"false"!==e.attributes.autoplay,t=e.attributes.loop&&"false"!==e.attributes.loop,n&&e.addEventListener("canplay",function(){e.play()},!1),t&&e.addEventListener("ended",function(){e.play()},!1))},e.customError=function(e,n){if(-1!==e.rendererName.indexOf("flash")||-1!==e.rendererName.indexOf("flv"))return''+mejsL10n.strings["mejs.download-video"]+""},n(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!n(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(e)}}},n(e.wp.mediaelement.initialize)}(window,jQuery); ;(function($,window,document,undefined){$.fn.doubleTapToGo=function(params){if(!('ontouchstart'in window)&&!window.navigator.msPointerEnabled&&!navigator.userAgent.toLowerCase().match(/windows phone os 7/i)){return false}this.each(function(){var curItem=false;$(this).on('click',function(e){var item=$(this);if(item[0]!==curItem[0]){e.preventDefault();curItem=item}});$(document).on('click touchstart MSPointerDown',function(e){var resetItem=true,parents=$(e.target).parents();for(var i=0;i',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; }}",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f=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($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))=0)&&focusable(element,!isTabIndexNaN)}});if(!$("").outerWidth(1).jquery){$.each(["Width","Height"],function(i,name){var side=name==="Width"?["Left","Right"]:["Top","Bottom"],type=name.toLowerCase(),orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};function reduce(elem,size,border,margin){$.each(side,function(){size-=parseFloat($.css(elem,"padding"+this))||0;if(border){size-=parseFloat($.css(elem,"border"+this+"Width"))||0}if(margin){size-=parseFloat($.css(elem,"margin"+this))||0}});return size}$.fn["inner"+name]=function(size){if(size===undefined){return orig["inner"+name].call(this)}return this.each(function(){$(this).css(type,reduce(this,size)+"px")})};$.fn["outer"+name]=function(size,margin){if(typeof size!=="number"){return orig["outer"+name].call(this,size)}return this.each(function(){$(this).css(type,reduce(this,size,true,margin)+"px")})}})}if(!$.fn.addBack){$.fn.addBack=function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}}if($("").data("a-b","a").removeData("a-b").data("a-b")){$.fn.removeData=(function(removeData){return function(key){if(arguments.length){return removeData.call(this,$.camelCase(key))}else{return removeData.call(this)}}})($.fn.removeData)}$.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());$.support.selectstart="onselectstart"in document.createElement("div");$.fn.extend({disableSelection:function(){return this.bind(($.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(event){event.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});$.extend($.ui,{plugin:{add:function(module,option,set){var i,proto=$.ui[module].prototype;for(i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var i,set=instance.plugins[name];if(!set||!instance.element[0].parentNode||instance.element[0].parentNode.nodeType===11){return}for(i=0;i0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has}})})(jQuery);(function($,undefined){var uuid=0,slice=Array.prototype.slice,_cleanData=$.cleanData;$.cleanData=function(elems){for(var i=0,elem;(elem=elems[i])!=null;i++){try{$(elem).triggerHandler("remove")}catch(e){}}_cleanData(elems)};$.widget=function(name,base,prototype){var fullName,existingConstructor,constructor,basePrototype,proxiedPrototype={},namespace=name.split(".")[0];name=name.split(".")[1];fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$.Widget}$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName)};$[namespace]=$[namespace]||{};existingConstructor=$[namespace][name];constructor=$[namespace][name]=function(options,element){if(!this._createWidget){return new constructor(options,element)}if(arguments.length){this._createWidget(options,element)}};$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]});basePrototype=new base();basePrototype.options=$.widget.extend({},basePrototype.options);$.each(prototype,function(prop,value){if(!$.isFunction(value)){proxiedPrototype[prop]=value;return}proxiedPrototype[prop]=(function(){var _super=function(){return base.prototype[prop].apply(this,arguments)},_superApply=function(args){return base.prototype[prop].apply(this,args)};return function(){var __super=this._super,__superApply=this._superApply,returnValue;this._super=_super;this._superApply=_superApply;returnValue=value.apply(this,arguments);this._super=__super;this._superApply=__superApply;return returnValue}})()});constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix:name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName});if(existingConstructor){$.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto)});delete existingConstructor._childConstructors}else{base._childConstructors.push(constructor)}$.widget.bridge(name,constructor)};$.widget.extend=function(target){var input=slice.call(arguments,1),inputIndex=0,inputLength=input.length,key,value;for(;inputIndex",options:{disabled:false,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0];this.element=$(element);this.uuid=uuid++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=$.widget.extend({},this.options,this._getCreateOptions(),options);this.bindings=$();this.hoverable=$();this.focusable=$();if(element!==this){$.data(element,this.widgetFullName,this);this._on(true,this.element,{remove:function(event){if(event.target===element){this.destroy()}}});this.document=$(element.style?element.ownerDocument:element.document||element);this.window=$(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:$.noop,_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData($.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:$.noop,widget:function(){return this.element},option:function(key,value){var options=key,parts,curOption,i;if(arguments.length===0){return $.widget.extend({},this.options)}if(typeof key==="string"){options={};parts=key.split(".");key=parts.shift();if(parts.length){curOption=options[key]=$.widget.extend({},this.options[key]);for(i=0;i=this.options.distance)},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function($,undefined){$.widget("ui.draggable",$.ui.mouse,{version:"1.10.2",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}if(this.options.addClasses){this.element.addClass("ui-draggable")}if(this.options.disabled){this.element.addClass("ui-draggable-disabled")}this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).closest(".ui-resizable-handle").length>0){return false}this.handle=this._getHandle(event);if(!this.handle){return false}$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$("
    ").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body")});return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));if(o.containment){this._setContainment()}if(this._trigger("start",event)===false){this._clear();return false}this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this._mouseDrag(event,true);if($.ui.ddmanager){$.ui.ddmanager.dragStart(this,event)}return true},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();if(this._trigger("drag",event,ui)===false){this._mouseUp({});return false}this.position=ui.position}if(!this.options.axis||this.options.axis!=="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!=="x"){this.helper[0].style.top=this.position.top+"px"}if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}return false},_mouseStop:function(event){var element,that=this,elementInDom=false,dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=false}element=this.element[0];while(element&&(element=element.parentNode)){if(element===document){elementInDom=true}}if(!elementInDom&&this.options.helper==="original"){return false}if((this.options.revert==="invalid"&&!dropped)||(this.options.revert==="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(that._trigger("stop",event)!==false){that._clear()}})}else{if(this._trigger("stop",event)!==false){this._clear()}}return false},_mouseUp:function(event){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});if($.ui.ddmanager){$.ui.ddmanager.dragStop(this,event)}return $.ui.mouse.prototype._mouseUp.call(this,event)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(event){return this.options.handle?!!$(event.target).closest(this.element.find(this.options.handle)).length:true},_createHelper:function(event){var o=this.options,helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper==="clone"?this.element.clone().removeAttr("id"):this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo==="parent"?this.element[0].parentNode:o.appendTo))}if(helper[0]!==this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute")}return helper},_adjustOffsetFromHelper:function(obj){if(typeof obj==="string"){obj=obj.split(" ")}if($.isArray(obj)){obj={left:+obj[0],top:+obj[1]||0}}if("left"in obj){this.offset.click.left=obj.left+this.margins.left}if("right"in obj){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if("top"in obj){this.offset.click.top=obj.top+this.margins.top}if("bottom"in obj){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]===document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&$.ui.ie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0),right:(parseInt(this.element.css("marginRight"),10)||0),bottom:(parseInt(this.element.css("marginBottom"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var over,c,ce,o=this.options;if(o.containment==="parent"){o.containment=this.helper[0].parentNode}if(o.containment==="document"||o.containment==="window"){this.containment=[o.containment==="document"?0:$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,o.containment==="document"?0:$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(o.containment==="document"?0:$(window).scrollLeft())+$(o.containment==="document"?document:window).width()-this.helperProportions.width-this.margins.left,(o.containment==="document"?0:$(window).scrollTop())+($(o.containment==="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!==Array){c=$(o.containment);ce=c[0];if(!ce){return}over=($(ce).css("overflow")!=="hidden");this.containment=[(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0),(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0),(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderRightWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderBottomWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=c}else if(o.containment.constructor===Array){this.containment=o.containment}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d==="absolute"?1:-1,scroll=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var containment,co,top,left,o=this.options,scroll=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName),pageX=event.pageX,pageY=event.pageY;if(this.originalPosition){if(this.containment){if(this.relative_container){co=this.relative_container.offset();containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top]}else{containment=this.containment}if(event.pageX-this.offset.click.leftcontainment[2]){pageX=containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>containment[3]){pageY=containment[3]+this.offset.click.top}}if(o.grid){top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;pageY=containment?((top-this.offset.click.top>=containment[1]||top-this.offset.click.top>containment[3])?top:((top-this.offset.click.top>=containment[1])?top-o.grid[1]:top+o.grid[1])):top;left=o.grid[0]?this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX;pageX=containment?((left-this.offset.click.left>=containment[0]||left-this.offset.click.left>containment[2])?left:((left-this.offset.click.left>=containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type==="drag"){this.positionAbs=this._convertPositionTo("absolute")}return $.Widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("ui-draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"ui-sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable.refreshPositions();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){var inst=$(this).data("ui-draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=this.shouldRevert}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper==="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("ui-draggable"),that=this;$.each(inst.sortables,function(){var innermostIntersecting=false,thisSortable=this;this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){innermostIntersecting=true;$.each(inst.sortables,function(){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this!==thisSortable&&this.instance._intersectsWith(this.instance.containerCache)&&$.contains(thisSortable.instance.element[0],this.instance.element[0])){innermostIntersecting=false}return innermostIntersecting})}if(innermostIntersecting){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0]};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem){this.instance._mouseDrag(event)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}inst._trigger("fromSortable",event);inst.dropped=false}}})}});$.ui.plugin.add("draggable","cursor",{start:function(){var t=$("body"),o=$(this).data("ui-draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor")}t.css("cursor",o.cursor)},stop:function(){var o=$(this).data("ui-draggable").options;if(o._cursor){$("body").css("cursor",o._cursor)}}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("ui-draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity")}t.css("opacity",o.opacity)},stop:function(event,ui){var o=$(this).data("ui-draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity)}}});$.ui.plugin.add("draggable","scroll",{start:function(){var i=$(this).data("ui-draggable");if(i.scrollParent[0]!==document&&i.scrollParent[0].tagName!=="HTML"){i.overflowOffset=i.scrollParent.offset()}},drag:function(event){var i=$(this).data("ui-draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!==document&&i.scrollParent[0].tagName!=="HTML"){if(!o.axis||o.axis!=="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY=0;i--){l=inst.snapElements[i].left;r=l+inst.snapElements[i].width;t=inst.snapElements[i].top;b=t+inst.snapElements[i].height;if(!((l-dreference)&&(x<(reference+size))}$.widget("ui.droppable",{version:"1.10.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var o=this.options,accept=o.accept;this.isover=false;this.isout=true;this.accept=$.isFunction(accept)?accept:function(d){return d.is(accept)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};$.ui.ddmanager.droppables[o.scope]=$.ui.ddmanager.droppables[o.scope]||[];$.ui.ddmanager.droppables[o.scope].push(this);(o.addClasses&&this.element.addClass("ui-droppable"))},_destroy:function(){var i=0,drop=$.ui.ddmanager.droppables[this.options.scope];for(;i=t&&y1<=b)||(y2>=t&&y2<=b)||(y1b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1r));default:return false}};$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var i,j,m=$.ui.ddmanager.droppables[t.options.scope]||[],type=event?event.type:null,list=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();droppablesLoop:for(i=0;i").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=o.handles||(!$(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw"}n=this.handles.split(",");this.handles={};for(i=0;i");axis.css({zIndex:o.zIndex});if("se"===handle){axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[handle]=".ui-resizable-"+handle;this.element.append(axis)}}this._renderAxis=function(target){var i,axis,padPos,padWrapper;target=target||this.element;for(i in this.handles){if(this.handles[i].constructor===String){this.handles[i]=$(this.handles[i],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){axis=$(this.handles[i],this.element);padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");target.css(padPos,padWrapper);this._proportionallyResize()}if(!$(this.handles[i]).length){continue}}};this._renderAxis(this.element);this._handles=$(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!that.resizing){if(this.className){axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}that.axis=axis&&axis[1]?axis[1]:"se"}});if(o.autoHide){this._handles.hide();$(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(o.disabled){return}$(this).removeClass("ui-resizable-autohide");that._handles.show()}).mouseleave(function(){if(o.disabled){return}if(!that.resizing){$(this).addClass("ui-resizable-autohide");that._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var wrapper,_destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){_destroy(this.element);wrapper=this.element;this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")}).insertAfter(wrapper);wrapper.remove()}this.originalElement.css("resize",this.originalResizeStyle);_destroy(this.originalElement);return this},_mouseCapture:function(event){var i,handle,capture=false;for(i in this.handles){handle=$(this.handles[i])[0];if(handle===event.target||$.contains(handle,event.target)){capture=true}}return!this.options.disabled&&capture},_mouseStart:function(event){var curleft,curtop,cursor,o=this.options,iniPos=this.element.position(),el=this.element;this.resizing=true;if((/absolute/).test(el.css("position"))){el.css({position:"absolute",top:el.css("top"),left:el.css("left")})}else if(el.is(".ui-draggable")){el.css({position:"absolute",top:iniPos.top,left:iniPos.left})}this._renderProxy();curleft=num(this.helper.css("left"));curtop=num(this.helper.css("top"));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=(typeof o.aspectRatio==="number")?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);cursor=$(".ui-resizable-"+this.axis).css("cursor");$("body").css("cursor",cursor==="auto"?this.axis+"-resize":cursor);el.addClass("ui-resizable-resizing");this._propagate("start",event);return true},_mouseDrag:function(event){var data,el=this.helper,props={},smp=this.originalMousePosition,a=this.axis,prevTop=this.position.top,prevLeft=this.position.left,prevWidth=this.size.width,prevHeight=this.size.height,dx=(event.pageX-smp.left)||0,dy=(event.pageY-smp.top)||0,trigger=this._change[a];if(!trigger){return false}data=trigger.apply(this,[event,dx,dy]);this._updateVirtualBoundaries(event.shiftKey);if(this._aspectRatio||event.shiftKey){data=this._updateRatio(data,event)}data=this._respectSize(data,event);this._updateCache(data);this._propagate("resize",event);if(this.position.top!==prevTop){props.top=this.position.top+"px"}if(this.position.left!==prevLeft){props.left=this.position.left+"px"}if(this.size.width!==prevWidth){props.width=this.size.width+"px"}if(this.size.height!==prevHeight){props.height=this.size.height+"px"}el.css(props);if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}if(!$.isEmptyObject(props)){this._trigger("resize",event,this.ui())}return false},_mouseStop:function(event){this.resizing=false;var pr,ista,soffseth,soffsetw,s,left,top,o=this.options,that=this;if(this._helper){pr=this._proportionallyResizeElements;ista=pr.length&&(/textarea/i).test(pr[0].nodeName);soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:that.sizeDiff.height;soffsetw=ista?0:that.sizeDiff.width;s={width:(that.helper.width()-soffsetw),height:(that.helper.height()-soffseth)};left=(parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left))||null;top=(parseInt(that.element.css("top"),10)+(that.position.top-that.originalPosition.top))||null;if(!o.animate){this.element.css($.extend(s,{top:top,left:left}))}that.helper.height(that.size.height);that.helper.width(that.size.width);if(this._helper&&!o.animate){this._proportionallyResize()}}$("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(forceAspectRatio){var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,o=this.options;b={minWidth:isNumber(o.minWidth)?o.minWidth:0,maxWidth:isNumber(o.maxWidth)?o.maxWidth:Infinity,minHeight:isNumber(o.minHeight)?o.minHeight:0,maxHeight:isNumber(o.maxHeight)?o.maxHeight:Infinity};if(this._aspectRatio||forceAspectRatio){pMinWidth=b.minHeight*this.aspectRatio;pMinHeight=b.minWidth/this.aspectRatio;pMaxWidth=b.maxHeight*this.aspectRatio;pMaxHeight=b.maxWidth/this.aspectRatio;if(pMinWidth>b.minWidth){b.minWidth=pMinWidth}if(pMinHeight>b.minHeight){b.minHeight=pMinHeight}if(pMaxWidthdata.width),isminh=isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height),dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height,cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw){data.width=o.minWidth}if(isminh){data.height=o.minHeight}if(ismaxw){data.width=o.maxWidth}if(ismaxh){data.height=o.maxHeight}if(isminw&&cw){data.left=dw-o.minWidth}if(ismaxw&&cw){data.left=dw-o.maxWidth}if(isminh&&ch){data.top=dh-o.minHeight}if(ismaxh&&ch){data.top=dh-o.maxHeight}if(!data.width&&!data.height&&!data.left&&data.top){data.top=null}else if(!data.width&&!data.height&&!data.top&&data.left){data.left=null}return data},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return}var i,j,borders,paddings,prel,element=this.helper||this.element;for(i=0;i");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++o.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(event,dx){return{width:this.originalSize.width+dx}},w:function(event,dx){var cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]);(n!=="resize"&&this._trigger(n,event,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});$.ui.plugin.add("resizable","animate",{stop:function(event){var that=$(this).data("ui-resizable"),o=that.options,pr=that._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,style={width:(that.size.width-soffsetw),height:(that.size.height-soffseth)},left=(parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left))||null,top=(parseInt(that.element.css("top"),10)+(that.position.top-that.originalPosition.top))||null;that.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(that.element.css("width"),10),height:parseInt(that.element.css("height"),10),top:parseInt(that.element.css("top"),10),left:parseInt(that.element.css("left"),10)};if(pr&&pr.length){$(pr[0]).css({width:data.width,height:data.height})}that._updateCache(data);that._propagate("resize",event)}})}});$.ui.plugin.add("resizable","containment",{start:function(){var element,p,co,ch,cw,width,height,that=$(this).data("ui-resizable"),o=that.options,el=that.element,oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce){return}that.containerElement=$(ce);if(/document/.test(oc)||oc===document){that.containerOffset={left:0,top:0};that.containerPosition={left:0,top:0};that.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}}else{element=$(ce);p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=num(element.css("padding"+name))});that.containerOffset=element.offset();that.containerPosition=element.position();that.containerSize={height:(element.innerHeight()-p[3]),width:(element.innerWidth()-p[1])};co=that.containerOffset;ch=that.containerSize.height;cw=that.containerSize.width;width=($.ui.hasScroll(ce,"left")?ce.scrollWidth:cw);height=($.ui.hasScroll(ce)?ce.scrollHeight:ch);that.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}}},resize:function(event){var woset,hoset,isParent,isOffsetRelative,that=$(this).data("ui-resizable"),o=that.options,co=that.containerOffset,cp=that.position,pRatio=that._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=that.containerElement;if(ce[0]!==document&&(/static/).test(ce.css("position"))){cop=co}if(cp.left<(that._helper?co.left:0)){that.size.width=that.size.width+(that._helper?(that.position.left-co.left):(that.position.left-cop.left));if(pRatio){that.size.height=that.size.width/that.aspectRatio}that.position.left=o.helper?co.left:0}if(cp.top<(that._helper?co.top:0)){that.size.height=that.size.height+(that._helper?(that.position.top-co.top):that.position.top);if(pRatio){that.size.width=that.size.height*that.aspectRatio}that.position.top=that._helper?co.top:0}that.offset.left=that.parentData.left+that.position.left;that.offset.top=that.parentData.top+that.position.top;woset=Math.abs((that._helper?that.offset.left-cop.left:(that.offset.left-cop.left))+that.sizeDiff.width);hoset=Math.abs((that._helper?that.offset.top-cop.top:(that.offset.top-co.top))+that.sizeDiff.height);isParent=that.containerElement.get(0)===that.element.parent().get(0);isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position"));if(isParent&&isOffsetRelative){woset-=that.parentData.left}if(woset+that.size.width>=that.parentData.width){that.size.width=that.parentData.width-woset;if(pRatio){that.size.height=that.size.width/that.aspectRatio}}if(hoset+that.size.height>=that.parentData.height){that.size.height=that.parentData.height-hoset;if(pRatio){that.size.width=that.size.height*that.aspectRatio}}},stop:function(){var that=$(this).data("ui-resizable"),o=that.options,co=that.containerOffset,cop=that.containerPosition,ce=that.containerElement,helper=$(that.helper),ho=helper.offset(),w=helper.outerWidth()-that.sizeDiff.width,h=helper.outerHeight()-that.sizeDiff.height;if(that._helper&&!o.animate&&(/relative/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}if(that._helper&&!o.animate&&(/static/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}});$.ui.plugin.add("resizable","alsoResize",{start:function(){var that=$(this).data("ui-resizable"),o=that.options,_store=function(exp){$(exp).each(function(){var el=$(this);el.data("ui-resizable-alsoresize",{width:parseInt(el.width(),10),height:parseInt(el.height(),10),left:parseInt(el.css("left"),10),top:parseInt(el.css("top"),10)})})};if(typeof(o.alsoResize)==="object"&&!o.alsoResize.parentNode){if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize)}else{$.each(o.alsoResize,function(exp){_store(exp)})}}else{_store(o.alsoResize)}},resize:function(event,ui){var that=$(this).data("ui-resizable"),o=that.options,os=that.originalSize,op=that.originalPosition,delta={height:(that.size.height-os.height)||0,width:(that.size.width-os.width)||0,top:(that.position.top-op.top)||0,left:(that.position.left-op.left)||0},_alsoResize=function(exp,c){$(exp).each(function(){var el=$(this),start=$(this).data("ui-resizable-alsoresize"),style={},css=c&&c.length?c:el.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];$.each(css,function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0){style[prop]=sum||null}});el.css(style)})};if(typeof(o.alsoResize)==="object"&&!o.alsoResize.nodeType){$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c)})}else{_alsoResize(o.alsoResize)}},stop:function(){$(this).removeData("resizable-alsoresize")}});$.ui.plugin.add("resizable","ghost",{start:function(){var that=$(this).data("ui-resizable"),o=that.options,cs=that.size;that.ghost=that.originalElement.clone();that.ghost.css({opacity:0.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof o.ghost==="string"?o.ghost:"");that.ghost.appendTo(that.helper)},resize:function(){var that=$(this).data("ui-resizable");if(that.ghost){that.ghost.css({position:"relative",height:that.size.height,width:that.size.width})}},stop:function(){var that=$(this).data("ui-resizable");if(that.ghost&&that.helper){that.helper.get(0).removeChild(that.ghost.get(0))}}});$.ui.plugin.add("resizable","grid",{resize:function(){var that=$(this).data("ui-resizable"),o=that.options,cs=that.size,os=that.originalSize,op=that.originalPosition,a=that.axis,grid=typeof o.grid==="number"?[o.grid,o.grid]:o.grid,gridX=(grid[0]||1),gridY=(grid[1]||1),ox=Math.round((cs.width-os.width)/gridX)*gridX,oy=Math.round((cs.height-os.height)/gridY)*gridY,newWidth=os.width+ox,newHeight=os.height+oy,isMaxWidth=o.maxWidth&&(o.maxWidthnewWidth),isMinHeight=o.minHeight&&(o.minHeight>newHeight);o.grid=grid;if(isMinWidth){newWidth=newWidth+gridX}if(isMinHeight){newHeight=newHeight+gridY}if(isMaxWidth){newWidth=newWidth-gridX}if(isMaxHeight){newHeight=newHeight-gridY}if(/^(se|s|e)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight}else if(/^(ne)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.top=op.top-oy}else if(/^(sw)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.left=op.left-ox}else{that.size.width=newWidth;that.size.height=newHeight;that.position.top=op.top-oy;that.position.left=op.left-ox}}})})(jQuery);(function($,undefined){$.widget("ui.selectable",$.ui.mouse,{version:"1.10.2",options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var selectees,that=this;this.element.addClass("ui-selectable");this.dragged=false;this.refresh=function(){selectees=$(that.options.filter,that.element[0]);selectees.addClass("ui-selectee");selectees.each(function(){var $this=$(this),pos=$this.offset();$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")})})};this.refresh();this.selectees=selectees.addClass("ui-selectee");this._mouseInit();this.helper=$("
    ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(event){var that=this,options=this.options;this.opos=[event.pageX,event.pageY];if(this.options.disabled){return}this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$(options.appendTo).append(this.helper);this.helper.css({"left":event.pageX,"top":event.pageY,"width":0,"height":0});if(options.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey&&!event.ctrlKey){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element})}});$(event.target).parents().addBack().each(function(){var doSelect,selectee=$.data(this,"selectable-item");if(selectee){doSelect=(!event.metaKey&&!event.ctrlKey)||!selectee.$element.hasClass("ui-selected");selectee.$element.removeClass(doSelect?"ui-unselecting":"ui-selected").addClass(doSelect?"ui-selecting":"ui-unselecting");selectee.unselecting=!doSelect;selectee.selecting=doSelect;selectee.selected=doSelect;if(doSelect){that._trigger("selecting",event,{selecting:selectee.element})}else{that._trigger("unselecting",event,{unselecting:selectee.element})}return false}})},_mouseDrag:function(event){this.dragged=true;if(this.options.disabled){return}var tmp,that=this,options=this.options,x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){tmp=x2;x2=x1;x1=tmp}if(y1>y2){tmp=y2;y2=y1;y1=tmp}this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item"),hit=false;if(!selectee||selectee.element===that.element[0]){return}if(options.tolerance==="touch"){hit=(!(selectee.left>x2||selectee.righty2||selectee.bottomx1&&selectee.righty1&&selectee.bottomreference)&&(x<(reference+size))}function isFloating(item){return(/left|right/).test(item.css("float"))||(/inline|table-cell/).test(item.css("display"))}$.widget("ui.sortable",$.ui.mouse,{version:"1.10.2",widgetEventPrefix:"sort",ready:false,options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?o.axis==="x"||isFloating(this.items[0].item):false;this.offset=this.element.offset();this._mouseInit();this.ready=true},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData(this.widgetName+"-item")}return this},_setOption:function(key,value){if(key==="disabled"){this.options[key]=value;this.widget().toggleClass("ui-sortable-disabled",!!value)}else{$.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=false,that=this;if(this.reverting){return false}if(this.options.disabled||this.options.type==="static"){return false}this._refreshItems(event);$(event.target).parents().each(function(){if($.data(this,that.widgetName+"-item")===that){currentItem=$(this);return false}});if($.data(event.target,that.widgetName+"-item")===that){currentItem=$(event.target)}if(!currentItem){return false}if(this.options.handle&&!overrideHandle){$(this.options.handle,currentItem).find("*").addBack().each(function(){if(this===event.target){validHandle=true}});if(!validHandle){return false}}this.currentItem=currentItem;this._removeCurrentsFromItems();return true},_mouseStart:function(event,overrideHandle,noActivation){var i,body,o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!==this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(o.containment){this._setContainment()}if(o.cursor&&o.cursor!=="auto"){body=this.document.find("body");this.storedCursor=body.css("cursor");body.css("cursor",o.cursor);this.storedStylesheet=$("").appendTo(body)}if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",o.opacity)}if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",o.zIndex)}if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!noActivation){for(i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,this._uiHash(this))}}if($.ui.ddmanager){$.ui.ddmanager.current=this}if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true},_mouseDrag:function(event){var i,item,itemElement,intersection,o=this.options,scrolled=false;this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY=0;i--){item=this.items[i];itemElement=item.item[0];intersection=this._intersectsWithPointer(item);if(!intersection){continue}if(item.instance!==this.currentContainer){continue}if(itemElement!==this.currentItem[0]&&this.placeholder[intersection===1?"next":"prev"]()[0]!==itemElement&&!$.contains(this.placeholder[0],itemElement)&&(this.options.type==="semi-dynamic"?!$.contains(this.element[0],itemElement):true)){this.direction=intersection===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item)}else{break}this._trigger("change",event,this._uiHash());break}}this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(event,noPropagation){if(!event){return}if($.ui.ddmanager&&!this.options.dropBehaviour){$.ui.ddmanager.drop(this,event)}if(this.options.revert){var that=this,cur=this.placeholder.offset(),axis=this.options.axis,animation={};if(!axis||axis==="x"){animation.left=cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)}if(!axis||axis==="y"){animation.top=cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)}this.reverting=true;$(this.helper).animate(animation,parseInt(this.options.revert,10)||500,function(){that._clear(event)})}else{this._clear(event,noPropagation)}return false},cancel:function(){if(this.dragging){this._mouseUp({target:null});if(this.options.helper==="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,this._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,this._uiHash(this));this.containers[i].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem)}else{$(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected),str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[\-=_](.+)/));if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]))}});if(!str.length&&o.key){str.push(o.key+"=")}return str.join("&")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected),ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"")});return ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height,l=item.left,r=l+item.width,t=item.top,b=t+item.height,dyClick=this.offset.click.top,dxClick=this.offset.click.left,isOverElement=(y1+dyClick)>t&&(y1+dyClick)l&&(x1+dxClick)item[this.floating?"width":"height"])){return isOverElement}else{return(l0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!==0&&(delta>0?"right":"left")},refresh:function(event){this._refreshItems(event);this.refreshPositions();return this},_connectWith:function(){var options=this.options;return options.connectWith.constructor===String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){var i,j,cur,inst,items=[],queries=[],connectWith=this._connectWith();if(connectWith&&connected){for(i=connectWith.length-1;i>=0;i--){cur=$(connectWith[i]);for(j=cur.length-1;j>=0;j--){inst=$.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),inst])}}}}queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this)})}return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(item){for(var j=0;j=0;i--){cur=$(connectWith[i]);for(j=cur.length-1;j>=0;j--){inst=$.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst)}}}}for(i=queries.length-1;i>=0;i--){targetData=queries[i][1];_queries=queries[i][0];for(j=0,queriesLength=_queries.length;j=0;i--){item=this.items[i];if(item.instance!==this.currentContainer&&this.currentContainer&&item.item[0]!==this.currentItem[0]){continue}t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight()}p=t.offset();item.left=p.left;item.top=p.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(i=this.containers.length-1;i>=0;i--){p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}return this},_createPlaceholder:function(that){that=that||this;var className,o=that.options;if(!o.placeholder||o.placeholder.constructor===String){className=o.placeholder;o.placeholder={element:function(){var nodeName=that.currentItem[0].nodeName.toLowerCase(),element=$(that.document[0].createElement(nodeName)).addClass(className||that.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");if(nodeName==="tr"){element.append(" ")}else if(nodeName==="img"){element.attr("src",that.currentItem.attr("src"))}if(!className){element.css("visibility","hidden")}return element},update:function(container,p){if(className&&!o.forcePlaceholderSize){return}if(!p.height()){p.height(that.currentItem.innerHeight()-parseInt(that.currentItem.css("paddingTop")||0,10)-parseInt(that.currentItem.css("paddingBottom")||0,10))}if(!p.width()){p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css("paddingLeft")||0,10)-parseInt(that.currentItem.css("paddingRight")||0,10))}}}}that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem));that.currentItem.after(that.placeholder);o.placeholder.update(that,that.placeholder)},_contactContainers:function(event){var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,base,cur,nearBottom,floating,innermostContainer=null,innermostIndex=null;for(i=this.containers.length-1;i>=0;i--){if($.contains(this.currentItem[0],this.containers[i].element[0])){continue}if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0])){continue}innermostContainer=this.containers[i];innermostIndex=i}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0}}}if(!innermostContainer){return}if(this.containers.length===1){if(!this.containers[innermostIndex].containerCache.over){this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1}}else{dist=10000;itemWithLeastDistance=null;floating=innermostContainer.floating||isFloating(this.currentItem);posProperty=floating?"left":"top";sizeProperty=floating?"width":"height";base=this.positionAbs[posProperty]+this.offset.click[posProperty];for(j=this.items.length-1;j>=0;j--){if(!$.contains(this.containers[innermostIndex].element[0],this.items[j].item[0])){continue}if(this.items[j].item[0]===this.currentItem[0]){continue}if(floating&&!isOverAxis(this.positionAbs.top+this.offset.click.top,this.items[j].top,this.items[j].height)){continue}cur=this.items[j].item.offset()[posProperty];nearBottom=false;if(Math.abs(cur-base)>Math.abs(cur+this.items[j][sizeProperty]-base)){nearBottom=true;cur+=this.items[j][sizeProperty]}if(Math.abs(cur-base)this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?((top-this.offset.click.top>=this.containment[1]&&top-this.offset.click.top<=this.containment[3])?top:((top-this.offset.click.top>=this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?((left-this.offset.click.left>=this.containment[0]&&left-this.offset.click.left<=this.containment[2])?left:((left-this.offset.click.left>=this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){if(counter===this.counter){this.refreshPositions(!hardRefresh)}})},_clear:function(event,noPropagation){this.reverting=false;var i,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(i in this._storedCSS){if(this._storedCSS[i]==="auto"||this._storedCSS[i]==="static"){this._storedCSS[i]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())})}if(this!==this.currentContainer){if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())});delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this))}}).call(this,this.currentContainer));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}).call(this,this.currentContainer))}}for(i=this.containers.length-1;i>=0;i--){if(!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this))}}).call(this,this.containers[i]))}if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this))}}).call(this,this.containers[i]));this.containers[i].containerCache.over=0}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(i=0;i")[0],colors,each=jQuery.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)";support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1;each(spaces,function(spaceName,space){space.cache="_"+spaceName;space.props.alpha={idx:3,type:"percent",def:1}});function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};if(value==null){return(allowEmpty||!prop.def)?null:prop.def}value=type.floor?~~value:parseFloat(value);if(isNaN(value)){return prop.def}if(type.mod){return(value+type.mod)%type.mod}return 0>value?0:type.maxtype.mod/2){startValue+=type.mod}else if(startValue-endValue>type.mod/2){startValue-=type.mod}}result[index]=clamp((endValue-startValue)*distance+startValue,prop)}});return this[spaceName](result)},blend:function(opaque){if(this._rgba[3]===1){return this}var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v}))},toRgbaString:function(){var prefix="rgba(",rgba=jQuery.map(this._rgba,function(v,i){return v==null?(i>2?1:0):v});if(rgba[3]===1){rgba.pop();prefix="rgb("}return prefix+rgba.join()+")"},toHslaString:function(){var prefix="hsla(",hsla=jQuery.map(this.hsla(),function(v,i){if(v==null){v=i>2?1:0}if(i&&i<3){v=Math.round(v*100)+"%"}return v});if(hsla[3]===1){hsla.pop();prefix="hsl("}return prefix+hsla.join()+")"},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();if(includeAlpha){rgba.push(~~(alpha*255))}return"#"+jQuery.map(rgba,function(v){v=(v||0).toString(16);return v.length===1?"0"+v:v}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});color.fn.parse.prototype=color.fn;function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6}if(h*2<1){return q}if(h*3<2){return p+(q-p)*((2/3)-h)*6}return p}spaces.hsla.to=function(rgba){if(rgba[0]==null||rgba[1]==null||rgba[2]==null){return[null,null,null,rgba[3]]}var r=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r,g,b),min=Math.min(r,g,b),diff=max-min,add=max+min,l=add*0.5,h,s;if(min===max){h=0}else if(r===max){h=(60*(g-b)/diff)+360}else if(g===max){h=(60*(b-r)/diff)+120}else{h=(60*(r-g)/diff)+240}if(diff===0){s=0}else if(l<=0.5){s=diff/add}else{s=diff/(2-add)}return[Math.round(h)%360,s,l,a==null?1:a]};spaces.hsla.from=function(hsla){if(hsla[0]==null||hsla[1]==null||hsla[2]==null){return[null,null,null,hsla[3]]}var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=l<=0.5?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(hue2rgb(p,q,h+(1/3))*255),Math.round(hue2rgb(p,q,h)*255),Math.round(hue2rgb(p,q,h-(1/3))*255),a]};each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]){this[cache]=to(this._rgba)}if(value===undefined){return this[cache].slice()}var ret,type=jQuery.type(value),arr=(type==="array"||type==="object")?value:arguments,local=this[cache].slice();each(props,function(key,prop){var val=arr[type==="object"?key:prop.idx];if(val==null){val=local[prop.idx]}local[prop.idx]=clamp(val,prop)});if(from){ret=color(from(local));ret[cache]=local;return ret}else{return color(local)}};each(props,function(key,prop){if(color.fn[key]){return}color.fn[key]=function(value){var vtype=jQuery.type(value),fn=(key==="alpha"?(this._hsla?"hsla":"rgba"):spaceName),local=this[fn](),cur=local[prop.idx],match;if(vtype==="undefined"){return cur}if(vtype==="function"){value=value.call(this,cur);vtype=jQuery.type(value)}if(value==null&&prop.empty){return this}if(vtype==="string"){match=rplusequals.exec(value);if(match){value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1)}}local[prop.idx]=value;return this[fn](local)}})});color.hook=function(hook){var hooks=hook.split(" ");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor="";if(value!=="transparent"&&(jQuery.type(value)!=="string"||(parsed=stringParse(value)))){value=color(parsed||value);if(!support.rgba&&value._rgba[3]!==1){curElem=hook==="backgroundColor"?elem.parentNode:elem;while((backgroundColor===""||backgroundColor==="transparent")&&curElem&&curElem.style){try{backgroundColor=jQuery.css(curElem,"backgroundColor");curElem=curElem.parentNode}catch(e){}}value=value.blend(backgroundColor&&backgroundColor!=="transparent"?backgroundColor:"_default")}value=value.toRgbaString()}try{elem.style[hook]=value}catch(e){}}};jQuery.fx.step[hook]=function(fx){if(!fx.colorInit){fx.start=color(fx.elem,hook);fx.end=color(fx.end);fx.colorInit=true}jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos))}})};color.hook(stepHooks);jQuery.cssHooks.borderColor={expand:function(value){var expanded={};each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value});return expanded}};colors=jQuery.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);(function(){var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){jQuery.style(fx.elem,prop,fx.end);fx.setAttr=true}}});function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]]){len=style.length;while(len--){key=style[len];if(typeof style[key]==="string"){styles[$.camelCase(key)]=style[key]}}}else{for(key in style){if(typeof style[key]==="string"){styles[key]=style[key]}}}return styles}function styleDifference(oldStyle,newStyle){var diff={},name,value;for(name in newStyle){value=newStyle[name];if(oldStyle[name]!==value){if(!shorthandStyles[name]){if($.fx.step[name]||!isNaN(parseFloat(value))){diff[name]=value}}}}return diff}if(!$.fn.addBack){$.fn.addBack=function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}}$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var animated=$(this),baseClass=animated.attr("class")||"",applyClassChange,allAnimations=o.children?animated.find("*").addBack():animated;allAnimations=allAnimations.map(function(){var el=$(this);return{el:el,start:getElementStyles(this)}});applyClassChange=function(){$.each(classAnimationActions,function(i,action){if(value[action]){animated[action+"Class"](value[action])}})};applyClassChange();allAnimations=allAnimations.map(function(){this.end=getElementStyles(this.el[0]);this.diff=styleDifference(this.start,this.end);return this});animated.attr("class",baseClass);allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:false,complete:function(){dfd.resolve(styleInfo)}});this.el.animate(this.diff,opts);return dfd.promise()});$.when.apply($,allAnimations.get()).done(function(){applyClassChange();$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"")})});o.complete.call(animated[0])})})};$.fn.extend({addClass:(function(orig){return function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments)}})($.fn.addClass),removeClass:(function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments)}})($.fn.removeClass),toggleClass:(function(orig){return function(classNames,force,speed,easing,callback){if(typeof force==="boolean"||force===undefined){if(!speed){return orig.apply(this,arguments)}else{return $.effects.animateClass.call(this,(force?{add:classNames}:{remove:classNames}),speed,easing,callback)}}else{return $.effects.animateClass.call(this,{toggle:classNames},force,speed,easing)}}})($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback)}})})();(function(){$.extend($.effects,{version:"1.10.2",save:function(element,set){for(var i=0;i").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id}catch(e){active=document.body}element.wrap(wrapper);if(element[0]===active||$.contains(element[0],active)){$(active).focus()}wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos],10))){props[pos]="auto"}});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}element.css(size);return wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$.contains(element[0],active)){$(active).focus()}}return element},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){var unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1]}});return value}});function _normalizeArguments(effect,options,speed,callback){if($.isPlainObject(effect)){options=effect;effect=effect.effect}effect={effect:effect};if(options==null){options={}}if($.isFunction(options)){callback=options;speed=null;options={}}if(typeof options==="number"||$.fx.speeds[options]){callback=speed;speed=options;options={}}if($.isFunction(speed)){callback=speed;speed=null}if(options){$.extend(effect,options)}speed=speed||options.duration;effect.duration=$.fx.off?0:typeof speed==="number"?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default;effect.complete=callback||options.complete;return effect}function standardAnimationOption(option){if(!option||typeof option==="number"||$.fx.speeds[option]){return true}if(typeof option==="string"&&!$.effects.effect[option]){return true}if($.isFunction(option)){return true}if(typeof option==="object"&&!option.effect){return true}return false}$.fn.extend({effect:function(){var args=_normalizeArguments.apply(this,arguments),mode=args.mode,queue=args.queue,effectMethod=$.effects.effect[args.effect];if($.fx.off||!effectMethod){if(mode){return this[mode](args.duration,args.complete)}else{return this.each(function(){if(args.complete){args.complete.call(this)}})}}function run(next){var elem=$(this),complete=args.complete,mode=args.mode;function done(){if($.isFunction(complete)){complete.call(elem[0])}if($.isFunction(next)){next()}}if(elem.is(":hidden")?mode==="hide":mode==="show"){elem[mode]();done()}else{effectMethod.call(elem[0],args,done)}}return queue===false?this.each(run):this.queue(queue||"fx",run)},show:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="show";return this.effect.call(this,args)}}})($.fn.show),hide:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="hide";return this.effect.call(this,args)}}})($.fn.hide),toggle:(function(orig){return function(option){if(standardAnimationOption(option)||typeof option==="boolean"){return orig.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args.mode="toggle";return this.effect.call(this,args)}}})($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit]}});return val}})})();(function(){var baseEasings={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2)}});$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2)},Circ:function(p){return 1-Math.sqrt(1-p*p)},Elastic:function(p){return p===0||p===1?p:-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15)},Back:function(p){return p*p*(3*p-2)},Bounce:function(p){var pow2,bounce=4;while(p<((pow2=Math.pow(2,--bounce))-1)/11){}return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2)}});$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn;$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p)};$.easing["easeInOut"+name]=function(p){return p<0.5?easeIn(p*2)/2:1-easeIn(p*-2+2)/2}})})()})(jQuery);(function($,undefined){var uid=0,hideProps={},showProps={};hideProps.height=hideProps.paddingTop=hideProps.paddingBottom=hideProps.borderTopWidth=hideProps.borderBottomWidth="hide";showProps.height=showProps.paddingTop=showProps.paddingBottom=showProps.borderTopWidth=showProps.borderBottomWidth="show";$.widget("ui.accordion",{version:"1.10.2",options:{active:0,animate:{},collapsible:false,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var options=this.options;this.prevShow=this.prevHide=$();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");if(!options.collapsible&&(options.active===false||options.active==null)){options.active=0}this._processPanels();if(options.active<0){options.active+=this.headers.length}this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:!this.active.length?$():this.active.next(),content:!this.active.length?$():this.active.next()}},_createIcons:function(){var icons=this.options.icons;if(icons){$("").addClass("ui-accordion-header-icon ui-icon "+icons.header).prependTo(this.headers);this.active.children(".ui-accordion-header-icon").removeClass(icons.header).addClass(icons.activeHeader);this.headers.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var contents;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){if(/^ui-accordion/.test(this.id)){this.removeAttribute("id")}});this._destroyIcons();contents=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){if(/^ui-accordion/.test(this.id)){this.removeAttribute("id")}});if(this.options.heightStyle!=="content"){contents.css("height","")}},_setOption:function(key,value){if(key==="active"){this._activate(value);return}if(key==="event"){if(this.options.event){this._off(this.headers,this.options.event)}this._setupEvents(value)}this._super(key,value);if(key==="collapsible"&&!value&&this.options.active===false){this._activate(0)}if(key==="icons"){this._destroyIcons();if(value){this._createIcons()}}if(key==="disabled"){this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!value)}},_keydown:function(event){if(event.altKey||event.ctrlKey){return}var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;case keyCode.HOME:toFocus=this.headers[0];break;case keyCode.END:toFocus=this.headers[length-1];break}if(toFocus){$(event.target).attr("tabIndex",-1);$(toFocus).attr("tabIndex",0);toFocus.focus();event.preventDefault()}},_panelKeyDown:function(event){if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){$(event.currentTarget).prev().focus()}},refresh:function(){var options=this.options;this._processPanels();if((options.active===false&&options.collapsible===true)||!this.headers.length){options.active=false;this.active=$()}if(options.active===false){this._activate(0)}else if(this.active.length&&!$.contains(this.element[0],this.active[0])){if(this.headers.length===this.headers.find(".ui-state-disabled").length){options.active=false;this.active=$()}else{this._activate(Math.max(0,options.active-1))}}else{options.active=this.headers.index(this.active)}this._destroyIcons();this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var maxHeight,options=this.options,heightStyle=options.heightStyle,parent=this.element.parent(),accordionId=this.accordionId="ui-accordion-"+(this.element.attr("id")||++uid);this.active=this._findActive(options.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(i){var header=$(this),headerId=header.attr("id"),panel=header.next(),panelId=panel.attr("id");if(!headerId){headerId=accordionId+"-header-"+i;header.attr("id",headerId)}if(!panelId){panelId=accordionId+"-panel-"+i;panel.attr("id",panelId)}header.attr("aria-controls",panelId);panel.attr("aria-labelledby",headerId)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex",0)}else{this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"})}this._createIcons();this._setupEvents(options.event);if(heightStyle==="fill"){maxHeight=parent.height();this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");if(position==="absolute"||position==="fixed"){return}maxHeight-=elem.outerHeight(true)});this.headers.each(function(){maxHeight-=$(this).outerHeight(true)});this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")}else if(heightStyle==="auto"){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).css("height","").height())}).height(maxHeight)}},_activate:function(index){var active=this._findActive(index)[0];if(active===this.active[0]){return}active=active||this.active[0];this._eventHandler({target:active,currentTarget:active,preventDefault:$.noop})},_findActive:function(selector){return typeof selector==="number"?this.headers.eq(selector):$()},_setupEvents:function(event){var events={keydown:"_keydown"};if(event){$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler"})}this._off(this.headers.add(this.headers.next()));this._on(this.headers,events);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(event){var options=this.options,active=this.active,clicked=$(event.currentTarget),clickedIsActive=clicked[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():clicked.next(),toHide=active.next(),eventData={oldHeader:active,oldPanel:toHide,newHeader:collapsing?$():clicked,newPanel:toShow};event.preventDefault();if((clickedIsActive&&!options.collapsible)||(this._trigger("beforeActivate",event,eventData)===false)){return}options.active=collapsing?false:this.headers.index(clicked);this.active=clickedIsActive?$():clicked;this._toggle(eventData);active.removeClass("ui-accordion-header-active ui-state-active");if(options.icons){active.children(".ui-accordion-header-icon").removeClass(options.icons.activeHeader).addClass(options.icons.header)}if(!clickedIsActive){clicked.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top");if(options.icons){clicked.children(".ui-accordion-header-icon").removeClass(options.icons.header).addClass(options.icons.activeHeader)}clicked.next().addClass("ui-accordion-content-active")}},_toggle:function(data){var toShow=data.newPanel,toHide=this.prevShow.length?this.prevShow:data.oldPanel;this.prevShow.add(this.prevHide).stop(true,true);this.prevShow=toShow;this.prevHide=toHide;if(this.options.animate){this._animate(toShow,toHide,data)}else{toHide.hide();toShow.show();this._toggleComplete(data)}toHide.attr({"aria-expanded":"false","aria-hidden":"true"});toHide.prev().attr("aria-selected","false");if(toShow.length&&toHide.length){toHide.prev().attr("tabIndex",-1)}else if(toShow.length){this.headers.filter(function(){return $(this).attr("tabIndex")===0}).attr("tabIndex",-1)}toShow.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(toShow,toHide,data){var total,easing,duration,that=this,adjust=0,down=toShow.length&&(!toHide.length||(toShow.index()",options:{appendTo:null,autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea=nodeName==="textarea",isInput=nodeName==="input";this.isMultiLine=isTextarea?true:isInput?false:this.element.prop("isContentEditable");this.valueMethod=this.element[isTextarea||isInput?"val":"text"];this.isNewMenu=true;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly")){suppressKeyPress=true;suppressInput=true;suppressKeyPressRepeat=true;return}suppressKeyPress=false;suppressInput=false;suppressKeyPressRepeat=false;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=true;this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=true;this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=true;this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=true;this._keyEvent("next",event);break;case keyCode.ENTER:case keyCode.NUMPAD_ENTER:if(this.menu.active){suppressKeyPress=true;event.preventDefault();this.menu.select(event)}break;case keyCode.TAB:if(this.menu.active){this.menu.select(event)}break;case keyCode.ESCAPE:if(this.menu.element.is(":visible")){this._value(this.term);this.close(event);event.preventDefault()}break;default:suppressKeyPressRepeat=true;this._searchTimeout(event);break}},keypress:function(event){if(suppressKeyPress){suppressKeyPress=false;event.preventDefault();return}if(suppressKeyPressRepeat){return}var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event);break}},input:function(event){if(suppressInput){suppressInput=false;event.preventDefault();return}this._searchTimeout(event)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching);this.close(event);this._change(event)}});this._initSource();this.menu=$("
      ").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({input:$(),role:null}).hide().data("ui-menu");this._on(this.menu.element,{mousedown:function(event){event.preventDefault();this.cancelBlur=true;this._delay(function(){delete this.cancelBlur});var menuElement=this.menu.element[0];if(!$(event.target).closest(".ui-menu-item").length){this._delay(function(){var that=this;this.document.one("mousedown",function(event){if(event.target!==that.element[0]&&event.target!==menuElement&&!$.contains(menuElement,event.target)){that.close()}})})}},menufocus:function(event,ui){if(this.isNewMenu){this.isNewMenu=false;if(event.originalEvent&&/^mouse/.test(event.originalEvent.type)){this.menu.blur();this.document.one("mousemove",function(){$(event.target).trigger(event.originalEvent)});return}}var item=ui.item.data("ui-autocomplete-item");if(false!==this._trigger("focus",event,{item:item})){if(event.originalEvent&&/^key/.test(event.originalEvent.type)){this._value(item.value)}}else{this.liveRegion.text(item.value)}},menuselect:function(event,ui){var item=ui.item.data("ui-autocomplete-item"),previous=this.previous;if(this.element[0]!==this.document[0].activeElement){this.element.focus();this.previous=previous;this._delay(function(){this.previous=previous;this.selectedItem=item})}if(false!==this._trigger("select",event,{item:item})){this._value(item.value)}this.term=this._value();this.close(event);this.selectedItem=item}});this.liveRegion=$("",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element);this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(key,value){this._super(key,value);if(key==="source"){this._initSource()}if(key==="appendTo"){this.menu.element.appendTo(this._appendTo())}if(key==="disabled"&&value&&this.xhr){this.xhr.abort()}},_appendTo:function(){var element=this.options.appendTo;if(element){element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)}if(!element){element=this.element.closest(".ui-front")}if(!element.length){element=this.document[0].body}return element},_initSource:function(){var array,url,that=this;if($.isArray(this.options.source)){array=this.options.source;this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term))}}else if(typeof this.options.source==="string"){url=this.options.source;this.source=function(request,response){if(that.xhr){that.xhr.abort()}that.xhr=$.ajax({url:url,data:request,dataType:"json",success:function(data){response(data)},error:function(){response([])}})}}else{this.source=this.options.source}},_searchTimeout:function(event){clearTimeout(this.searching);this.searching=this._delay(function(){if(this.term!==this._value()){this.selectedItem=null;this.search(null,event)}},this.options.delay)},search:function(value,event){value=value!=null?value:this._value();this.term=this._value();if(value.length").append($("").text(item.label)).appendTo(ul)},_move:function(direction,event){if(!this.menu.element.is(":visible")){this.search(null,event);return}if(this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)){this._value(this.term);this.menu.blur();return}this.menu[direction](event)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(keyEvent,event){if(!this.isMultiLine||this.menu.element.is(":visible")){this._move(keyEvent,event);event.preventDefault()}}});$.extend($.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value){return matcher.test(value.label||value.value||value)})}});$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(content){var message;this._superApply(arguments);if(this.options.disabled||this.cancelSearch){return}if(content&&content.length){message=this.options.messages.results(content.length)}else{message=this.options.messages.noResults}this.liveRegion.text(message)}})}(jQuery));(function($,undefined){var lastActive,startXPos,startYPos,clickDragged,baseClasses="ui-button ui-widget ui-state-default ui-corner-all",stateClasses="ui-state-hover ui-state-active ",typeClasses="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",formResetHandler=function(){var buttons=$(this).find(":ui-button");setTimeout(function(){buttons.button("refresh")},1)},radioGroup=function(radio){var name=radio.name,form=radio.form,radios=$([]);if(name){name=name.replace(/'/g,"\\'");if(form){radios=$(form).find("[name='"+name+"']")}else{radios=$("[name='"+name+"']",radio.ownerDocument).filter(function(){return!this.form})}}return radios};$.widget("ui.button",{version:"1.10.2",defaultElement:"").addClass(this._triggerClass).html(!buttonImage?buttonText:$("").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]){$.datepicker._hideDatepicker()}else if($.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]){$.datepicker._hideDatepicker();$.datepicker._showDatepicker(input[0])}else{$.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var findMax,max,maxI,i,date=new Date(2009,12-1,20),dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){findMax=function(names){max=0;maxI=0;for(i=0;imax){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv);$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);if(inst.settings.disabled){this._disableDatepicker(target)}inst.dpDiv.css("display","block")},_dialogDatepicker:function(input,date,onSelect,settings,pos){var id,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;if(!inst){this.uuid+=1;id="dp"+this.uuid;this._dialogInput=$("");this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=(date&&date.constructor===Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){browserWidth=document.documentElement.clientWidth;browserHeight=document.documentElement.clientHeight;scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var nodeName,$target=$(target),inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName==="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(nodeName==="div"||nodeName==="span"){$target.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value===target?null:value)})},_disableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value===target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_doKeyUp:function(event){var date,inst=$.datepicker._getInst(event.target);if(inst.input.val()!==inst.lastVal){try{date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(err){}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!=="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput===input){return}var inst,beforeShow,beforeShowSettings,isFixed,offset,showAnim,duration;inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!==inst){$.datepicker._curInst.dpDiv.stop(true,true);if(inst&&$.datepicker._datepickerShowing){$.datepicker._hideDatepicker($.datepicker._curInst.input[0])}}beforeShow=$.datepicker._get(inst,"beforeShow");beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};if(beforeShowSettings===false){return}extendRemove(inst.settings,beforeShowSettings);inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")==="fixed";return!isFixed});offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){showAnim=$.datepicker._get(inst,"showAnim");duration=$.datepicker._get(inst,"duration");inst.dpDiv.zIndex($(input).zIndex()+1);$.datepicker._datepickerShowing=true;if($.effects&&$.effects.effect[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration)}else{inst.dpDiv[showAnim||"show"](showAnim?duration:null)}if(inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){this.maxRows=4;instActive=inst;inst.dpDiv.empty().append(this._generateHTML(inst));this._attachHandlers(inst);inst.dpDiv.find("."+this._dayOverClass+" a").mouseover();var origyearshtml,numMonths=this._getNumberOfMonths(inst),cols=numMonths[1],width=17;inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}inst.dpDiv[(numMonths[0]!==1||numMonths[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&inst.input[0]!==document.activeElement){inst.input.focus()}if(inst.yearshtml){origyearshtml=inst.yearshtml;setTimeout(function(){if(origyearshtml===inst.yearshtml&&inst.yearshtml){inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml)}origyearshtml=inst.yearshtml=null},0)}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth(),dpHeight=inst.dpDiv.outerHeight(),inputWidth=inst.input?inst.input.outerWidth():0,inputHeight=inst.input?inst.input.outerHeight():0,viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left===inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top===(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var position,inst=this._getInst(obj),isRTL=this._get(inst,"isRTL");while(obj&&(obj.type==="hidden"||obj.nodeType!==1||$.expr.filters.hidden(obj))){obj=obj[isRTL?"previousSibling":"nextSibling"]}position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input){var showAnim,duration,postProcess,onClose,inst=this._curInst;if(!inst||(input&&inst!==$.data(input,PROP_NAME))){return}if(this._datepickerShowing){showAnim=this._get(inst,"showAnim");duration=this._get(inst,"duration");postProcess=function(){$.datepicker._tidyDialog(inst)};if($.effects&&($.effects.effect[showAnim]||$.effects[showAnim])){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(showAnim==="slideDown"?"slideUp":(showAnim==="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}this._datepickerShowing=false;onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target),inst=$.datepicker._getInst($target[0]);if((($target[0].id!==$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length===0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)))||($target.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!==inst)){$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id),inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period==="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var date,target=$(id),inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id),inst=this._getInst(target[0]);inst["selected"+(period==="M"?"Month":"Year")]=inst["draw"+(period==="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_selectDay:function(id,month,year,td){var inst,target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id){var target=$(id);this._selectDate(target,"")},_selectDate:function(id,dateStr){var onSelect,target=$(id),inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else if(inst.input){inst.input.trigger("change")}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!=="object"){inst.input.focus()}this._lastInput=null}},_updateAlternate:function(inst){var altFormat,date,dateStr,altField=this._get(inst,"altField");if(altField){altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var time,checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments";}value=(typeof value==="object"?value.toString():value+"");if(value===""){return null}var iFormat,dim,extra,iValue=0,shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,shortYearCutoff=(typeof shortYearCutoffTemp!=="string"?shortYearCutoffTemp:new Date().getFullYear()%100+parseInt(shortYearCutoffTemp,10)),dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,year=-1,month=-1,day=-1,doy=-1,literal=false,date,lookAhead=function(match){var matches=(iFormat+1-1){month=1;day=doy;do{dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day){throw"Invalid date";}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""}var iFormat,dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,lookAhead=function(match){var matches=(iFormat+112?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!date,origMonth=inst.selectedMonth,origYear=inst.selectedYear,newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!==inst.selectedMonth||origYear!==inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()==="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_attachHandlers:function(inst){var stepMonths=this._get(inst,"stepMonths"),id="#"+inst.id.replace(/\\\\/g,"\\");inst.dpDiv.find("[data-handler]").map(function(){var handler={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(id,-stepMonths,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(id,+stepMonths,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(id)},selectDay:function(){window["DP_jQuery_"+dpuuid].datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false},selectMonth:function(){window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(id,this,"M");return false},selectYear:function(){window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(id,this,"Y");return false}};$(this).bind(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")])})},_generateHTML:function(inst){var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,monthNames,monthNamesShort,beforeShowDay,showOtherMonths,selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow,tbody,daySettings,otherMonth,unselectable,tempDate=new Date(),today=this._daylightSavingAdjust(new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),isRTL=this._get(inst,"isRTL"),showButtonPanel=this._get(inst,"showButtonPanel"),hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,"showCurrentAtPos"),stepMonths=this._get(inst,"stepMonths"),isMultiMonth=(numMonths[0]!==1||numMonths[1]!==1),currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay))),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?""+prevText+"":(hideIfNoPrevNext?"":""+prevText+""));nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?""+nextText+"":(hideIfNoPrevNext?"":""+nextText+""));currentText=this._get(inst,"currentText");gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));controls=(!inst.inline?"":"");buttonPanel=(showButtonPanel)?"
      "+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?"":"")+(isRTL?"":controls)+"
      ":"";firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);showWeek=this._get(inst,"showWeek");dayNames=this._get(inst,"dayNames");dayNamesMin=this._get(inst,"dayNamesMin");monthNames=this._get(inst,"monthNames");monthNamesShort=this._get(inst,"monthNamesShort");beforeShowDay=this._get(inst,"beforeShowDay");showOtherMonths=this._get(inst,"showOtherMonths");selectOtherMonths=this._get(inst,"selectOtherMonths");defaultDate=this._getDefaultDate(inst);html="";dow;for(row=0;row1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+="'>"}calender+="
      "+(/all|left/.test(cornerClass)&&row===0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row===0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+"
      "+"";thead=(showWeek?"":"");for(dow=0;dow<7;dow++){day=(dow+firstDay)%7;thead+="=5?" class='ui-datepicker-week-end'":"")+">"+""+dayNamesMin[day]+""}calender+=thead+"";daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;curRows=Math.ceil((leadDays+daysInMonth)/7);numRows=(isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows);this.maxRows=numRows;printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(dRow=0;dRow";tbody=(!showWeek?"":"");for(dow=0;dow<7;dow++){daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);otherMonth=(printDate.getMonth()!==drawMonth);unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDatemaxDate);tbody+="";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
      "+this._get(inst,"weekHeader")+"
      "+this._get(inst,"calculateWeek")(printDate)+""+(otherMonth&&!showOtherMonths?" ":(unselectable?""+printDate.getDate()+"":""+printDate.getDate()+""))+"
      "+(isMultiMonth?""+((numMonths[0]>0&&col===numMonths[1]-1)?"
      ":""):"");group+=calender}html+=group}html+=buttonPanel;inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,changeMonth=this._get(inst,"changeMonth"),changeYear=this._get(inst,"changeYear"),showMonthAfterYear=this._get(inst,"showMonthAfterYear"),html="
      ",monthHtml="";if(secondary||!changeMonth){monthHtml+=""+monthNames[drawMonth]+""}else{inMinYear=(minDate&&minDate.getFullYear()===drawYear);inMaxYear=(maxDate&&maxDate.getFullYear()===drawYear);monthHtml+=""}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?" ":"")}if(!inst.yearshtml){inst.yearshtml="";if(secondary||!changeYear){html+=""+drawYear+""}else{years=this._get(inst,"yearRange").split(":");thisYear=new Date().getFullYear();determineYear=function(value){var year=(value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+\-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year)};year=determineYear(years[0]);endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);inst.yearshtml+="";html+=inst.yearshtml;inst.yearshtml=null}}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?" ":"")+monthHtml}html+="
      ";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period==="Y"?offset:0),month=inst.drawMonth+(period==="M"?offset:0),day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period==="D"?offset:0),date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period==="M"||period==="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),newDate=(minDate&&datemaxDate?maxDate:newDate)},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths==="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst),date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var yearSplit,currentYear,minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),minYear=null,maxYear=null,years=this._get(inst,"yearRange");if(years){yearSplit=years.split(":");currentYear=new Date().getFullYear();minYear=parseInt(yearSplit[0],10);maxYear=parseInt(yearSplit[1],10);if(yearSplit[0].match(/[+\-].*/)){minYear+=currentYear}if(yearSplit[1].match(/[+\-].*/)){maxYear+=currentYear}}return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())&&(!minYear||date.getFullYear()>=minYear)&&(!maxYear||date.getFullYear()<=maxYear))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!=="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day==="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.delegate(selector,"mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){$(this).removeClass("ui-datepicker-next-hover")}}).delegate(selector,"mouseover",function(){if(!$.datepicker._isDisabledDatepicker(instActive.inline?dpDiv.parent()[0]:instActive.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){$(this).addClass("ui-datepicker-next-hover")}}})}function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=props[name]}}return target}$.fn.datepicker=function(options){if(!this.length){return this}if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick);$.datepicker.initialized=true}if($("#"+$.datepicker._mainDivId).length===0){$("body").append($.datepicker.dpDiv)}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options==="string"&&(options==="isDisabled"||options==="getDate"||options==="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options==="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.10.2";window["DP_jQuery_"+dpuuid]=$})(jQuery);(function($,undefined){var sizeRelatedOptions={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},resizableRelatedOptions={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};$.widget("ui.dialog",{version:"1.10.2",options:{appendTo:"body",autoOpen:true,buttons:[],closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(pos){var topOffset=$(this).css(pos).offset().top;if(topOffset<0){$(this).css("top",pos.top-topOffset)}}},resizable:true,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();if(this.options.draggable&&$.fn.draggable){this._makeDraggable()}if(this.options.resizable&&$.fn.resizable){this._makeResizable()}this._isOpen=false},_init:function(){if(this.options.autoOpen){this.open()}},_appendTo:function(){var element=this.options.appendTo;if(element&&(element.jquery||element.nodeType)){return $(element)}return this.document.find(element||"body").eq(0)},_destroy:function(){var next,originalPosition=this.originalPosition;this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(true,true).remove();if(this.originalTitle){this.element.attr("title",this.originalTitle)}next=originalPosition.parent.children().eq(originalPosition.index);if(next.length&&next[0]!==this.element[0]){next.before(this.element)}else{originalPosition.parent.append(this.element)}},widget:function(){return this.uiDialog},disable:$.noop,enable:$.noop,close:function(event){var that=this;if(!this._isOpen||this._trigger("beforeClose",event)===false){return}this._isOpen=false;this._destroyOverlay();if(!this.opener.filter(":focusable").focus().length){$(this.document[0].activeElement).blur()}this._hide(this.uiDialog,this.options.hide,function(){that._trigger("close",event)})},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(event,silent){var moved=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;if(moved&&!silent){this._trigger("focus",event)}return moved},open:function(){var that=this;if(this._isOpen){if(this._moveToTop()){this._focusTabbable()}return}this._isOpen=true;this.opener=$(this.document[0].activeElement);this._size();this._position();this._createOverlay();this._moveToTop(null,true);this._show(this.uiDialog,this.options.show,function(){that._focusTabbable();that._trigger("focus")});this._trigger("open")},_focusTabbable:function(){var hasFocus=this.element.find("[autofocus]");if(!hasFocus.length){hasFocus=this.element.find(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialogButtonPane.find(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialogTitlebarClose.filter(":tabbable")}if(!hasFocus.length){hasFocus=this.uiDialog}hasFocus.eq(0).focus()},_keepFocus:function(event){function checkFocus(){var activeElement=this.document[0].activeElement,isActive=this.uiDialog[0]===activeElement||$.contains(this.uiDialog[0],activeElement);if(!isActive){this._focusTabbable()}}event.preventDefault();checkFocus.call(this);this._delay(checkFocus)},_createWrapper:function(){this.uiDialog=$("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(event){if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE){event.preventDefault();this.close(event);return}if(event.keyCode!==$.ui.keyCode.TAB){return}var tabbables=this.uiDialog.find(":tabbable"),first=tabbables.filter(":first"),last=tabbables.filter(":last");if((event.target===last[0]||event.target===this.uiDialog[0])&&!event.shiftKey){first.focus(1);event.preventDefault()}else if((event.target===first[0]||event.target===this.uiDialog[0])&&event.shiftKey){last.focus(1);event.preventDefault()}},mousedown:function(event){if(this._moveToTop(event)){this._focusTabbable()}}});if(!this.element.find("[aria-describedby]").length){this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})}},_createTitlebar:function(){var uiDialogTitle;this.uiDialogTitlebar=$("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(event){if(!$(event.target).closest(".ui-dialog-titlebar-close")){this.uiDialog.focus()}}});this.uiDialogTitlebarClose=$("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:false}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(event){event.preventDefault();this.close(event)}});uiDialogTitle=$("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(uiDialogTitle);this.uiDialog.attr({"aria-labelledby":uiDialogTitle.attr("id")})},_title:function(title){if(!this.options.title){title.html(" ")}title.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=$("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=$("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var that=this,buttons=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();if($.isEmptyObject(buttons)||($.isArray(buttons)&&!buttons.length)){this.uiDialog.removeClass("ui-dialog-buttons");return}$.each(buttons,function(name,props){var click,buttonOptions;props=$.isFunction(props)?{click:props,text:name}:props;props=$.extend({type:"button"},props);click=props.click;props.click=function(){click.apply(that.element[0],arguments)};buttonOptions={icons:props.icons,text:props.showText};delete props.icons;delete props.showText;$("",props).button(buttonOptions).appendTo(that.uiButtonSet)});this.uiDialog.addClass("ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){var that=this,options=this.options;function filteredUi(ui){return{position:ui.position,offset:ui.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(event,ui){$(this).addClass("ui-dialog-dragging");that._blockFrames();that._trigger("dragStart",event,filteredUi(ui))},drag:function(event,ui){that._trigger("drag",event,filteredUi(ui))},stop:function(event,ui){options.position=[ui.position.left-that.document.scrollLeft(),ui.position.top-that.document.scrollTop()];$(this).removeClass("ui-dialog-dragging");that._unblockFrames();that._trigger("dragStop",event,filteredUi(ui))}})},_makeResizable:function(){var that=this,options=this.options,handles=options.resizable,position=this.uiDialog.css("position"),resizeHandles=typeof handles==="string"?handles:"n,e,s,w,se,sw,ne,nw";function filteredUi(ui){return{originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:this._minHeight(),handles:resizeHandles,start:function(event,ui){$(this).addClass("ui-dialog-resizing");that._blockFrames();that._trigger("resizeStart",event,filteredUi(ui))},resize:function(event,ui){that._trigger("resize",event,filteredUi(ui))},stop:function(event,ui){options.height=$(this).height();options.width=$(this).width();$(this).removeClass("ui-dialog-resizing");that._unblockFrames();that._trigger("resizeStop",event,filteredUi(ui))}}).css("position",position)},_minHeight:function(){var options=this.options;return options.height==="auto"?options.minHeight:Math.min(options.minHeight,options.height)},_position:function(){var isVisible=this.uiDialog.is(":visible");if(!isVisible){this.uiDialog.show()}this.uiDialog.position(this.options.position);if(!isVisible){this.uiDialog.hide()}},_setOptions:function(options){var that=this,resize=false,resizableOptions={};$.each(options,function(key,value){that._setOption(key,value);if(key in sizeRelatedOptions){resize=true}if(key in resizableRelatedOptions){resizableOptions[key]=value}});if(resize){this._size();this._position()}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option",resizableOptions)}},_setOption:function(key,value){var isDraggable,isResizable,uiDialog=this.uiDialog;if(key==="dialogClass"){uiDialog.removeClass(this.options.dialogClass).addClass(value)}if(key==="disabled"){return}this._super(key,value);if(key==="appendTo"){this.uiDialog.appendTo(this._appendTo())}if(key==="buttons"){this._createButtons()}if(key==="closeText"){this.uiDialogTitlebarClose.button({label:""+value})}if(key==="draggable"){isDraggable=uiDialog.is(":data(ui-draggable)");if(isDraggable&&!value){uiDialog.draggable("destroy")}if(!isDraggable&&value){this._makeDraggable()}}if(key==="position"){this._position()}if(key==="resizable"){isResizable=uiDialog.is(":data(ui-resizable)");if(isResizable&&!value){uiDialog.resizable("destroy")}if(isResizable&&typeof value==="string"){uiDialog.resizable("option","handles",value)}if(!isResizable&&value!==false){this._makeResizable()}}if(key==="title"){this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))}},_size:function(){var nonContentHeight,minContentHeight,maxContentHeight,options=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});if(options.minWidth>options.width){options.width=options.minWidth}nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).outerHeight();minContentHeight=Math.max(0,options.minHeight-nonContentHeight);maxContentHeight=typeof options.maxHeight==="number"?Math.max(0,options.maxHeight-nonContentHeight):"none";if(options.height==="auto"){this.element.css({minHeight:minContentHeight,maxHeight:maxContentHeight,height:"auto"})}else{this.element.height(Math.max(0,options.height-nonContentHeight))}if(this.uiDialog.is(":data(ui-resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var iframe=$(this);return $("
      ").css({position:"absolute",width:iframe.outerWidth(),height:iframe.outerHeight()}).appendTo(iframe.parent()).offset(iframe.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_allowInteraction:function(event){if($(event.target).closest(".ui-dialog").length){return true}return!!$(event.target).closest(".ui-datepicker").length},_createOverlay:function(){if(!this.options.modal){return}var that=this,widgetFullName=this.widgetFullName;if(!$.ui.dialog.overlayInstances){this._delay(function(){if($.ui.dialog.overlayInstances){this.document.bind("focusin.dialog",function(event){if(!that._allowInteraction(event)){event.preventDefault();$(".ui-dialog:visible:last .ui-dialog-content").data(widgetFullName)._focusTabbable()}})}})}this.overlay=$("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});$.ui.dialog.overlayInstances++},_destroyOverlay:function(){if(!this.options.modal){return}if(this.overlay){$.ui.dialog.overlayInstances--;if(!$.ui.dialog.overlayInstances){this.document.unbind("focusin.dialog")}this.overlay.remove();this.overlay=null}}});$.ui.dialog.overlayInstances=0;if($.uiBackCompat!==false){$.widget("ui.dialog",$.ui.dialog,{_position:function(){var position=this.options.position,myAt=[],offset=[0,0],isVisible;if(position){if(typeof position==="string"||(typeof position==="object"&&"0"in position)){myAt=position.split?position.split(" "):[position[0],position[1]];if(myAt.length===1){myAt[1]=myAt[0]}$.each(["left","top"],function(i,offsetPosition){if(+myAt[i]===myAt[i]){offset[i]=myAt[i];myAt[i]=offsetPosition}});position={my:myAt[0]+(offset[0]<0?offset[0]:"+"+offset[0])+" "+myAt[1]+(offset[1]<0?offset[1]:"+"+offset[1]),at:myAt.join(" ")}}position=$.extend({},$.ui.dialog.prototype.options.position,position)}else{position=$.ui.dialog.prototype.options.position}isVisible=this.uiDialog.is(":visible");if(!isVisible){this.uiDialog.show()}this.uiDialog.position(position);if(!isVisible){this.uiDialog.hide()}}})}}(jQuery));(function($,undefined){var rvertical=/up|down|vertical/,rpositivemotion=/up|left|vertical|horizontal/;$.effects.effect.blind=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),direction=o.direction||"up",vertical=rvertical.test(direction),ref=vertical?"height":"width",ref2=vertical?"top":"left",motion=rpositivemotion.test(direction),animation={},show=mode==="show",wrapper,distance,margin;if(el.parent().is(".ui-effects-wrapper")){$.effects.save(el.parent(),props)}else{$.effects.save(el,props)}el.show();wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});distance=wrapper[ref]();margin=parseFloat(wrapper.css(ref2))||0;animation[ref]=show?distance:0;if(!motion){el.css(vertical?"bottom":"right",0).css(vertical?"top":"left","auto").css({position:"absolute"});animation[ref2]=show?margin:distance+margin}if(show){wrapper.css(ref,0);if(!motion){wrapper.css(ref2,margin+distance)}}wrapper.animate(animation,{duration:o.duration,easing:o.easing,queue:false,complete:function(){if(mode==="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);done()}})}})(jQuery);(function($,undefined){$.effects.effect.bounce=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"effect"),hide=mode==="hide",show=mode==="show",direction=o.direction||"up",distance=o.distance,times=o.times||5,anims=times*2+(show||hide?1:0),speed=o.duration/anims,easing=o.easing,ref=(direction==="up"||direction==="down")?"top":"left",motion=(direction==="up"||direction==="left"),i,upAnim,downAnim,queue=el.queue(),queuelen=queue.length;if(show||hide){props.push("opacity")}$.effects.save(el,props);el.show();$.effects.createWrapper(el);if(!distance){distance=el[ref==="top"?"outerHeight":"outerWidth"]()/3}if(show){downAnim={opacity:1};downAnim[ref]=0;el.css("opacity",0).css(ref,motion?-distance*2:distance*2).animate(downAnim,speed,easing)}if(hide){distance=distance/Math.pow(2,times-1)}downAnim={};downAnim[ref]=0;for(i=0;i1){queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1)))}el.dequeue()}})(jQuery);(function($,undefined){$.effects.effect.clip=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show=mode==="show",direction=o.direction||"vertical",vert=direction==="vertical",size=vert?"height":"width",position=vert?"top":"left",animation={},wrapper,animate,distance;$.effects.save(el,props);el.show();wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});animate=(el[0].tagName==="IMG")?wrapper:el;distance=animate[size]();if(show){animate.css(size,0);animate.css(position,distance/2)}animation[size]=show?distance:0;animation[position]=show?0:distance/2;animate.animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(!show){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);done()}})}})(jQuery);(function($,undefined){$.effects.effect.drop=function(o,done){var el=$(this),props=["position","top","bottom","left","right","opacity","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show=mode==="show",direction=o.direction||"left",ref=(direction==="up"||direction==="down")?"top":"left",motion=(direction==="up"||direction==="left")?"pos":"neg",animation={opacity:show?1:0},distance;$.effects.save(el,props);el.show();$.effects.createWrapper(el);distance=o.distance||el[ref==="top"?"outerHeight":"outerWidth"](true)/2;if(show){el.css("opacity",0).css(ref,motion==="pos"?-distance:distance)}animation[ref]=(show?(motion==="pos"?"+=":"-="):(motion==="pos"?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);done()}})}})(jQuery);(function($,undefined){$.effects.effect.explode=function(o,done){var rows=o.pieces?Math.round(Math.sqrt(o.pieces)):3,cells=rows,el=$(this),mode=$.effects.setMode(el,o.mode||"hide"),show=mode==="show",offset=el.show().css("visibility","hidden").offset(),width=Math.ceil(el.outerWidth()/cells),height=Math.ceil(el.outerHeight()/rows),pieces=[],i,j,left,top,mx,my;function childComplete(){pieces.push(this);if(pieces.length===rows*cells){animComplete()}}for(i=0;i
      ").css({position:"absolute",visibility:"visible",left:-j*width,top:-i*height}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width,height:height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},o.duration||500,o.easing,childComplete)}}function animComplete(){el.css({visibility:"visible"});$(pieces).remove();if(!show){el.hide()}done()}}})(jQuery);(function($,undefined){$.effects.effect.fade=function(o,done){var el=$(this),mode=$.effects.setMode(el,o.mode||"toggle");el.animate({opacity:mode},{queue:false,duration:o.duration,easing:o.easing,complete:done})}})(jQuery);(function($,undefined){$.effects.effect.fold=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show=mode==="show",hide=mode==="hide",size=o.size||15,percent=/([0-9]+)%/.exec(size),horizFirst=!!o.horizFirst,widthFirst=show!==horizFirst,ref=widthFirst?["width","height"]:["height","width"],duration=o.duration/2,wrapper,distance,animation1={},animation2={};$.effects.save(el,props);el.show();wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()];if(percent){size=parseInt(percent[1],10)/100*distance[hide?0:1]}if(show){wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0})}animation1[ref[0]]=show?distance[0]:size;animation2[ref[1]]=show?distance[1]:0;wrapper.animate(animation1,duration,o.easing).animate(animation2,duration,o.easing,function(){if(hide){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);done()})}})(jQuery);(function($,undefined){$.effects.effect.highlight=function(o,done){var elem=$(this),props=["backgroundImage","backgroundColor","opacity"],mode=$.effects.setMode(elem,o.mode||"show"),animation={backgroundColor:elem.css("backgroundColor")};if(mode==="hide"){animation.opacity=0}$.effects.save(elem,props);elem.show().css({backgroundImage:"none",backgroundColor:o.color||"#ffff99"}).animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide"){elem.hide()}$.effects.restore(elem,props);done()}})}})(jQuery);(function($,undefined){$.effects.effect.pulsate=function(o,done){var elem=$(this),mode=$.effects.setMode(elem,o.mode||"show"),show=mode==="show",hide=mode==="hide",showhide=(show||mode==="hide"),anims=((o.times||5)*2)+(showhide?1:0),duration=o.duration/anims,animateTo=0,queue=elem.queue(),queuelen=queue.length,i;if(show||!elem.is(":visible")){elem.css("opacity",0).show();animateTo=1}for(i=1;i1){queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1)))}elem.dequeue()}})(jQuery);(function($,undefined){$.effects.effect.puff=function(o,done){var elem=$(this),mode=$.effects.setMode(elem,o.mode||"hide"),hide=mode==="hide",percent=parseInt(o.percent,10)||150,factor=percent/100,original={height:elem.height(),width:elem.width(),outerHeight:elem.outerHeight(),outerWidth:elem.outerWidth()};$.extend(o,{effect:"scale",queue:false,fade:true,mode:mode,complete:done,percent:hide?percent:100,from:hide?original:{height:original.height*factor,width:original.width*factor,outerHeight:original.outerHeight*factor,outerWidth:original.outerWidth*factor}});elem.effect(o)};$.effects.effect.scale=function(o,done){var el=$(this),options=$.extend(true,{},o),mode=$.effects.setMode(el,o.mode||"effect"),percent=parseInt(o.percent,10)||(parseInt(o.percent,10)===0?0:(mode==="hide"?0:100)),direction=o.direction||"both",origin=o.origin,original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()},factor={y:direction!=="horizontal"?(percent/100):1,x:direction!=="vertical"?(percent/100):1};options.effect="size";options.queue=false;options.complete=done;if(mode!=="effect"){options.origin=origin||["middle","center"];options.restore=true}options.from=o.from||(mode==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:original);options.to={height:original.height*factor.y,width:original.width*factor.x,outerHeight:original.outerHeight*factor.y,outerWidth:original.outerWidth*factor.x};if(options.fade){if(mode==="show"){options.from.opacity=0;options.to.opacity=1}if(mode==="hide"){options.from.opacity=1;options.to.opacity=0}}el.effect(options)};$.effects.effect.size=function(o,done){var original,baseline,factor,el=$(this),props0=["position","top","bottom","left","right","width","height","overflow","opacity"],props1=["position","top","bottom","left","right","overflow","opacity"],props2=["width","height","overflow"],cProps=["fontSize"],vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],mode=$.effects.setMode(el,o.mode||"effect"),restore=o.restore||mode!=="effect",scale=o.scale||"both",origin=o.origin||["middle","center"],position=el.css("position"),props=restore?props0:props1,zero={height:0,width:0,outerHeight:0,outerWidth:0};if(mode==="show"){el.show()}original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()};if(o.mode==="toggle"&&mode==="show"){el.from=o.to||zero;el.to=o.from||original}else{el.from=o.from||(mode==="show"?zero:original);el.to=o.to||(mode==="hide"?zero:original)}factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale==="box"||scale==="both"){if(factor.from.y!==factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to)}if(factor.from.x!==factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to)}}if(scale==="content"||scale==="both"){if(factor.from.y!==factor.to.y){props=props.concat(cProps).concat(props2);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to)}}$.effects.save(el,props);el.show();$.effects.createWrapper(el);el.css("overflow","hidden").css(el.from);if(origin){baseline=$.effects.getBaseline(origin,original);el.from.top=(original.outerHeight-el.outerHeight())*baseline.y;el.from.left=(original.outerWidth-el.outerWidth())*baseline.x;el.to.top=(original.outerHeight-el.to.outerHeight)*baseline.y;el.to.left=(original.outerWidth-el.to.outerWidth)*baseline.x}el.css(el.from);if(scale==="content"||scale==="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);props2=props0.concat(vProps).concat(hProps);el.find("*[width]").each(function(){var child=$(this),c_original={height:child.height(),width:child.width(),outerHeight:child.outerHeight(),outerWidth:child.outerWidth()};if(restore){$.effects.save(child,props2)}child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x,outerHeight:c_original.outerHeight*factor.from.y,outerWidth:c_original.outerWidth*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x,outerHeight:c_original.height*factor.to.y,outerWidth:c_original.width*factor.to.x};if(factor.from.y!==factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to)}if(factor.from.x!==factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to)}child.css(child.from);child.animate(child.to,o.duration,o.easing,function(){if(restore){$.effects.restore(child,props2)}})})}el.animate(el.to,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(el.to.opacity===0){el.css("opacity",el.from.opacity)}if(mode==="hide"){el.hide()}$.effects.restore(el,props);if(!restore){if(position==="static"){el.css({position:"relative",top:el.to.top,left:el.to.left})}else{$.each(["top","left"],function(idx,pos){el.css(pos,function(_,str){var val=parseInt(str,10),toRef=idx?el.to.left:el.to.top;if(str==="auto"){return toRef+"px"}return val+toRef+"px"})})}}$.effects.removeWrapper(el);done()}})}})(jQuery);(function($,undefined){$.effects.effect.shake=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"effect"),direction=o.direction||"left",distance=o.distance||20,times=o.times||3,anims=times*2+1,speed=Math.round(o.duration/anims),ref=(direction==="up"||direction==="down")?"top":"left",positiveMotion=(direction==="up"||direction==="left"),animation={},animation1={},animation2={},i,queue=el.queue(),queuelen=queue.length;$.effects.save(el,props);el.show();$.effects.createWrapper(el);animation[ref]=(positiveMotion?"-=":"+=")+distance;animation1[ref]=(positiveMotion?"+=":"-=")+distance*2;animation2[ref]=(positiveMotion?"-=":"+=")+distance*2;el.animate(animation,speed,o.easing);for(i=1;i1){queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1)))}el.dequeue()}})(jQuery);(function($,undefined){$.effects.effect.slide=function(o,done){var el=$(this),props=["position","top","bottom","left","right","width","height"],mode=$.effects.setMode(el,o.mode||"show"),show=mode==="show",direction=o.direction||"left",ref=(direction==="up"||direction==="down")?"top":"left",positiveMotion=(direction==="up"||direction==="left"),distance,animation={};$.effects.save(el,props);el.show();distance=o.distance||el[ref==="top"?"outerHeight":"outerWidth"](true);$.effects.createWrapper(el).css({overflow:"hidden"});if(show){el.css(ref,positiveMotion?(isNaN(distance)?"-"+distance:-distance):distance)}animation[ref]=(show?(positiveMotion?"+=":"-="):(positiveMotion?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);done()}})}})(jQuery);(function($,undefined){$.effects.effect.transfer=function(o,done){var elem=$(this),target=$(o.to),targetFixed=target.css("position")==="fixed",body=$("body"),fixTop=targetFixed?body.scrollTop():0,fixLeft=targetFixed?body.scrollLeft():0,endPosition=target.offset(),animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()},startPosition=elem.offset(),transfer=$("
      ").appendTo(document.body).addClass(o.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:elem.innerHeight(),width:elem.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,o.duration,o.easing,function(){transfer.remove();done()})}})(jQuery);(function($,undefined){$.widget("ui.menu",{version:"1.10.2",defaultElement:"
        ",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=false;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,$.proxy(function(event){if(this.options.disabled){event.preventDefault()}},this));if(this.options.disabled){this.element.addClass("ui-state-disabled").attr("aria-disabled","true")}this._on({"mousedown .ui-menu-item > a":function(event){event.preventDefault()},"click .ui-state-disabled > a":function(event){event.preventDefault()},"click .ui-menu-item:has(a)":function(event){var target=$(event.target).closest(".ui-menu-item");if(!this.mouseHandled&&target.not(".ui-state-disabled").length){this.mouseHandled=true;this.select(event);if(target.has(".ui-menu").length){this.expand (event)}else if(!this.element.is(":focus")){this.element.trigger("focus",[true]);if(this.active&&this.active.parents(".ui-menu").length===1){clearTimeout(this.timer)}}}},"mouseenter .ui-menu-item":function(event){var target=$(event.currentTarget);target.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(event,target)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.children(".ui-menu-item").eq(0);if(!keepActiveItem){this.focus(event,item)}},blur:function(event){this._delay(function(){if(!$.contains(this.element[0],this.document[0].activeElement)){this.collapseAll(event)}})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(event){if(!$(event.target).closest(".ui-menu").length){this.collapseAll(event)}this.mouseHandled=false}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var elem=$(this);if(elem.data("ui-menu-submenu-carat")){elem.remove()}});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(event){var match,prev,character,skip,regex,preventDefault=true;function escape(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move("first","first",event);break;case $.ui.keyCode.END:this._move("last","last",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:if(this.active&&!this.active.is(".ui-state-disabled")){this.expand (event)}break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;prev=this.previousFilter||"";character=String.fromCharCode(event.keyCode);skip=false;clearTimeout(this.filterTimer);if(character===prev){skip=true}else{character=prev+character}regex=new RegExp("^"+escape(character),"i");match=this.activeMenu.children(".ui-menu-item").filter(function(){return regex.test($(this).children("a").text())});match=skip&&match.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):match;if(!match.length){character=String.fromCharCode(event.keyCode);regex=new RegExp("^"+escape(character),"i");match=this.activeMenu.children(".ui-menu-item").filter(function(){return regex.test($(this).children("a").text())})}if(match.length){this.focus(event,match);if(match.length>1){this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter},1000)}else{delete this.previousFilter}}else{delete this.previousFilter}}if(preventDefault){event.preventDefault()}},_activate:function(event){if(!this.active.is(".ui-state-disabled")){if(this.active.children("a[aria-haspopup='true']").length){this.expand (event)}else{this.select(event)}}},refresh:function(){var menus,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);submenus.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$(this),item=menu.prev("a"),submenuCarat=$("").addClass("ui-menu-icon ui-icon "+icon).data("ui-menu-submenu-carat",true);item.attr("aria-haspopup","true").prepend(submenuCarat);menu.attr("aria-labelledby",item.attr("id"))});menus=submenus.add(this.element);menus.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});menus.children(":not(.ui-menu-item)").each(function(){var item=$(this);if(!/[^\-\u2014\u2013\s]/.test(item.text())){item.addClass("ui-widget-content ui-menu-divider")}});menus.children(".ui-state-disabled").attr("aria-disabled","true");if(this.active&&!$.contains(this.element[0],this.active[0])){this.blur()}},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(key,value){if(key==="icons"){this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(value.submenu)}this._super(key,value)},focus:function(event,item){var nested,focused;this.blur(event,event&&event.type==="focus");this._scrollIntoView(item);this.active=item.first();focused=this.active.children("a").addClass("ui-state-focus");if(this.options.role){this.element.attr("aria-activedescendant",focused.attr("id"))}this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");if(event&&event.type==="keydown"){this._close()}else{this.timer=this._delay(function(){this._close()},this.delay)}nested=item.children(".ui-menu");if(nested.length&&(/^mouse/.test(event.type))){this._startOpening(nested)}this.activeMenu=item.parent();this._trigger("focus",event,{item:item})},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;if(this._hasScroll()){borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0;paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0;offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;scroll=this.activeMenu.scrollTop();elementHeight=this.activeMenu.height();itemHeight=item.height();if(offset<0){this.activeMenu.scrollTop(scroll+offset)}else if(offset+itemHeight>elementHeight){this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight)}}},blur:function(event,fromFocus){if(!fromFocus){clearTimeout(this.timer)}if(!this.active){return}this.active.children("a").removeClass("ui-state-focus");this.active=null;this._trigger("blur",event,{item:this.active})},_startOpening:function(submenu){clearTimeout(this.timer);if(submenu.attr("aria-hidden")!=="true"){return}this.timer=this._delay(function(){this._close();this._open(submenu)},this.delay)},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden","true");submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position)},collapseAll:function(event,all){clearTimeout(this.timer);this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(".ui-menu"));if(!currentMenu.length){currentMenu=this.element}this._close(currentMenu);this.blur(event);this.activeMenu=currentMenu},this.delay)},_close:function(startMenu){if(!startMenu){startMenu=this.active?this.active.parent():this.element}startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(newItem&&newItem.length){this._close();this.focus(event,newItem)}},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();if(newItem&&newItem.length){this._open(newItem.parent());this._delay(function(){this.focus(event,newItem)})}},next:function(event){this._move("next","first",event)},previous:function(event){this._move("prev","last",event)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(direction,filter,event){var next;if(this.active){if(direction==="first"||direction==="last"){next=this.active[direction==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1)}else{next=this.active[direction+"All"](".ui-menu-item").eq(0)}}if(!next||!next.length||!this.active){next=this.activeMenu.children(".ui-menu-item")[filter]()}this.focus(event,next)},nextPage:function(event){var item,base,height;if(!this.active){this.next(event);return}if(this.isLastItem()){return}if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base-height<0});this.focus(event,item)}else{this.focus(event,this.activeMenu.children(".ui-menu-item")[!this.active?"first":"last"]())}},previousPage:function(event){var item,base,height;if(!this.active){this.next(event);return}if(this.isFirstItem()){return}if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base+height>0});this.focus(event,item)}else{this.focus(event,this.activeMenu.children(".ui-menu-item").first())}},_hasScroll:function(){return this.element.outerHeight()
      "),innerDiv=div.children()[0];$("body").append(div);w1=innerDiv.offsetWidth;div.css("overflow","scroll");w2=innerDiv.offsetWidth;if(w1===w2){w2=div[0].clientWidth}div.remove();return(cachedScrollbarWidth=w1-w2)},getScrollInfo:function(within){var overflowX=within.isWindow?"":within.element.css("overflow-x"),overflowY=within.isWindow?"":within.element.css("overflow-y"),hasOverflowX=overflowX==="scroll"||(overflowX==="auto"&&within.width0?"right":"center",vertical:bottom<0?"top":top>0?"bottom":"middle"};if(targetWidthmax(abs(top),abs(bottom))){feedback.important="horizontal"}else{feedback.important="vertical"}options.using.call(this,props,feedback)}}elem.offset($.extend(position,{using:using}))})};$.ui.position={fit:{left:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset,newOverRight;if(data.collisionWidth>outerWidth){if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight}else if(overRight>0&&overLeft<=0){position.left=withinOffset}else{if(overLeft>overRight){position.left=withinOffset+outerWidth-data.collisionWidth}else{position.left=withinOffset}}}else if(overLeft>0){position.left+=overLeft}else if(overRight>0){position.left-=overRight}else{position.left=max(position.left-collisionPosLeft,position.left)}},top:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset,newOverBottom;if(data.collisionHeight>outerHeight){if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset;position.top+=overTop-newOverBottom}else if(overBottom>0&&overTop<=0){position.top=withinOffset}else{if(overTop>overBottom){position.top=withinOffset+outerHeight-data.collisionHeight}else{position.top=withinOffset}}}else if(overTop>0){position.top+=overTop}else if(overBottom>0){position.top-=overBottom}else{position.top=max(position.top-collisionPosTop,position.top)}}},flip:{left:function(position,data){var within=data.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,myOffset=data.my[0]==="left"?-data.elemWidth:data.my[0]==="right"?data.elemWidth:0,atOffset=data.at[0]==="left"?data.targetWidth:data.at[0]==="right"?-data.targetWidth:0,offset=-2*data.offset[0],newOverRight,newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)overTop&&(newOverBottom<0||newOverBottom0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if((position.top+myOffset+atOffset+offset)>overBottom&&(newOverTop>0||abs(newOverTop)10&&offsetLeft<11;testElement.innerHTML="";testElementParent.removeChild(testElement)})()}(jQuery));(function($,undefined){$.widget("ui.progressbar",{version:"1.10.2",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=$("
      ").appendTo(this.element);this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove()},value:function(newValue){if(newValue===undefined){return this.options.value}this.options.value=this._constrainedValue(newValue);this._refreshValue()},_constrainedValue:function(newValue){if(newValue===undefined){newValue=this.options.value}this.indeterminate=newValue===false;if(typeof newValue!=="number"){newValue=0}return this.indeterminate?false:Math.min(this.options.max,Math.max(this.min,newValue))},_setOptions:function(options){var value=options.value;delete options.value;this._super(options);this.options.value=this._constrainedValue(value);this._refreshValue()},_setOption:function(key,value){if(key==="max"){value=Math.max(this.min,value)}this._super(key,value)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var value=this.options.value,percentage=this._percentage();this.valueDiv.toggle(this.indeterminate||value>this.min).toggleClass("ui-corner-right",value===this.options.max).width(percentage.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);if(this.indeterminate){this.element.removeAttr("aria-valuenow");if(!this.overlayDiv){this.overlayDiv=$("
      ").appendTo(this.valueDiv)}}else{this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":value});if(this.overlayDiv){this.overlayDiv.remove();this.overlayDiv=null}}if(this.oldValue!==value){this.oldValue=value;this._trigger("change")}if(value===this.options.max){this._trigger("complete")}}})})(jQuery);(function($,undefined){var numPages=5;$.widget("ui.slider",$.ui.mouse,{version:"1.10.2",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider"+" ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=false},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var i,handleCount,options=this.options,existingHandles=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),handle="",handles=[];handleCount=(options.values&&options.values.length)||1;if(existingHandles.length>handleCount){existingHandles.slice(handleCount).remove();existingHandles=existingHandles.slice(0,handleCount)}for(i=existingHandles.length;i
      ").appendTo(this.element);classes="ui-slider-range"+" ui-widget-header ui-corner-all"}else{this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({"left":"","bottom":""})}this.range.addClass(classes+((options.range==="min"||options.range==="max")?" ui-slider-range-"+options.range:""))}else{this.range=$([])}},_setupEvents:function(){var elements=this.handles.add(this.range).filter("a");this._off(elements);this._on(elements,this._handleEvents);this._hoverable(elements);this._focusable(elements)},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider"+" ui-slider-horizontal"+" ui-slider-vertical"+" ui-widget"+" ui-widget-content"+" ui-corner-all");this._mouseDestroy()},_mouseCapture:function(event){var position,normValue,distance,closestHandle,index,allowed,offset,mouseOverHandle,that=this,o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();position={x:event.pageX,y:event.pageY};normValue=this._normValueFromMouse(position);distance=this._valueMax()-this._valueMin()+1;this.handles.each(function(i){var thisDistance=Math.abs(normValue-that.values(i));if((distance>thisDistance)||(distance===thisDistance&&(i===that._lastChangedValue||that.values(i)===o.min))){distance=thisDistance;closestHandle=$(this);index=i}});allowed=this._start(event,index);if(allowed===false){return false}this._mouseSliding=true;this._handleIndex=index;closestHandle.addClass("ui-state-active").focus();offset=closestHandle.offset();mouseOverHandle=!$(event.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(event,index,normValue)}this._animateOff=true;return true},_mouseStart:function(){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;if(this.orientation==="horizontal"){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if(this.orientation==="vertical"){percentMouse=1-percentMouse}valueTotal=this._valueMax()-this._valueMin();valueMouse=this._valueMin()+percentMouse*valueTotal;return this._trimAlignValue(valueMouse)},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}return this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){var otherVal,newValues,allowed;if(this.options.values&&this.options.values.length){otherVal=this.values(index?0:1);if((this.options.values.length===2&&this.options.range===true)&&((index===0&&newVal>otherVal)||(index===1&&newVal1){this.options.values[index]=this._trimAlignValue(newValue);this._refreshValue();this._change(null,index);return}if(arguments.length){if($.isArray(arguments[0])){vals=this.options.values;newValues=arguments[0];for(i=0;i=this._valueMax()){return this._valueMax()}var step=(this.options.step>0)?this.options.step:1,valModStep=(val-this._valueMin())%step,alignValue=val-valModStep;if(Math.abs(valModStep)*2>=step){alignValue+=(valModStep>0)?step:(-step)}return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var lastValPercent,valPercent,value,valueMin,valueMax,oRange=this.options.range,o=this.options,that=this,animate=(!this._animateOff)?o.animate:false,_set={};if(this.options.values&&this.options.values.length){this.handles.each(function(i){valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-that._valueMin())*100;_set[that.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(that.options.range===true){if(that.orientation==="horizontal"){if(i===0){that.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate)}if(i===1){that.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}else{if(i===0){that.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate)}if(i===1){that.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}}lastValPercent=valPercent})}else{value=this.value();valueMin=this._valueMin();valueMax=this._valueMax();valPercent=(valueMax!==valueMin)?(value-valueMin)/(valueMax-valueMin)*100:0;_set[this.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);if(oRange==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate)}if(oRange==="max"&&this.orientation==="horizontal"){this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate})}if(oRange==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate)}if(oRange==="max"&&this.orientation==="vertical"){this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}}},_handleEvents:{keydown:function(event){var allowed,curVal,newVal,step,index=$(event.target).data("ui-slider-handle-index");switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:event.preventDefault();if(!this._keySliding){this._keySliding=true;$(event.target).addClass("ui-state-active");allowed=this._start(event,index);if(allowed===false){return}}break}step=this.options.step;if(this.options.values&&this.options.values.length){curVal=newVal=this.values(index)}else{curVal=newVal=this.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=this._valueMin();break;case $.ui.keyCode.END:newVal=this._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+((this._valueMax()-this._valueMin())/numPages));break;case $.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-((this._valueMax()-this._valueMin())/numPages));break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===this._valueMax()){return}newVal=this._trimAlignValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===this._valueMin()){return}newVal=this._trimAlignValue(curVal-step);break}this._slide(event,index,newVal)},click:function(event){event.preventDefault()},keyup:function(event){var index=$(event.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=false;this._stop(event,index);this._change(event,index);$(event.target).removeClass("ui-state-active")}}}})}(jQuery));(function($){function modifier(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous!==this.element.val()){this._trigger("change")}}}$.widget("ui.spinner",{version:"1.10.2",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:true,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);this._value(this.element.val(),true);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var options={},element=this.element;$.each(["min","max","step"],function(i,option){var value=element.attr(option);if(value!==undefined&&value.length){options[option]=value}});return options},_events:{keydown:function(event){if(this._start(event)&&this._keydown(event)){event.preventDefault()}},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return}this._stop();this._refresh();if(this.previous!==this.element.val()){this._trigger("change",event)}},mousewheel:function(event,delta){if(!delta){return}if(!this.spinning&&!this._start(event)){return false}this._spin((delta>0?1:-1)*this.options.step,event);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){if(this.spinning){this._stop(event)}},100);event.preventDefault()},"mousedown .ui-spinner-button":function(event){var previous;previous=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();function checkFocus(){var isActive=this.element[0]===this.document[0].activeElement;if(!isActive){this.element.focus();this.previous=previous;this._delay(function(){this.previous=previous})}}event.preventDefault();checkFocus.call(this);this.cancelBlur=true;this._delay(function(){delete this.cancelBlur;checkFocus.call(this)});if(this._start(event)===false){return}this._repeat(null,$(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(event){if(!$(event.currentTarget).hasClass("ui-state-active")){return}if(this._start(event)===false){return false}this._repeat(null,$(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var uiSpinner=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=uiSpinner.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");if(this.buttons.height()>Math.ceil(uiSpinner.height()*0.5)&&uiSpinner.height()>0){uiSpinner.height(uiSpinner.height())}if(this.options.disabled){this.disable()}},_keydown:function(event){var options=this.options,keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.UP:this._repeat(null,1,event);return true;case keyCode.DOWN:this._repeat(null,-1,event);return true;case keyCode.PAGE_UP:this._repeat(null,options.page,event);return true;case keyCode.PAGE_DOWN:this._repeat(null,-options.page,event);return true}return false},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""+""+""},_start:function(event){if(!this.spinning&&this._trigger("start",event)===false){return false}if(!this.counter){this.counter=1}this.spinning=true;return true},_repeat:function(i,steps,event){i=i||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,steps,event)},i);this._spin(steps*this.options.step,event)},_spin:function(step,event){var value=this.value()||0;if(!this.counter){this.counter=1}value=this._adjustValue(value+step*this._increment(this.counter));if(!this.spinning||this._trigger("spin",event,{value:value})!==false){this._value(value);this.counter++}},_increment:function(i){var incremental=this.options.incremental;if(incremental){return $.isFunction(incremental)?incremental(i):Math.floor(i*i*i/50000-i*i/500+17*i/200+1)}return 1},_precision:function(){var precision=this._precisionOf(this.options.step);if(this.options.min!==null){precision=Math.max(precision,this._precisionOf(this.options.min))}return precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return decimal===-1?0:str.length-decimal-1},_adjustValue:function(value){var base,aboveMin,options=this.options;base=options.min!==null?options.min:0;aboveMin=value-base;aboveMin=Math.round(aboveMin/options.step)*options.step;value=base+aboveMin;value=parseFloat(value.toFixed(this._precision()));if(options.max!==null&&value>options.max){return options.max}if(options.min!==null&&value1&&decodeURIComponent(anchor.href.replace(rhash,""))===decodeURIComponent(location.href.replace(rhash,""))}$.widget("ui.tabs",{version:"1.10.2",delay:300,options:{active:null,collapsible:false,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var that=this,options=this.options;this.running=false;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",options.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(event){if($(this).is(".ui-state-disabled")){event.preventDefault()}}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){if($(this).closest("li").is(".ui-state-disabled")){this.blur()}});this._processTabs();options.active=this._initialActive();if($.isArray(options.disabled)){options.disabled=$.unique(options.disabled.concat($.map(this.tabs.filter(".ui-state-disabled"),function(li){return that.tabs.index(li)}))).sort()}if(this.options.active!==false&&this.anchors.length){this.active=this._findActive(options.active)}else{this.active=$()}this._refresh();if(this.active.length){this.load(options.active)}},_initialActive:function(){var active=this.options.active,collapsible=this.options.collapsible,locationHash=location.hash.substring(1);if(active===null){if(locationHash){this.tabs.each(function(i,tab){if($(tab).attr("aria-controls")===locationHash){active=i;return false}})}if(active===null){active=this.tabs.index(this.tabs.filter(".ui-tabs-active"))}if(active===null||active===-1){active=this.tabs.length?0:false}}if(active!==false){active=this.tabs.index(this.tabs.eq(active));if(active===-1){active=collapsible?false:0}}if(!collapsible&&active===false&&this.anchors.length){active=0}return active},_getCreateEventData:function(){return{tab:this.active,panel:!this.active.length?$():this._getPanelForTab(this.active)}},_tabKeydown:function(event){var focusedTab=$(this.document[0].activeElement).closest("li"),selectedIndex=this.tabs.index(focusedTab),goingForward=true;if(this._handlePageNav(event)){return}switch(event.keyCode){case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:selectedIndex++;break;case $.ui.keyCode.UP:case $.ui.keyCode.LEFT:goingForward=false;selectedIndex--;break;case $.ui.keyCode.END:selectedIndex=this.anchors.length-1;break;case $.ui.keyCode.HOME:selectedIndex=0;break;case $.ui.keyCode.SPACE:event.preventDefault();clearTimeout(this.activating);this._activate(selectedIndex);return;case $.ui.keyCode.ENTER:event.preventDefault();clearTimeout(this.activating);this._activate(selectedIndex===this.options.active?false:selectedIndex);return;default:return}event.preventDefault();clearTimeout(this.activating);selectedIndex=this._focusNextTab(selectedIndex,goingForward);if(!event.ctrlKey){focusedTab.attr("aria-selected","false");this.tabs.eq(selectedIndex).attr("aria-selected","true");this.activating=this._delay(function(){this.option("active",selectedIndex)},this.delay)}},_panelKeydown:function(event){if(this._handlePageNav(event)){return}if(event.ctrlKey&&event.keyCode===$.ui.keyCode.UP){event.preventDefault();this.active.focus()}},_handlePageNav:function(event){if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP){this._activate(this._focusNextTab(this.options.active-1,false));return true}if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN){this._activate(this._focusNextTab(this.options.active+1,true));return true}},_findNextTab:function(index,goingForward){var lastTabIndex=this.tabs.length-1;function constrain(){if(index>lastTabIndex){index=0}if(index<0){index=lastTabIndex}return index}while($.inArray(constrain(),this.options.disabled)!==-1){index=goingForward?index+1:index-1}return index},_focusNextTab:function(index,goingForward){index=this._findNextTab(index,goingForward);this.tabs.eq(index).focus();return index},_setOption:function(key,value){if(key==="active"){this._activate(value);return}if(key==="disabled"){this._setupDisabled(value);return}this._super(key,value);if(key==="collapsible"){this.element.toggleClass("ui-tabs-collapsible",value);if(!value&&this.options.active===false){this._activate(0)}}if(key==="event"){this._setupEvents(value)}if(key==="heightStyle"){this._setupHeightStyle(value)}},_tabId:function(tab){return tab.attr("aria-controls")||"ui-tabs-"+getNextTabId()},_sanitizeSelector:function(hash){return hash?hash.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var options=this.options,lis=this.tablist.children(":has(a[href])");options.disabled=$.map(lis.filter(".ui-state-disabled"),function(tab){return lis.index(tab)});this._processTabs();if(options.active===false||!this.anchors.length){options.active=false;this.active=$()}else if(this.active.length&&!$.contains(this.tablist[0],this.active[0])){if(this.tabs.length===options.disabled.length){options.active=false;this.active=$()}else{this._activate(this._findNextTab(Math.max(0,options.active-1),false))}}else{options.active=this.tabs.index(this.active)}this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});if(!this.active.length){this.tabs.eq(0).attr("tabIndex",0)}else{this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0});this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})}},_processTabs:function(){var that=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return $("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=$();this.anchors.each(function(i,anchor){var selector,panel,panelId,anchorId=$(anchor).uniqueId().attr("id"),tab=$(anchor).closest("li"),originalAriaControls=tab.attr("aria-controls");if(isLocal(anchor)){selector=anchor.hash;panel=that.element.find(that._sanitizeSelector(selector))}else{panelId=that._tabId(tab);selector="#"+panelId;panel=that.element.find(selector);if(!panel.length){panel=that._createPanel(panelId);panel.insertAfter(that.panels[i-1]||that.tablist)}panel.attr("aria-live","polite")}if(panel.length){that.panels=that.panels.add(panel)}if(originalAriaControls){tab.data("ui-tabs-aria-controls",originalAriaControls)}tab.attr({"aria-controls":selector.substring(1),"aria-labelledby":anchorId});panel.attr("aria-labelledby",anchorId)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(id){return $("
      ").attr("id",id).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",true)},_setupDisabled:function(disabled){if($.isArray(disabled)){if(!disabled.length){disabled=false}else if(disabled.length===this.anchors.length){disabled=true}}for(var i=0,li;(li=this.tabs[i]);i++){if(disabled===true||$.inArray(i,disabled)!==-1){$(li).addClass("ui-state-disabled").attr("aria-disabled","true")}else{$(li).removeClass("ui-state-disabled").removeAttr("aria-disabled")}}this.options.disabled=disabled},_setupEvents:function(event){var events={click:function(event){event.preventDefault()}};if(event){$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler"})}this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,events);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(heightStyle){var maxHeight,parent=this.element.parent();if(heightStyle==="fill"){maxHeight=parent.height();maxHeight-=this.element.outerHeight()-this.element.height();this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");if(position==="absolute"||position==="fixed"){return}maxHeight-=elem.outerHeight(true)});this.element.children().not(this.panels).each(function(){maxHeight-=$(this).outerHeight(true)});this.panels.each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")}else if(heightStyle==="auto"){maxHeight=0;this.panels.each(function(){maxHeight=Math.max(maxHeight,$(this).height("").height())}).height(maxHeight)}},_eventHandler:function(event){var options=this.options,active=this.active,anchor=$(event.currentTarget),tab=anchor.closest("li"),clickedIsActive=tab[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():this._getPanelForTab(tab),toHide=!active.length?$():this._getPanelForTab(active),eventData={oldTab:active,oldPanel:toHide,newTab:collapsing?$():tab,newPanel:toShow};event.preventDefault();if(tab.hasClass("ui-state-disabled")||tab.hasClass("ui-tabs-loading")||this.running||(clickedIsActive&&!options.collapsible)||(this._trigger("beforeActivate",event,eventData)===false)){return}options.active=collapsing?false:this.tabs.index(tab);this.active=clickedIsActive?$():tab;if(this.xhr){this.xhr.abort()}if(!toHide.length&&!toShow.length){$.error("jQuery UI Tabs: Mismatching fragment identifier.")}if(toShow.length){this.load(this.tabs.index(tab),event)}this._toggle(event,eventData)},_toggle:function(event,eventData){var that=this,toShow=eventData.newPanel,toHide=eventData.oldPanel;this.running=true;function complete(){that.running=false;that._trigger("activate",event,eventData)}function show(){eventData.newTab.closest("li").addClass("ui-tabs-active ui-state-active");if(toShow.length&&that.options.show){that._show(toShow,that.options.show,complete)}else{toShow.show();complete()}}if(toHide.length&&this.options.hide){this._hide(toHide,this.options.hide,function(){eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");show()})}else{eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");toHide.hide();show()}toHide.attr({"aria-expanded":"false","aria-hidden":"true"});eventData.oldTab.attr("aria-selected","false");if(toShow.length&&toHide.length){eventData.oldTab.attr("tabIndex",-1)}else if(toShow.length){this.tabs.filter(function(){return $(this).attr("tabIndex")===0}).attr("tabIndex",-1)}toShow.attr({"aria-expanded":"true","aria-hidden":"false"});eventData.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(index){var anchor,active=this._findActive(index);if(active[0]===this.active[0]){return}if(!active.length){active=this.active}anchor=active.find(".ui-tabs-anchor")[0];this._eventHandler({target:anchor,currentTarget:anchor,preventDefault:$.noop})},_findActive:function(index){return index===false?$():this.tabs.eq(index)},_getIndex:function(index){if(typeof index==="string"){index=this.anchors.index(this.anchors.filter("[href$='"+index+"']"))}return index},_destroy:function(){if(this.xhr){this.xhr.abort()}this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){if($.data(this,"ui-tabs-destroy")){$(this).remove()}else{$(this).removeClass("ui-state-default ui-state-active ui-state-disabled "+"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}});this.tabs.each(function(){var li=$(this),prev=li.data("ui-tabs-aria-controls");if(prev){li.attr("aria-controls",prev).removeData("ui-tabs-aria-controls")}else{li.removeAttr("aria-controls")}});this.panels.show();if(this.options.heightStyle!=="content"){this.panels.css("height","")}},enable:function(index){var disabled=this.options.disabled;if(disabled===false){return}if(index===undefined){disabled=false}else{index=this._getIndex(index);if($.isArray(disabled)){disabled=$.map(disabled,function(num){return num!==index?num:null})}else{disabled=$.map(this.tabs,function(li,num){return num!==index?num:null})}}this._setupDisabled(disabled)},disable:function(index){var disabled=this.options.disabled;if(disabled===true){return}if(index===undefined){disabled=true}else{index=this._getIndex(index);if($.inArray(index,disabled)!==-1){return}if($.isArray(disabled)){disabled=$.merge([index],disabled).sort()}else{disabled=[index]}}this._setupDisabled(disabled)},load:function(index,event){index=this._getIndex(index);var that=this,tab=this.tabs.eq(index),anchor=tab.find(".ui-tabs-anchor"),panel=this._getPanelForTab(tab),eventData={tab:tab,panel:panel};if(isLocal(anchor[0])){return}this.xhr=$.ajax(this._ajaxSettings(anchor,event,eventData));if(this.xhr&&this.xhr.statusText!=="canceled"){tab.addClass("ui-tabs-loading");panel.attr("aria-busy","true");this.xhr.success(function(response){setTimeout(function(){panel.html(response);that._trigger("load",event,eventData)},1)}).complete(function(jqXHR,status){setTimeout(function(){if(status==="abort"){that.panels.stop(false,true)}tab.removeClass("ui-tabs-loading");panel.removeAttr("aria-busy");if(jqXHR===that.xhr){delete that.xhr}},1)})}},_ajaxSettings:function(anchor,event,eventData){var that=this;return{url:anchor.attr("href"),beforeSend:function(jqXHR,settings){return that._trigger("beforeLoad",event,$.extend({jqXHR:jqXHR,ajaxSettings:settings},eventData))}}},_getPanelForTab:function(tab){var id=$(tab).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+id))}})})(jQuery);(function($){var increments=0;function addDescribedBy(elem,id){var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);describedby.push(id);elem.data("ui-tooltip-id",id).attr("aria-describedby",$.trim(describedby.join(" ")))}function removeDescribedBy(elem){var id=elem.data("ui-tooltip-id"),describedby=(elem.attr("aria-describedby")||"").split(/\s+/),index=$.inArray(id,describedby);if(index!==-1){describedby.splice(index,1)}elem.removeData("ui-tooltip-id");describedby=$.trim(describedby.join(" "));if(describedby){elem.attr("aria-describedby",describedby)}else{elem.removeAttr("aria-describedby")}}$.widget("ui.tooltip",{version:"1.10.2",options:{content:function(){var title=$(this).attr("title")||"";return $("").text(title).html()},hide:true,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:true,tooltipClass:null,track:false,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};if(this.options.disabled){this._disable()}},_setOption:function(key,value){var that=this;if(key==="disabled"){this[value?"_disable":"_enable"]();this.options[key]=value;return}this._super(key,value);if(key==="content"){$.each(this.tooltips,function(id,element){that._updateContent(element)})}},_disable:function(){var that=this;$.each(this.tooltips,function(id,element){var event=$.Event("blur");event.target=event.currentTarget=element[0];that.close(event,true)});this.element.find(this.options.items).addBack().each(function(){var element=$(this);if(element.is("[title]")){element.data("ui-tooltip-title",element.attr("title")).attr("title","")}})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var element=$(this);if(element.data("ui-tooltip-title")){element.attr("title",element.data("ui-tooltip-title"))}})},open:function(event){var that=this,target=$(event?event.target:this.element).closest(this.options.items);if(!target.length||target.data("ui-tooltip-id")){return}if(target.attr("title")){target.data("ui-tooltip-title",target.attr("title"))}target.data("ui-tooltip-open",true);if(event&&event.type==="mouseover"){target.parents().each(function(){var parent=$(this),blurEvent;if(parent.data("ui-tooltip-open")){blurEvent=$.Event("blur");blurEvent.target=blurEvent.currentTarget=this;that.close(blurEvent,true)}if(parent.attr("title")){parent.uniqueId();that.parents[this.id]={element:this,title:parent.attr("title")};parent.attr("title","")}})}this._updateContent(target,event)},_updateContent:function(target,event){var content,contentOption=this.options.content,that=this,eventType=event?event.type:null;if(typeof contentOption==="string"){return this._open(event,target,contentOption)}content=contentOption.call(target[0],function(response){if(!target.data("ui-tooltip-open")){return}that._delay(function(){if(event){event.type=eventType}this._open(event,target,response)})});if(content){this._open(event,target,content)}},_open:function(event,target,content){var tooltip,events,delayedShow,positionOption=$.extend({},this.options.position);if(!content){return}tooltip=this._find(target);if(tooltip.length){tooltip.find(".ui-tooltip-content").html(content);return}if(target.is("[title]")){if(event&&event.type==="mouseover"){target.attr("title","")}else{target.removeAttr("title")}}tooltip=this._tooltip(target);addDescribedBy(target,tooltip.attr("id"));tooltip.find(".ui-tooltip-content").html(content);function position(event){positionOption.of=event;if(tooltip.is(":hidden")){return}tooltip.position(positionOption)}if(this.options.track&&event&&/^mouse/.test(event.type)){this._on(this.document,{mousemove:position});position(event)}else{tooltip.position($.extend({of:target},this.options.position))}tooltip.hide();this._show(tooltip,this.options.show);if(this.options.show&&this.options.show.delay){delayedShow=this.delayedShow=setInterval(function(){if(tooltip.is(":visible")){position(positionOption.of);clearInterval(delayedShow)}},$.fx.interval)}this._trigger("open",event,{tooltip:tooltip});events={keyup:function(event){if(event.keyCode===$.ui.keyCode.ESCAPE){var fakeEvent=$.Event(event);fakeEvent.currentTarget=target[0];this.close(fakeEvent,true)}},remove:function(){this._removeTooltip(tooltip)}};if(!event||event.type==="mouseover"){events.mouseleave="close"}if(!event||event.type==="focusin"){events.focusout="close"}this._on(true,target,events)},close:function(event){var that=this,target=$(event?event.currentTarget:this.element),tooltip=this._find(target);if(this.closing){return}clearInterval(this.delayedShow);if(target.data("ui-tooltip-title")){target.attr("title",target.data("ui-tooltip-title"))}removeDescribedBy(target);tooltip.stop(true);this._hide(tooltip,this.options.hide,function(){that._removeTooltip($(this))});target.removeData("ui-tooltip-open");this._off(target,"mouseleave focusout keyup");if(target[0]!==this.element[0]){this._off(target,"remove")}this._off(this.document,"mousemove");if(event&&event.type==="mouseleave"){$.each(this.parents,function(id,parent){$(parent.element).attr("title",parent.title);delete that.parents[id]})}this.closing=true;this._trigger("close",event,{tooltip:tooltip});this.closing=false},_tooltip:function(element){var id="ui-tooltip-"+increments++,tooltip=$("
      ").attr({id:id,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));$("
      ").addClass("ui-tooltip-content").appendTo(tooltip);tooltip.appendTo(this.document[0].body);this.tooltips[id]=element;return tooltip},_find:function(target){var id=target.data("ui-tooltip-id");return id?$("#"+id):$()},_removeTooltip:function(tooltip){tooltip.remove();delete this.tooltips[tooltip.attr("id")]},_destroy:function(){var that=this;$.each(this.tooltips,function(id,element){var event=$.Event("blur");event.target=event.currentTarget=element[0];that.close(event,true);$("#"+id).remove();if(element.data("ui-tooltip-title")){element.attr("title",element.data("ui-tooltip-title"));element.removeData("ui-tooltip-title")}})}})}(jQuery)); (function(a){"use strict";a.fn.absoluteCounter=function(b){b=a.extend({},a.fn.absoluteCounter.defaults,b||{});return a(this).each(function(){var d=this,g=b.speed,f=b.setStyles,e=b.delayedStart,c=b.fadeInDelay;if(f){a(d).css({display:"block",position:"relative",overflow:"hidden"}).addClass('animated')}a(d).css("opacity","0");a(d).animate({opacity:0},e,function(){var l=a(d).text();a(d).text("");for(var k=0;k=0){m='';for(var h=0;h<=parseInt(n,10);h++){m+=''+(h%10)+""}m+=""}else{m=''+n+""}a(d).append(m)}a(d).animate({opacity:1},c);a("span.onedigit",d).each(function(i,o){if(f){a(o).css({"float":"left",position:"relative"});a("span",a(o)).css({display:"block"})}var p=a("span",a(o)).length,j=a(d).height();a(o).css({height:(p*j)+"px",top:"0"});a("span",a(o)).css({height:j+"px"});a(o).animate({top:-1*((p-1)*j)+"px"},g,function(){if(typeof(b.onComplete)==="function"){b.onComplete.call(d)}})})})})};a.fn.absoluteCounter.defaults={speed:2000,setStyles:true,onComplete:null,delayedStart:0,fadeInDelay:0}}(jQuery)); (function(){(function($){$.easyPieChart=function(el,options){var addScaleLine,animateLine,drawLine,easeInOutQuad,renderBackground,renderScale,renderTrack,_this=this;this.el=el;this.$el=$(el);this.$el.data("easyPieChart",this);this.init=function(){var percent;_this.options=$.extend({},$.easyPieChart.defaultOptions,options);percent=parseInt(_this.$el.data('percent'),10);_this.percentage=0;_this.canvas=$("").get(0);_this.$el.append(_this.canvas);if(typeof G_vmlCanvasManager!=="undefined"&&G_vmlCanvasManager!==null){G_vmlCanvasManager.initElement(_this.canvas)}_this.ctx=_this.canvas.getContext('2d');if(window.devicePixelRatio>1.5){$(_this.canvas).css({width:_this.options.size,height:_this.options.size});_this.canvas.width*=2;_this.canvas.height*=2;_this.ctx.scale(2,2)}_this.ctx.translate(_this.options.size/2,_this.options.size/2);_this.$el.addClass('easyPieChart');_this.$el.css({width:_this.options.size,height:_this.options.size,lineHeight:""+_this.options.size+"px"});_this.update(percent);return _this};this.update=function(percent){if(_this.options.animate===false){return drawLine(percent)}else{return animateLine(_this.percentage,percent)}};renderScale=function(){var i,_i,_results;_this.ctx.fillStyle=_this.options.scaleColor;_this.ctx.lineWidth=1;_results=[];for(i=_i=0;_i<=24;i=++_i){_results.push(addScaleLine(i))}return _results};addScaleLine=function(i){var offset;offset=i%6===0?0:_this.options.size*0.017;_this.ctx.save();_this.ctx.rotate(i*Math.PI/12);_this.ctx.fillRect(_this.options.size/2-offset,0,-_this.options.size*0.05+offset,1);return _this.ctx.restore()};renderTrack=function(){var offset;offset=_this.options.size/2-_this.options.lineWidth/2;if(_this.options.scaleColor!==false){offset-=_this.options.size*0.08}_this.ctx.beginPath();_this.ctx.arc(0,0,offset,0,Math.PI*2,true);_this.ctx.closePath();_this.ctx.strokeStyle=_this.options.trackColor;_this.ctx.lineWidth=_this.options.lineWidth;return _this.ctx.stroke()};renderBackground=function(){if(_this.options.scaleColor!==false){renderScale()}if(_this.options.trackColor!==false){return renderTrack()}};drawLine=function(percent){var offset;renderBackground();_this.ctx.strokeStyle=$.isFunction(_this.options.barColor)?_this.options.barColor(percent):_this.options.barColor;_this.ctx.lineCap=_this.options.lineCap;_this.ctx.lineWidth=_this.options.lineWidth;offset=_this.options.size/2-_this.options.lineWidth/2;if(_this.options.scaleColor!==false){offset-=_this.options.size*0.08}_this.ctx.save();_this.ctx.rotate(-Math.PI/2);_this.ctx.beginPath();_this.ctx.arc(0,0,offset,0,Math.PI*2*percent/100,false);_this.ctx.stroke();return _this.ctx.restore()};animateLine=function(from,to){var currentStep,fps,steps;fps=30;steps=fps*_this.options.animate/1000;currentStep=0;_this.options.onStart.call(_this);_this.percentage=to;if(_this.animation){clearInterval(_this.animation);_this.animation=false}return _this.animation=setInterval(function(){_this.ctx.clearRect(-_this.options.size/2,-_this.options.size/2,_this.options.size,_this.options.size);renderBackground.call(_this);drawLine.call(_this,[easeInOutQuad(currentStep,from,to-from,steps)]);currentStep++;if((currentStep/steps)>1){clearInterval(_this.animation);_this.animation=false;return _this.options.onStop.call(_this)}},1000/fps)};easeInOutQuad=function(t,b,c,d){var easeIn,easing;easeIn=function(t){return Math.pow(t,2)};easing=function(t){if(t<1){return easeIn(t)}else{return 2-easeIn((t/2)*-2+2)}};t/=d/2;return c/2*easing(t)+b};return this.init()};$.easyPieChart.defaultOptions={barColor:'#ef1e25',trackColor:'#f2f2f2',scaleColor:'#dfe0e0',lineCap:'round',size:110,lineWidth:3,animate:false,onStart:$.noop,onStop:$.noop};$.fn.easyPieChart=function(options){return $.each(this,function(i,el){var $el;$el=$(el);if(!$el.data('easyPieChart')){return $el.data('easyPieChart',new $.easyPieChart(el,options))}})};return void 0})(jQuery)}).call(this); (function(e){function q(c,b,g,d,a){function k(){l.unbind("webkitTransitionEnd transitionend otransitionend oTransitionEnd");b&&w(b,g,d,a);a.startOrder=[];a.newOrder=[];a.origSort=[];a.checkSort=[];r.removeStyle(a.prefix+"filter, filter, "+a.prefix+"transform, transform, opacity, display").css(a.clean).removeAttr("data-checksum");window.atob||r.css({display:"none",opacity:"0"});l.removeStyle(a.prefix+"transition, transition, "+a.prefix+"perspective, perspective, "+a.prefix+"perspective-origin, perspective-origin, "+ (a.resizeContainer?"height":""));"list"==a.layoutMode?(n.css({display:a.targetDisplayList,opacity:"1"}),a.origDisplay=a.targetDisplayList):(n.css({display:a.targetDisplayGrid,opacity:"1"}),a.origDisplay=a.targetDisplayGrid);a.origLayout=a.layoutMode;setTimeout(function(){r.removeStyle(a.prefix+"transition, transition");a.mixing=!1;if("function"==typeof a.onMixEnd){var b=a.onMixEnd.call(this,a);a=b?b:a}})}clearInterval(a.failsafe);a.mixing=!0;a.filter=c;if("function"==typeof a.onMixStart){var f=a.onMixStart.call(this, a);a=f?f:a}for(var h=a.transitionSpeed,f=0;2>f;f++){var j=0==f?j=a.prefix:"";a.transition[j+"transition"]="all "+h+"ms linear";a.transition[j+"transform"]=j+"translate3d(0,0,0)";a.perspective[j+"perspective"]=a.perspectiveDistance+"px";a.perspective[j+"perspective-origin"]=a.perspectiveOrigin}var s=a.targetSelector,r=d.find(s);r.each(function(){this.data={}});var l=r.parent();l.css(a.perspective);a.easingFallback="ease-in-out";"smooth"==a.easing&&(a.easing="cubic-bezier(0.25, 0.46, 0.45, 0.94)"); "snap"==a.easing&&(a.easing="cubic-bezier(0.77, 0, 0.175, 1)");"windback"==a.easing&&(a.easing="cubic-bezier(0.175, 0.885, 0.320, 1.275)",a.easingFallback="cubic-bezier(0.175, 0.885, 0.320, 1)");"windup"==a.easing&&(a.easing="cubic-bezier(0.6, -0.28, 0.735, 0.045)",a.easingFallback="cubic-bezier(0.6, 0.28, 0.735, 0.045)");f="list"==a.layoutMode&&null!=a.listEffects?a.listEffects:a.effects;Array.prototype.indexOf&&(a.fade=-1u.length?t=t.add(d.find(s+":visible")):r.each(function(){var a=e(this);if(q){var b=0;e.each(u,function(){this.length? a.is("."+this.join(", ."))&&b++:0f;f++)j=0==f?j=a.prefix:"",c[j+"transform"]=a.scale+" "+a.rotateX+" "+a.rotateY+" "+a.rotateZ,c[j+"filter"]=a.blur+" "+a.grayscale;p.css(c);m.each(function(){var b=this.data,c=e(this);c.hasClass("mix_tohide")?(b.preTX=b.origPos.left-b.hideInterPos.left,b.preTY=b.origPos.top- b.hideInterPos.top):(b.preTX=b.origPos.left-b.preInterPos.left,b.preTY=b.origPos.top-b.preInterPos.top);for(var d={},f=0;2>f;f++){var j=0==f?j=a.prefix:"";d[j+"transform"]="translate("+b.preTX+"px,"+b.preTY+"px)"}c.css(d)});"list"==a.layoutMode?(d.addClass(a.listClass),d.removeClass(a.gridClass)):(d.addClass(a.gridClass),d.removeClass(a.listClass));setTimeout(function(){if(a.resizeContainer){for(var b={},c=0;2>c;c++){var d=0==c?d=a.prefix:"";b[d+"transition"]="all "+h+"ms ease-in-out";b.height=a.newHeight+ "px"}l.css(b)}v.css("opacity",a.fade);p.css("opacity",1);p.each(function(){var b=this.data;b.tX=b.finalPos.left-b.showInterPos.left;b.tY=b.finalPos.top-b.showInterPos.top;for(var c={},d=0;2>d;d++){var f=0==d?f=a.prefix:"";c[f+"transition-property"]=f+"transform, "+f+"filter, opacity";c[f+"transition-timing-function"]=a.easing+", linear, linear";c[f+"transition-duration"]=h+"ms";c[f+"transition-delay"]="0";c[f+"transform"]="translate("+b.tX+"px,"+b.tY+"px)";c[f+"filter"]="none"}e(this).css("-webkit-transition", "all "+h+"ms "+a.easingFallback).css(c)});m.each(function(){var b=this.data;b.tX=0!=b.finalPrePos.left?b.finalPrePos.left-b.preInterPos.left:0;b.tY=0!=b.finalPrePos.left?b.finalPrePos.top-b.preInterPos.top:0;for(var c={},d=0;2>d;d++){var f=0==d?f=a.prefix:"";c[f+"transition"]="all "+h+"ms "+a.easing;c[f+"transform"]="translate("+b.tX+"px,"+b.tY+"px)"}e(this).css("-webkit-transition","all "+h+"ms "+a.easingFallback).css(c)});b={};for(c=0;2>c;c++)d=0==c?d=a.prefix:"",b[d+"transition"]="all "+h+"ms "+ a.easing+", "+d+"filter "+h+"ms linear, opacity "+h+"ms linear",b[d+"transform"]=a.scale+" "+a.rotateX+" "+a.rotateY+" "+a.rotateZ,b[d+"filter"]=a.blur+" "+a.grayscale,b.opacity=a.fade;v.css(b);l.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd",function(b){if(-1c;c++){var e=0==c?e=a.prefix:"";b[e+"transition"]="height "+h+"ms ease-in-out";b.height=a.minHeight+"px"}l.css(b)}r.css(a.transition);if(t.length){b={};for(c=0;2>c;c++)e=0==c?e=a.prefix:"",b[e+"transform"]=a.scale+" "+a.rotateX+" "+a.rotateY+" "+a.rotateZ,b[e+"filter"]=a.blur+" "+a.grayscale,b.opacity=a.fade;v.css(b); l.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd",function(b){if(-1e?1:0}function k(a){"asc"==b?f.prepend(a).prepend(" "):f.append(a).append(" ")}g.find(d.targetSelector).wrapAll('
      '); var f=g.find(".mix_sorter");d.origSort.length||f.find(d.targetSelector+":visible").each(function(){e(this).wrap("");d.origSort.push(e(this).parent().html().replace(/\s+/g,""));e(this).unwrap()});f.empty();if("reset"==c)e.each(d.startOrder,function(){f.append(this).append(" ")});else if("default"==c)e.each(d.origOrder,function(){k(this)});else if("random"==c){if(!d.newOrder.length){for(var h=d.startOrder.slice(),j=h.length,s=j;s--;){var r=parseInt(Math.random()*j),l=h[s];h[s]=h[r];h[r]=l}d.newOrder= h}e.each(d.newOrder,function(){f.append(this).append(" ")})}else if("custom"==c)e.each(b,function(){k(this)});else{if("undefined"===typeof d.origOrder[0].attr(c))return console.log("No such attribute found. Terminating"),!1;d.newOrder.length||(e.each(d.origOrder,function(){d.newOrder.push(e(this))}),d.newOrder.sort(a));e.each(d.newOrder,function(){k(this)})}d.checkSort=[];f.find(d.targetSelector+":visible").each(function(b){var a=e(this);0==b&&a.attr("data-checksum","1");a.wrap("");d.checkSort.push(a.parent().html().replace(/\s+/g, ""));a.unwrap()});g.find(d.targetSelector).unwrap()}function y(c){c=c.replace(/\s{2,}/g," ");var b=c.split(" ");e.each(b,function(c){"all"==this&&(b[c]="mix_all")});""==b[0]&&b.shift();return b}var x={init:function(c){return this.each(function(){var b={targetSelector:".mix",filterSelector:".filter",sortSelector:".sort",buttonEvent:"click",effects:["fade","scale"],listEffects:null,easing:"smooth",layoutMode:"grid",targetDisplayGrid:"inline-block",targetDisplayList:"block",listClass:"",gridClass:"", transitionSpeed:600,showOnLoad:"all",sortOnLoad:!1,multiFilter:!1,filterLogic:"or",resizeContainer:!0,minHeight:0,failClass:"fail",perspectiveDistance:"3000",perspectiveOrigin:"50% 50%",animateGridList:!0,onMixLoad:null,onMixStart:null,onMixEnd:null,container:null,origOrder:[],startOrder:[],newOrder:[],origSort:[],checkSort:[],filter:"",mixing:!1,origDisplay:"",origLayout:"",origHeight:0,newHeight:0,isTouch:!1,resetDelay:0,failsafe:null,prefix:"",easingFallback:"ease-in-out",transition:{},perspective:{}, clean:{},fade:"1",scale:"",rotateX:"",rotateY:"",rotateZ:"",blur:"",grayscale:""};c&&e.extend(b,c);this.config=b;e.support.touch="ontouchend"in document;e.support.touch&&(b.isTouch=!0,b.resetDelay=350);b.container=e(this);var g=b.container,d;a:{d=g[0];for(var a=["Webkit","Moz","O","ms"],k=0;kf;f++)d=0==f?d=b.prefix:"",b.transition[d+"transition"]="all "+b.transitionSpeed+"ms ease-in-out",b.perspective[d+"perspective"]=b.perspectiveDistance+"px",b.perspective[d+"perspective-origin"]= b.perspectiveOrigin;for(f=0;2>f;f++)d=0==f?d=b.prefix:"",b.clean[d+"transition"]="none";"list"==b.layoutMode?(g.addClass(b.listClass),b.origDisplay=b.targetDisplayList):(g.addClass(b.gridClass),b.origDisplay=b.targetDisplayGrid);b.origLayout=b.layoutMode;f=b.showOnLoad.split(" ");e.each(f,function(){e(b.filterSelector+'[data-filter="'+this+'"]').addClass("active")});g.find(b.targetSelector).addClass("mix_all");"all"==f[0]&&(f[0]="mix_all",b.showOnLoad="mix_all");var h=e();e.each(f,function(){h=h.add(e("."+ this))});h.each(function(){var a=e(this);"list"==b.layoutMode?a.css("display",b.targetDisplayList):a.css("display",b.targetDisplayGrid);a.css(b.transition)});setTimeout(function(){b.mixing=!0;h.css("opacity","1");setTimeout(function(){"list"==b.layoutMode?h.removeStyle(b.prefix+"transition, transition").css({display:b.targetDisplayList,opacity:1}):h.removeStyle(b.prefix+"transition, transition").css({display:b.targetDisplayGrid,opacity:1});b.mixing=!1;if("function"==typeof b.onMixLoad){var a=b.onMixLoad.call(this, b);b=a?a:b}},b.transitionSpeed)},10);b.filter=b.showOnLoad;e(b.sortSelector).bind(b.buttonEvent,function(){if(!b.mixing){var a=e(this),c=a.attr("data-sort"),d=a.attr("data-order");if(a.hasClass("active")){if("random"!=c)return!1}else e(b.sortSelector).removeClass("active"),a.addClass("active");g.find(b.targetSelector).each(function(){b.startOrder.push(e(this))});q(b.filter,c,d,g,b)}});e(b.filterSelector).bind(b.buttonEvent,function(){if(!b.mixing){var a=e(this);if(!1==b.multiFilter)e(b.filterSelector).removeClass("active"), a.addClass("active"),b.filter=a.attr("data-filter"),e(b.filterSelector+'[data-filter="'+b.filter+'"]').addClass("active");else{var c=a.attr("data-filter");a.hasClass("active")?(a.removeClass("active"),b.filter=b.filter.replace(RegExp("(\\s|^)"+c),"")):(a.addClass("active"),b.filter=b.filter+" "+c)}q(b.filter,null,null,g,b)}})})},toGrid:function(){return this.each(function(){var c=this.config;"grid"!=c.layoutMode&&(c.layoutMode="grid",q(c.filter,null,null,e(this),c))})},toList:function(){return this.each(function(){var c= this.config;"list"!=c.layoutMode&&(c.layoutMode="list",q(c.filter,null,null,e(this),c))})},filter:function(c){return this.each(function(){var b=this.config;b.mixing||(e(b.filterSelector).removeClass("active"),e(b.filterSelector+'[data-filter="'+c+'"]').addClass("active"),q(c,null,null,e(this),b))})},sort:function(c){return this.each(function(){var b=this.config,g=e(this);if(!b.mixing){e(b.sortSelector).removeClass("active");if(e.isArray(c)){var d=c[0],a=c[1];e(b.sortSelector+'[data-sort="'+c[0]+'"][data-order="'+ c[1]+'"]').addClass("active")}else e(b.sortSelector+'[data-sort="'+c+'"]').addClass("active"),d=c,a="desc";g.find(b.targetSelector).each(function(){b.startOrder.push(e(this))});q(b.filter,d,a,g,b)}})},multimix:function(c){return this.each(function(){var b=this.config,g=e(this);multiOut={filter:b.filter,sort:null,order:"desc",layoutMode:b.layoutMode};e.extend(multiOut,c);b.mixing||(e(b.filterSelector).add(b.sortSelector).removeClass("active"),e(b.filterSelector+'[data-filter="'+multiOut.filter+'"]').addClass("active"), "undefined"!==typeof multiOut.sort&&(e(b.sortSelector+'[data-sort="'+multiOut.sort+'"][data-order="'+multiOut.order+'"]').addClass("active"),g.find(b.targetSelector).each(function(){b.startOrder.push(e(this))})),b.layoutMode=multiOut.layoutMode,q(multiOut.filter,multiOut.sort,multiOut.order,g,b))})},remix:function(c){return this.each(function(){var b=this.config,g=e(this);b.origOrder=[];g.find(b.targetSelector).each(function(){var c=e(this);c.addClass("mix_all");b.origOrder.push(c)});!b.mixing&&"undefined"!==typeof c&&(e(b.filterSelector).removeClass("active"),e(b.filterSelector+'[data-filter="'+c+'"]').addClass("active"),q(c,null,null,g,b))})}};e.fn.mixitup=function(c,b){if(x[c])return x[c].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof c||!c)return x.init.apply(this,arguments)};e.fn.removeStyle=function(c){return this.each(function(){var b=e(this);c=c.replace(/\s+/g,"");var g=c.split(",");e.each(g,function(){var c=RegExp(this.toString()+"[^;]+;?","g");b.attr("style",function(a, b){if(b)return b.replace(c,"")})})})}})(jQuery); (function(e){var y=!1,D=!1,J=5E3,K=2E3,x=0,L=function(){var e=document.getElementsByTagName("script"),e=e[e.length-1].src.split("?")[0];return 0f){if(b.getScrollTop()>=b.page.maxh)return!0}else if(0>=b.getScrollTop())return!0;b.scrollmom&&b.scrollmom.stop(); b.lastdeltay+=f;b.debounced("mousewheely",function(){var d=b.lastdeltay;b.lastdeltay=0;b.rail.drag||b.doScrollBy(d)},120)}d.stopImmediatePropagation();return d.preventDefault()}var b=this;this.version="3.4.0";this.name="nicescroll";this.me=c;this.opt={doc:e("body"),win:!1};e.extend(this.opt,F);this.opt.snapbackspeed=80;if(k)for(var q in b.opt)"undefined"!=typeof k[q]&&(b.opt[q]=k[q]);this.iddoc=(this.doc=b.opt.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/BODY|HTML/.test(b.opt.win?b.opt.win[0].nodeName: this.doc[0].nodeName);this.haswrapper=!1!==b.opt.win;this.win=b.opt.win||(this.ispage?e(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?e(window):this.win;this.body=e("body");this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=b.opt.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel= this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;this.observerremover=this.observer=this.scrollmom=this.scrollrunning=this.checkrtlmode=!1;do this.id="ascrail"+K++;while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor= this.rail=!1;this.visibility=!0;this.hidden=this.locked=!1;this.cursoractive=!0;this.overflowx=b.opt.overflowx;this.overflowy=b.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=M();var f=e.extend({},this.detected);this.ishwscroll=(this.canhwscroll=f.hastransform&&b.opt.hwacceleration)&&b.haswrapper;this.istouchcapable=!1;f.cantouch&&(f.ischrome&&!f.isios&&!f.isandroid)&&(this.istouchcapable= !0,f.cantouch=!1);f.cantouch&&(f.ismozilla&&!f.isios)&&(this.istouchcapable=!0,f.cantouch=!1);b.opt.enablemouselockapi||(f.hasmousecapture=!1,f.haspointerlock=!1);this.delayed=function(d,c,g,e){var f=b.delaylist[d],h=(new Date).getTime();if(!e&&f&&f.tt)return!1;f&&f.tt&&clearTimeout(f.tt);if(f&&f.last+g>h&&!f.tt)b.delaylist[d]={last:h+g,tt:setTimeout(function(){b.delaylist[d].tt=0;c.call()},g)};else if(!f||!f.tt)b.delaylist[d]={last:h,tt:0},setTimeout(function(){c.call()},0)};this.debounced=function(d, c,g){var f=b.delaylist[d];(new Date).getTime();b.delaylist[d]=c;f||setTimeout(function(){var c=b.delaylist[d];b.delaylist[d]=!1;c.call()},g)};this.synched=function(d,c){b.synclist[d]=c;(function(){b.onsync||(v(function(){b.onsync=!1;for(d in b.synclist){var c=b.synclist[d];c&&c.call(b);b.synclist[d]=!1}}),b.onsync=!0)})();return d};this.unsynched=function(d){b.synclist[d]&&(b.synclist[d]=!1)};this.css=function(d,c){for(var g in c)b.saved.css.push([d,g,d.css(g)]),d.css(g,c[g])};this.scrollTop=function(d){return"undefined"==typeof d?b.getScrollTop():b.setScrollTop(d)};this.scrollLeft=function(d){return"undefined"==typeof d?b.getScrollLeft():b.setScrollLeft(d)};BezierClass=function(b,c,g,f,e,h,l){this.st=b;this.ed=c;this.spd=g;this.p1=f||0;this.p2=e||1;this.p3=h||0;this.p4=l||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(b){return 3*b*b*(1-b)},B3:function(b){return 3*b*(1-b)*(1-b)},B4:function(b){return(1-b)*(1-b)*(1-b)},getNow:function(){var b=1-((new Date).getTime()-this.ts)/ this.spd,c=this.B2(b)+this.B3(b)+this.B4(b);return 0>b?this.ed:this.st+Math.round(this.df*c)},update:function(b,c){this.st=this.getNow();this.ed=b;this.spd=c;this.ts=(new Date).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};f.hastranslate3d&&f.isios&&this.doc.css("-webkit-backface-visibility","hidden");var r=function(){var d=b.doc.css(f.trstyle);return d&&"matrix"==d.substr(0,6)?d.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/): !1};this.getScrollTop=function(d){if(!d){if(d=r())return 16==d.length?-d[13]:-d[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(d){if(!d){if(d=r())return 16==d.length?-d[12]:-d[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=document.createEvent?function(b){var c=document.createEvent("UIEvents");c.initUIEvent("scroll",!1,!0,window,1);b.dispatchEvent(c)}: document.fireEvent?function(b){var c=document.createEventObject();b.fireEvent("onscroll");c.cancelBubble=!0}:function(b,c){};f.hastranslate3d&&b.opt.enabletranslate3d?(this.setScrollTop=function(d,c){b.doc.translate.y=d;b.doc.translate.ty=-1*d+"px";b.doc.css(f.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0px)");c||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(d,c){b.doc.translate.x=d;b.doc.translate.tx=-1*d+"px";b.doc.css(f.trstyle,"translate3d("+b.doc.translate.tx+ ","+b.doc.translate.ty+",0px)");c||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(d,c){b.doc.translate.y=d;b.doc.translate.ty=-1*d+"px";b.doc.css(f.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");c||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(d,c){b.doc.translate.x=d;b.doc.translate.tx=-1*d+"px";b.doc.css(f.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");c||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()}, this.setScrollTop=function(d){return b.docscroll.scrollTop(d)},this.getScrollLeft=function(){return b.docscroll.scrollLeft()},this.setScrollLeft=function(d){return b.docscroll.scrollLeft(d)};this.getTarget=function(b){return!b?!1:b.target?b.target:b.srcElement?b.srcElement:!1};this.hasParent=function(b,c){if(!b)return!1;for(var g=b.target||b.srcElement||b||!1;g&&g.id!=c;)g=g.parentNode||!1;return!1!==g};var u={thin:1,medium:3,thick:5};this.getOffset=function(){if(b.isfixed)return{top:parseFloat(b.win.css("top")), left:parseFloat(b.win.css("left"))};if(!b.viewport)return b.win.offset();var d=b.win.offset(),c=b.viewport.offset();return{top:d.top-c.top+b.viewport.scrollTop(),left:d.left-c.left+b.viewport.scrollLeft()}};this.updateScrollBar=function(d){if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()}),b.railh&&b.railh.css({width:b.win.innerWidth()});else{var c=b.getOffset(),g=c.top,f=c.left,g=g+l(b.win,"border-top-width",!0);b.win.outerWidth();b.win.innerWidth();var f=f+(b.rail.align?b.win.outerWidth()- l(b.win,"border-right-width")-b.rail.width:l(b.win,"border-left-width")),e=b.opt.railoffset;e&&(e.top&&(g+=e.top),b.rail.align&&e.left&&(f+=e.left));b.locked||b.rail.css({top:g,left:f,height:d?d.h:b.win.innerHeight()});b.zoom&&b.zoom.css({top:g+1,left:1==b.rail.align?f-20:f+b.rail.width+4});b.railh&&!b.locked&&(g=c.top,f=c.left,d=b.railh.align?g+l(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:g+l(b.win,"border-top-width",!0),f+=l(b.win,"border-left-width"),b.railh.css({top:d,left:f, width:b.railh.width}))}};this.doRailClick=function(d,c,g){var f;b.locked||(b.cancelEvent(d),c?(c=g?b.doScrollLeft:b.doScrollTop,f=g?(d.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(d.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y,c(f)):(c=g?b.doScrollLeftBy:b.doScrollBy,f=g?b.scroll.x:b.scroll.y,d=g?d.pageX-b.railh.offset().left:d.pageY-b.rail.offset().top,g=g?b.view.w:b.view.h,f>=d?c(g):c(-g)))};b.hasanimationframe=v;b.hascancelanimationframe=w;b.hasanimationframe?b.hascancelanimationframe|| (w=function(){b.cancelAnimationFrame=!0}):(v=function(b){return setTimeout(b,15-Math.floor(+new Date/1E3)%16)},w=clearInterval);this.init=function(){b.saved.css=[];if(f.isie7mobile)return!0;f.hasmstouch&&b.css(b.ispage?e("html"):b.win,{"-ms-touch-action":"none"});b.zindex="auto";b.zindex=!b.ispage&&"auto"==b.opt.zindex?h()||"auto":b.opt.zindex;!b.ispage&&"auto"!=b.zindex&&b.zindex>x&&(x=b.zindex);b.isie&&(0==b.zindex&&"auto"==b.opt.zindex)&&(b.zindex="auto");if(!b.ispage||!f.cantouch&&!f.isieold&& !f.isie9mobile){var d=b.docscroll;b.ispage&&(d=b.haswrapper?b.win:b.doc);f.isie9mobile||b.css(d,{"overflow-y":"hidden"});b.ispage&&f.isie7&&("BODY"==b.doc[0].nodeName?b.css(e("html"),{"overflow-y":"hidden"}):"HTML"==b.doc[0].nodeName&&b.css(e("body"),{"overflow-y":"hidden"}));f.isios&&(!b.ispage&&!b.haswrapper)&&b.css(e("body"),{"-webkit-overflow-scrolling":"touch"});var c=e(document.createElement("div"));c.css({position:"relative",top:0,"float":"right",width:b.opt.cursorwidth,height:"0px","background-color":b.opt.cursorcolor, border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius,"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});c.hborder=parseFloat(c.outerHeight()-c.innerHeight());b.cursor=c;var g=e(document.createElement("div"));g.attr("id",b.id);g.addClass("nicescroll-rails");var l,k,n=["left","right"],G;for(G in n)k=n[G],(l=b.opt.railpadding[k])?g.css("padding-"+k,l+"px"):b.opt.railpadding[k]=0;g.append(c);g.width=Math.max(parseFloat(b.opt.cursorwidth), c.outerWidth())+b.opt.railpadding.left+b.opt.railpadding.right;g.css({width:g.width+"px",zIndex:b.zindex,background:b.opt.background,cursor:"default"});g.visibility=!0;g.scrollable=!0;g.align="left"==b.opt.railalign?0:1;b.rail=g;c=b.rail.drag=!1;b.opt.boxzoom&&(!b.ispage&&!f.isieold)&&(c=document.createElement("div"),b.bind(c,"click",b.doZoom),b.zoom=e(c),b.zoom.css({cursor:"pointer","z-index":b.zindex,backgroundImage:"url("+L+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),b.opt.dblclickzoom&& b.bind(b.win,"dblclick",b.doZoom),f.cantouch&&b.opt.gesturezoom&&(b.ongesturezoom=function(d){1.5d.scale&&b.doZoomOut(d);return b.cancelEvent(d)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(b.opt.horizrailenabled){b.css(d,{"overflow-x":"hidden"});c=e(document.createElement("div"));c.css({position:"relative",top:0,height:b.opt.cursorwidth,width:"0px","background-color":b.opt.cursorcolor,border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius, "-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});c.wborder=parseFloat(c.outerWidth()-c.innerWidth());b.cursorh=c;var m=e(document.createElement("div"));m.attr("id",b.id+"-hr");m.addClass("nicescroll-rails");m.height=Math.max(parseFloat(b.opt.cursorwidth),c.outerHeight());m.css({height:m.height+"px",zIndex:b.zindex,background:b.opt.background});m.append(c);m.visibility=!0;m.scrollable=!0;m.align="top"==b.opt.railvalign?0:1;b.railh=m;b.railh.drag=!1}b.ispage? (g.css({position:"fixed",top:"0px",height:"100%"}),g.align?g.css({right:"0px"}):g.css({left:"0px"}),b.body.append(g),b.railh&&(m.css({position:"fixed",left:"0px",width:"100%"}),m.align?m.css({bottom:"0px"}):m.css({top:"0px"}),b.body.append(m))):(b.ishwscroll?("static"==b.win.css("position")&&b.css(b.win,{position:"relative"}),d="HTML"==b.win[0].nodeName?b.body:b.win,b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":g.width+4}),d.append(b.zoom)),g.css({position:"absolute",top:0}), g.align?g.css({right:0}):g.css({left:0}),d.append(g),m&&(m.css({position:"absolute",left:0,bottom:0}),m.align?m.css({bottom:0}):m.css({top:0}),d.append(m))):(b.isfixed="fixed"==b.win.css("position"),d=b.isfixed?"fixed":"absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,!1==/relative|absolute/.test(b.viewport.css("position"))&&b.css(b.viewport,{position:"relative"})),g.css({position:d}),b.zoom&&b.zoom.css({position:d}),b.updateScrollBar(),b.body.append(g),b.zoom&& b.body.append(b.zoom),b.railh&&(m.css({position:d}),b.body.append(m))),f.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),f.isie&&b.opt.disableoutline&&b.win.attr("hideFocus","true"),f.iswebkit&&b.opt.disableoutline&&b.win.css({outline:"none"}));!1===b.opt.autohidemode?(b.autohidedom=!1,b.rail.css({opacity:b.opt.cursoropacitymax}),b.railh&&b.railh.css({opacity:b.opt.cursoropacitymax})):!0===b.opt.autohidemode?(b.autohidedom=e().add(b.rail),f.isie8&& (b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&f.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==b.opt.autohidemode?(b.autohidedom=e().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==b.opt.autohidemode?(b.autohidedom=e().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==b.opt.autohidemode&&(b.autohidedom=!1,b.hide(),b.locked=!1);if(f.isie9mobile)b.scrollmom=new H(b),b.onmangotouch= function(d){d=b.getScrollTop();var c=b.getScrollLeft();if(d==b.scrollmom.lastscrolly&&c==b.scrollmom.lastscrollx)return!0;var g=d-b.mangotouch.sy,f=c-b.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(f,2)+Math.pow(g,2)))){var p=0>g?-1:1,e=0>f?-1:1,h=+new Date;b.mangotouch.lazy&&clearTimeout(b.mangotouch.lazy);80s?s=Math.round(s/2):s>b.page.maxh&&(s=b.page.maxh+Math.round((s-b.page.maxh)/2)):(0>s&&(h=s=0),s>b.page.maxh&&(s=b.page.maxh,h=0));if(b.railh&&b.railh.scrollable){var m=b.rail.drag.sl-k;b.ishwscroll&&b.opt.bouncescroll?0>m?m=Math.round(m/2):m>b.page.maxw&&(m=b.page.maxw+ Math.round((m-b.page.maxw)/2)):(0>m&&(l=m=0),m>b.page.maxw&&(m=b.page.maxw,l=0))}g=!1;if(b.rail.drag.dl)g=!0,"v"==b.rail.drag.dl?m=b.rail.drag.sl:"h"==b.rail.drag.dl&&(s=b.rail.drag.st);else{var p=Math.abs(p),k=Math.abs(k),n=b.opt.directionlockdeadzone;if("v"==b.rail.drag.ck){if(p>n&&k<=0.3*p)return b.rail.drag=!1,!0;k>n&&(b.rail.drag.dl="f",e("body").scrollTop(e("body").scrollTop()))}else if("h"==b.rail.drag.ck){if(k>n&&p<=0.3*az)return b.rail.drag=!1,!0;p>n&&(b.rail.drag.dl="f",e("body").scrollLeft(e("body").scrollLeft()))}}b.synched("touchmove", function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.prepareTransition(0),b.rail.scrollable&&b.setScrollTop(s),b.scrollmom.update(l,h),b.railh&&b.railh.scrollable?(b.setScrollLeft(m),b.showCursor(s,m)):b.showCursor(s),f.isie10&&document.selection.clear())});f.ischrome&&b.istouchcapable&&(g=!1);if(g)return b.cancelEvent(d)}}}b.onmousedown=function(d,c){if(!(b.rail.drag&&1!=b.rail.drag.pt)){if(b.locked)return b.cancelEvent(d);b.cancelScroll();b.rail.drag={x:d.clientX,y:d.clientY,sx:b.scroll.x, sy:b.scroll.y,pt:1,hr:!!c};var g=b.getTarget(d);!b.ispage&&f.hasmousecapture&&g.setCapture();b.isiframe&&!f.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(d)}};b.onmouseup=function(d){if(b.rail.drag&&(f.hasmousecapture&&document.releaseCapture(),b.isiframe&&!f.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),1==b.rail.drag.pt))return b.rail.drag=!1,b.cancelEvent(d)};b.onmousemove=function(d){if(b.rail.drag&& 1==b.rail.drag.pt){if(f.ischrome&&0==d.which)return b.onmouseup(d);b.cursorfreezed=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(d.clientX-b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var c=b.scrollvaluemaxw;b.scroll.x>c&&(b.scroll.x=c)}else b.scroll.y=b.rail.drag.sy+(d.clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),c=b.scrollvaluemax,b.scroll.y>c&&(b.scroll.y=c);b.synched("mousemove",function(){b.rail.drag&&1==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x* b.scrollratio.x),b.opt.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),b.opt.cursordragspeed))});return b.cancelEvent(d)}};if(f.cantouch||b.opt.touchbehavior)b.onpreventclick=function(d){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(d)},b.bind(b.win,"mousedown",b.ontouchstart),b.onclick=f.isios?!1:function(d){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(d)):!0},b.opt.grabcursorenabled&&f.cursorgrabvalue&&(b.css(b.ispage? b.doc:b.win,{cursor:f.cursorgrabvalue}),b.css(b.rail,{cursor:f.cursorgrabvalue}));else{var r=function(d){if(b.selectiondrag){if(d){var c=b.win.outerHeight();d=d.pageY-b.selectiondrag.top;0=c&&(d-=c);b.selectiondrag.df=d}0!=b.selectiondrag.df&&(b.doScrollBy(2*-Math.floor(b.selectiondrag.df/6)),b.debounced("doselectionscroll",function(){r()},50))}};b.hasTextSelected="getSelection"in document?function(){return 0b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y)), b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x)),b.cursoractive&&b.noticeCursor());b.scroll.y&&0==b.getScrollTop()&&b.doScrollTo(Math.floor(b.scroll.y*b.scrollratio.y));return b};this.resize=b.onResize;this.lazyResize=function(d){d=isNaN(d)?30:d;b.delayed("resize",b.resize,d);return b};this._bind=function(d,c,g,f){b.events.push({e:d,n:c,f:g,b:f,q:!1});d.addEventListener?d.addEventListener(c,g,f||!1):d.attachEvent?d.attachEvent("on"+c,g):d["on"+c]=g};this.jqbind=function(d,c,g){b.events.push({e:d, n:c,f:g,q:!0});e(d).bind(c,g)};this.bind=function(d,c,g,e){var h="jquery"in d?d[0]:d;"mousewheel"==c?"onwheel"in b.win?b._bind(h,"wheel",g,e||!1):(d="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",n(h,d,g,e||!1),"DOMMouseScroll"==d&&n(h,"MozMousePixelScroll",g,e||!1)):h.addEventListener?(f.cantouch&&/mouseup|mousedown|mousemove/.test(c)&&b._bind(h,"mousedown"==c?"touchstart":"mouseup"==c?"touchend":"touchmove",function(b){if(b.touches){if(2>b.touches.length){var d=b.touches.length? b.touches[0]:b;d.original=b;g.call(this,d)}}else b.changedTouches&&(d=b.changedTouches[0],d.original=b,g.call(this,d))},e||!1),b._bind(h,c,g,e||!1),f.cantouch&&"mouseup"==c&&b._bind(h,"touchcancel",g,e||!1)):b._bind(h,c,function(d){if((d=d||window.event||!1)&&d.srcElement)d.target=d.srcElement;"pageY"in d||(d.pageX=d.clientX+document.documentElement.scrollLeft,d.pageY=d.clientY+document.documentElement.scrollTop);return!1===g.call(h,d)||!1===e?b.cancelEvent(d):!0})};this._unbind=function(b,c,g,f){b.removeEventListener? b.removeEventListener(c,g,f):b.detachEvent?b.detachEvent("on"+c,g):b["on"+c]=!1};this.unbindAll=function(){for(var d=0;d (b.newscrolly-h)*(e-h)||0>(b.newscrollx-l)*(c-l))&&b.cancelScroll();!1==b.opt.bouncescroll&&(0>e?e=0:e>b.page.maxh&&(e=b.page.maxh),0>c?c=0:c>b.page.maxw&&(c=b.page.maxw));if(b.scrollrunning&&c==b.newscrollx&&e==b.newscrolly)return!1;b.newscrolly=e;b.newscrollx=c;b.newscrollspeed=g||!1;if(b.timer)return!1;b.timer=setTimeout(function(){var g=b.getScrollTop(),h=b.getScrollLeft(),l,k;l=c-h;k=e-g;l=Math.round(Math.sqrt(Math.pow(l,2)+Math.pow(k,2)));l=b.newscrollspeed&&1=b.newscrollspeed&&(l*=b.newscrollspeed);b.prepareTransition(l,!0);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);0c?c=0:c>b.page.maxh&&(c=b.page.maxh);0>e?e=0:e>b.page.maxw&&(e=b.page.maxw);if(c!=b.newscrolly||e!=b.newscrollx)return b.doScrollPos(e,c,b.opt.snapbackspeed);b.onscrollend&&b.scrollrunning&&b.onscrollend.call(b,{type:"scrollend",current:{x:e,y:c},end:{x:b.newscrollx,y:b.newscrolly}});b.scrollrunning= !1}):(this.doScrollLeft=function(c,f){var g=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(c,g,f)},this.doScrollTop=function(c,f){var g=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(g,c,f)},this.doScrollPos=function(c,f,g){function e(){if(b.cancelAnimationFrame)return!0;b.scrollrunning=!0;if(r=1-r)return b.timer=v(e)||1;var c=0,d=sy=b.getScrollTop();if(b.dst.ay){var d=b.bzscroll?b.dst.py+b.bzscroll.getNow()*b.dst.ay:b.newscrolly,g=d-sy;if(0>g&&db.newscrolly)d= b.newscrolly;b.setScrollTop(d);d==b.newscrolly&&(c=1)}else c=1;var f=sx=b.getScrollLeft();if(b.dst.ax){f=b.bzscroll?b.dst.px+b.bzscroll.getNow()*b.dst.ax:b.newscrollx;g=f-sx;if(0>g&&fb.newscrollx)f=b.newscrollx;b.setScrollLeft(f);f==b.newscrollx&&(c+=1)}else c+=1;2==c?(b.timer=0,b.cursorfreezed=!1,b.bzscroll=!1,b.scrollrunning=!1,0>d?d=0:d>b.page.maxh&&(d=b.page.maxh),0>f?f=0:f>b.page.maxw&&(f=b.page.maxw),f!=b.newscrollx||d!=b.newscrolly?b.doScrollPos(f,d):b.onscrollend&&b.onscrollend.call(b, {type:"scrollend",current:{x:sx,y:sy},end:{x:b.newscrollx,y:b.newscrolly}})):b.timer=v(e)||1}f="undefined"==typeof f||!1===f?b.getScrollTop(!0):f;if(b.timer&&b.newscrolly==f&&b.newscrollx==c)return!0;b.timer&&w(b.timer);b.timer=0;var h=b.getScrollTop(),l=b.getScrollLeft();(0>(b.newscrolly-h)*(f-h)||0>(b.newscrollx-l)*(c-l))&&b.cancelScroll();b.newscrolly=f;b.newscrollx=c;if(!b.bouncescroll||!b.rail.visibility)0>b.newscrolly?b.newscrolly=0:b.newscrolly>b.page.maxh&&(b.newscrolly=b.page.maxh);if(!b.bouncescroll|| !b.railh.visibility)0>b.newscrollx?b.newscrollx=0:b.newscrollx>b.page.maxw&&(b.newscrollx=b.page.maxw);b.dst={};b.dst.x=c-l;b.dst.y=f-h;b.dst.px=l;b.dst.py=h;var k=Math.round(Math.sqrt(Math.pow(b.dst.x,2)+Math.pow(b.dst.y,2)));b.dst.ax=b.dst.x/k;b.dst.ay=b.dst.y/k;var n=0,q=k;0==b.dst.x?(n=h,q=f,b.dst.ay=1,b.dst.py=0):0==b.dst.y&&(n=l,q=c,b.dst.ax=1,b.dst.px=0);k=b.getTransitionSpeed(k);g&&1>=g&&(k*=g);b.bzscroll=0=b.page.maxh||l==b.page.maxw&&c>=b.page.maxw)&&b.checkContentSize();var r=1;b.cancelAnimationFrame=!1;b.timer=1;b.onscrollstart&&!b.scrollrunning&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:l,y:h},request:{x:c,y:f},end:{x:b.newscrollx,y:b.newscrolly},speed:k});e();(h==b.page.maxh&&f>=h||l==b.page.maxw&&c>=l)&&b.checkContentSize();b.noticeCursor()}},this.cancelScroll=function(){b.timer&&w(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=!1;return b}):(this.doScrollLeft=function(c, f){var g=b.getScrollTop();b.doScrollPos(c,g,f)},this.doScrollTop=function(c,f){var g=b.getScrollLeft();b.doScrollPos(g,c,f)},this.doScrollPos=function(c,f,g){var e=c>b.page.maxw?b.page.maxw:c;0>e&&(e=0);var h=f>b.page.maxh?b.page.maxh:f;0>h&&(h=0);b.synched("scroll",function(){b.setScrollTop(h);b.setScrollLeft(e)})},this.cancelScroll=function(){});this.doScrollBy=function(c,f){var g=0,g=f?Math.floor((b.scroll.y-c)*b.scrollratio.y):(b.timer?b.newscrolly:b.getScrollTop(!0))-c;if(b.bouncescroll){var e= Math.round(b.view.h/2);g<-e?g=-e:g>b.page.maxh+e&&(g=b.page.maxh+e)}b.cursorfreezed=!1;py=b.getScrollTop(!0);if(0>g&&0>=py)return b.noticeCursor();if(g>b.page.maxh&&py>=b.page.maxh)return b.checkContentSize(),b.noticeCursor();b.doScrollTop(g)};this.doScrollLeftBy=function(c,f){var g=0,g=f?Math.floor((b.scroll.x-c)*b.scrollratio.x):(b.timer?b.newscrollx:b.getScrollLeft(!0))-c;if(b.bouncescroll){var e=Math.round(b.view.w/2);g<-e?g=-e:g>b.page.maxw+e&&(g=b.page.maxw+e)}b.cursorfreezed=!1;px=b.getScrollLeft(!0); if(0>g&&0>=px||g>b.page.maxw&&px>=b.page.maxw)return b.noticeCursor();b.doScrollLeft(g)};this.doScrollTo=function(c,f){f&&Math.round(c*b.scrollratio.y);b.cursorfreezed=!1;b.doScrollTop(c)};this.checkContentSize=function(){var c=b.getContentSize();(c.h!=b.page.h||c.w!=b.page.w)&&b.resize(!1,c)};b.onscroll=function(c){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x))); b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(c){if(!b.zoomactive){b.zoomactive=!0;b.zoomrestore={style:{}};var h="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),g=b.win[0].style,l;for(l in h){var k=h[l];b.zoomrestore.style[k]="undefined"!=typeof g[k]?g[k]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()- b.win.height()};f.isios4&&(b.zoomrestore.scrollTop=e(window).scrollTop(),e(window).scrollTop(0));b.win.css({position:f.isios4?"absolute":"fixed",top:0,left:0,"z-index":x+100,margin:"0px"});h=b.win.css("backgroundColor");(""==h||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(h))&&b.win.css("backgroundColor","#fff");b.rail.css({"z-index":x+101});b.zoom.css({"z-index":x+102});b.zoom.css("backgroundPosition","0px -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(c)}};this.doZoomOut= function(c){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),f.isios4&&e(window).scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0px 0px"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(c)};this.doZoom=function(c){return b.zoomactive?b.doZoomOut(c):b.doZoomIn(c)};this.resizeZoom=function(){if(b.zoomactive){var c=b.getScrollTop();b.win.css({width:e(window).width()- b.zoomrestore.padding.w+"px",height:e(window).height()-b.zoomrestore.padding.h+"px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,c))}};this.init();e.nicescroll.push(this)},H=function(e){var c=this;this.nc=e;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(e,l){c.stop();var k=c.time();c.steptime= 0;c.lasttime=k;c.speedx=0;c.speedy=0;c.lastx=e;c.lasty=l;c.lastscrollx=-1;c.lastscrolly=-1};this.update=function(e,l){var k=c.time();c.steptime=k-c.lasttime;c.lasttime=k;var k=l-c.lasty,t=e-c.lastx,b=c.nc.getScrollTop(),q=c.nc.getScrollLeft(),b=b+k,q=q+t;c.snapx=0>q||q>c.nc.page.maxw;c.snapy=0>b||b>c.nc.page.maxh;c.speedx=t;c.speedy=k;c.lastx=e;c.lasty=l};this.stop=function(){c.nc.unsynched("domomentum2d");c.timer&&clearTimeout(c.timer);c.timer=0;c.lastscrollx=-1;c.lastscrolly=-1};this.doSnapy=function(e, l){var k=!1;0>l?(l=0,k=!0):l>c.nc.page.maxh&&(l=c.nc.page.maxh,k=!0);0>e?(e=0,k=!0):e>c.nc.page.maxw&&(e=c.nc.page.maxw,k=!0);k&&c.nc.doScrollPos(e,l,c.nc.opt.snapbackspeed)};this.doMomentum=function(e){var l=c.time(),k=e?l+e:c.lasttime;e=c.nc.getScrollLeft();var t=c.nc.getScrollTop(),b=c.nc.page.maxh,q=c.nc.page.maxw;c.speedx=0=l-k;if(0>t||t>b||0>e||e>q)k=!1;e=c.speedx&&k?c.speedx:!1;if(c.speedy&&k&&c.speedy||e){var f=Math.max(16, c.steptime);50r||r>q))e=0.1;if(c.speedy&&(u=Math.floor(c.lastscrolly-c.speedy*(1-c.demulxy)),c.lastscrolly=u,0>u||u>b))e=0.1;c.demulxy=Math.min(1,c.demulxy+e);c.nc.synched("domomentum2d", function(){c.speedx&&(c.nc.getScrollLeft()!=c.chkx&&c.stop(),c.chkx=r,c.nc.setScrollLeft(r));c.speedy&&(c.nc.getScrollTop()!=c.chky&&c.stop(),c.chky=u,c.nc.setScrollTop(u));c.timer||(c.nc.hideCursor(),c.doSnapy(r,u))});1>c.demulxy?c.timer=setTimeout(d,f):(c.stop(),c.nc.hideCursor(),c.doSnapy(r,u))};d()}else c.doSnapy(c.nc.getScrollLeft(),c.nc.getScrollTop())}},A=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(k,c,h){return(c=e.data(k,"__nicescroll")||!1)&&c.ishwscroll?c.getScrollTop():A.call(k)}, set:function(k,c){var h=e.data(k,"__nicescroll")||!1;h&&h.ishwscroll?h.setScrollTop(parseInt(c)):A.call(k,c);return this}};e.fn.scrollTop=function(k){if("undefined"==typeof k){var c=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollTop():A.call(this)}return this.each(function(){var c=e.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollTop(parseInt(k)):A.call(e(this),k)})};var B=e.fn.scrollLeft;e.cssHooks.pageXOffset={get:function(k,c,h){return(c=e.data(k,"__nicescroll")|| !1)&&c.ishwscroll?c.getScrollLeft():B.call(k)},set:function(k,c){var h=e.data(k,"__nicescroll")||!1;h&&h.ishwscroll?h.setScrollLeft(parseInt(c)):B.call(k,c);return this}};e.fn.scrollLeft=function(k){if("undefined"==typeof k){var c=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollLeft():B.call(this)}return this.each(function(){var c=e.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollLeft(parseInt(k)):B.call(e(this),k)})};var C=function(k){var c=this;this.length= 0;this.name="nicescrollarray";this.each=function(e){for(var h=0;h/g,"")),hashtag}function i(){"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/")}function p(){-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto")}function o(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+e+"=([^&#]*)",p=new RegExp(i),o=p.exec(t);return null==o?"":o[1]}e.prettyPhoto={version:"3.1.6"},e.fn.prettyPhoto=function(a){function s(){e(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(I/2-f.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:f.contentHeight,width:f.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:j/2-f.containerWidth/2<0?0:j/2-f.containerWidth/2,width:f.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(f.height).width(f.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==h(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(f.resized?e("a.pp_expand,a.pp_contract").show():e("a.pp_expand").hide()),!settings.autoplay_slideshow||P||v||e.prettyPhoto.startSlideshow(),settings.changepicturecallback(),v=!0}),m(),a.ajaxcallback()}function n(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){e(".pp_loaderIcon").show(),t()})}function r(t){t>1?e(".pp_nav").show():e(".pp_nav").hide()}function l(e,t){if(resized=!1,d(e,t),imageWidth=e,imageHeight=t,(k>j||b>I)&&doresize&&settings.allow_resize&&!$){for(resized=!0,fitting=!1;!fitting;)k>j?(imageWidth=j-200,imageHeight=t/e*imageWidth):b>I?(imageHeight=I-200,imageWidth=e/t*imageHeight):fitting=!0,b=imageHeight,k=imageWidth;(k>j||b>I)&&l(k,b),d(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(b),containerWidth:Math.floor(k)+2*settings.horizontal_padding,contentHeight:Math.floor(y),contentWidth:Math.floor(w),resized:resized}}function d(t,i){t=parseFloat(t),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(t),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(t),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),y=i+detailsHeight,w=t,b=y+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),k=t}function h(e){return e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)?"youtube":e.match(/vimeo\.com/i)?"vimeo":e.match(/\b.mov\b/i)?"quicktime":e.match(/\b.swf\b/i)?"flash":e.match(/\biframe=true\b/i)?"iframe":e.match(/\bajax=true\b/i)?"ajax":e.match(/\bcustom=true\b/i)?"custom":"#"==e.substr(0,1)?"inline":"image"}function c(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=_(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=I/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>I)return;$pp_pic_holder.css({top:projectedTop,left:j/2+scroll_pos.scrollLeft-contentwidth/2})}}function _(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function g(){I=e(window).height(),j=e(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(e(document).height()).width(j)}function m(){isSet&&settings.overlay_gallery&&"image"==h(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((f.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=e(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click(function(){return e.prettyPhoto.changeGalleryPage("next"),e.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").click(function(){return e.prettyPhoto.changeGalleryPage("previous"),e.prettyPhoto.stopSlideshow(),!1}),$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=57,$pp_gallery_li.each(function(t){e(this).find("a").click(function(){return e.prettyPhoto.changePage(t),e.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('Play'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return e.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:e(document).height(),width:e(window).width()}).bind("click",function(){settings.modal||e.prettyPhoto.close()}),e("a.pp_close").bind("click",function(){return e.prettyPhoto.close(),!1}),settings.allow_expand&&e("a.pp_expand").bind("click",function(){return e(this).hasClass("pp_expand")?(e(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(e(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),n(function(){e.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return e.prettyPhoto.changePage("previous"),e.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return e.prettyPhoto.changePage("next"),e.prettyPhoto.stopSlideshow(),!1}),c()}a=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'
       
      ',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
      {content}
      ',custom_markup:"",social_tools:''},a);var f,v,y,w,b,k,P,x=this,$=!1,I=e(window).height(),j=e(window).width();return doresize=!0,scroll_pos=_(),e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){c(),g()}),a.keyboard_shortcuts&&e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(t.keyCode){case 37:e.prettyPhoto.changePage("previous"),t.preventDefault();break;case 39:e.prettyPhoto.changePage("next"),t.preventDefault();break;case 27:settings.modal||e.prettyPhoto.close(),t.preventDefault()}}),e.prettyPhoto.initialize=function(){return settings=a,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=e(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=galleryRegExp.exec(theRel)?!0:!1,pp_images=isSet?jQuery.map(x,function(t){return-1!=e(t).attr(settings.hook).indexOf(theRel)?e(t).attr("href"):void 0}):e.makeArray(e(this).attr("href")),pp_titles=isSet?jQuery.map(x,function(t){return-1!=e(t).attr(settings.hook).indexOf(theRel)?e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):"":void 0}):e.makeArray(e(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(x,function(t){return-1!=e(t).attr(settings.hook).indexOf(theRel)?e(t).attr("title")?e(t).attr("title"):"":void 0}):e.makeArray(e(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(e(this).attr("href"),pp_images),rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this)),u(this),settings.allow_resize&&e(window).bind("scroll.prettyphoto",function(){c()}),e.prettyPhoto.open(),!1},e.prettyPhoto.open=function(t){return"undefined"==typeof settings&&(settings=a,pp_images=e.makeArray(arguments[0]),pp_titles=e.makeArray(arguments[1]?arguments[1]:""),pp_descriptions=e.makeArray(arguments[2]?arguments[2]:""),isSet=pp_images.length>1?!0:!1,set_position=arguments[3]?arguments[3]:0,u(t.target)),settings.hideflash&&e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),r(e(pp_images).size()),e(".pp_loaderIcon").show(),settings.deeplinking&&i(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+e(pp_images).size()),"undefined"!=typeof pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(o("width",pp_images[set_position]))?o("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(o("height",pp_images[set_position]))?o("height",pp_images[set_position]):settings.default_height.toString(),$=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(e(window).height()*parseFloat(movie_height)/100-150),$=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(e(window).width()*parseFloat(movie_width)/100-150),$=!0),$pp_pic_holder.fadeIn(function(){switch($ppt.html(settings.show_title&&""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?unescape(pp_titles[set_position]):" "),imgPreloader="",skipInjection=!1,h(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="http://www.youtube.com/embed/"+movie_id,movie+=o("rel",pp_images[set_position])?"?rel="+o("rel",pp_images[set_position]):"?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":f=l(movie_width,movie_height),movie_id=pp_images[set_position];var t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/,i=movie_id.match(t);movie="http://player.vimeo.com/video/"+i[3]+"?title=0&byline=0&portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=f.width+"/embed/?moog_width="+f.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,f.height).replace(/{path}/g,movie);break;case"quicktime":f=l(movie_width,movie_height),f.height+=15,f.contentHeight+=15,f.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":f=l(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,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":f=l(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,f.width).replace(/{height}/g,f.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,f=l(movie_width,movie_height),doresize=!0,skipInjection=!0,e.get(pp_images[set_position],function(e){toInject=settings.inline_markup.replace(/{content}/g,e),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,s()});break;case"custom":f=l(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=e(pp_images[set_position]).clone().append('
      ').css({width:settings.default_width}).wrapInner('
      ').appendTo(e("body")).show(),doresize=!1,f=l(e(myClone).width(),e(myClone).height()),doresize=!0,e(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,s())}),!1},e.prettyPhoto.changePage=function(t){currentGalleryPage=0,"previous"==t?(set_position--,set_position<0&&(set_position=e(pp_images).size()-1)):"next"==t?(set_position++,set_position>e(pp_images).size()-1&&(set_position=0)):set_position=t,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&e(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),n(function(){e.prettyPhoto.open()})},e.prettyPhoto.changeGalleryPage=function(e){"next"==e?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==e?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=e,slide_speed="next"==e||"previous"==e?settings.animation_speed:0,slide_to=currentGalleryPage*itemsPerPage*itemWidth,$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},e.prettyPhoto.startSlideshow=function(){"undefined"==typeof P?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return e.prettyPhoto.stopSlideshow(),!1}),P=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)):e.prettyPhoto.changePage("next")},e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return e.prettyPhoto.startSlideshow(),!1}),clearInterval(P),P=void 0},e.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(e.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){e(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),e(this).remove(),e(window).unbind("scroll.prettyphoto"),p(),settings.callback(),doresize=!0,v=!1,delete settings}))},!pp_alreadyInitialized&&t()&&(pp_alreadyInitialized=!0,hashIndex=t(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){e("a["+a.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)}}(jQuery);var pp_alreadyInitialized=!1; (function($){"use strict";$.fn.fitVids=function(options){var settings={customSelector:null};if(!document.getElementById('fit-vids-style')){var div=document.createElement('div'),ref=document.getElementsByTagName('base')[0]||document.getElementsByTagName('script')[0];div.className='fit-vids-style';div.id='fit-vids-style';div.style.display='none';div.innerHTML='­';ref.parentNode.insertBefore(div,ref)}if(options){$.extend(settings,options)}return this.each(function(){var selectors=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];if(settings.customSelector){selectors.push(settings.customSelector)}var $allVideos=$(this).find(selectors.join(','));$allVideos=$allVideos.not("object object");$allVideos.each(function(){var $this=$(this);if(this.tagName.toLowerCase()==='embed'&&$this.parent('object').length||$this.parent('.fluid-width-video-wrapper').length){return}if($this.closest('.flexslider').length>0){if($this.closest('ul').find('li > img').length>0){var height=$this.closest('ul').height()}else if($this.closest('ul').find('video-wrap').length>0){var height=$this.closest('ul').find('video-wrap').height()}else{var height=500}var width=!isNaN(parseInt($this.closest('li').attr('width'),10))?parseInt($this.closest('li').attr('width'),10):$this.closest('li').width();var aspectRatio=height/width}else if($this.closest('.portfolio_images').length>0){var width=$j('.portfolio_images').width();if($this.next('img').length>0){var height=$this.next('img').height()}else{var height=500}var aspectRatio=height/width}else if($this.closest('.post_image').length){var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'),10))))?parseInt($this.attr('height'),10):$this.height(),width=!isNaN(parseInt($this.attr('width'),10))?parseInt($this.attr('width'),10):$this.width(),aspectRatio=height/width}else if($this.closest('.q_masonry_blog_post_image').length){var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'),10))))?parseInt($this.attr('height'),10):$this.height(),width=!isNaN(parseInt($this.attr('width'),10))?parseInt($this.attr('width'),10):$this.width(),aspectRatio=height/width}else{var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'),10))))?parseInt($this.attr('height'),10):$this.height(),width=!isNaN(parseInt($this.attr('width'),10))?parseInt($this.attr('width'),10):$this.parent().width(),aspectRatio=height/width}if(!$this.attr('id')){var videoID='fitvid'+Math.floor(Math.random()*999999);$this.attr('id',videoID)}$this.wrap('
      ');$('.fluid-width-video-wrapper').css('padding-top',(aspectRatio*100)+"%")})})}})(jQuery); !function(a){a.flexslider=function(b,c){var d=a(b);d.vars=a.extend({},a.flexslider.defaults,c);var j,e=d.vars.namespace,f=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,g=("ontouchstart"in window||f||window.DocumentTouch&&document instanceof DocumentTouch)&&d.vars.touch,h="click touchend MSPointerUp",i="",k="vertical"===d.vars.direction,l=d.vars.reverse,m=d.vars.itemWidth>0,n="fade"===d.vars.animation,o=""!==d.vars.asNavFor,p={},q=!0;a.data(b,"flexslider",d),p={init:function(){d.animating=!1,d.currentSlide=parseInt(d.vars.startAt?d.vars.startAt:0,10),isNaN(d.currentSlide)&&(d.currentSlide=0),d.animatingTo=d.currentSlide,d.atEnd=0===d.currentSlide||d.currentSlide===d.last,d.containerSelector=d.vars.selector.substr(0,d.vars.selector.search(" ")),d.slides=a(d.vars.selector,d),d.container=a(d.containerSelector,d),d.count=d.slides.length,d.syncExists=a(d.vars.sync).length>0,"slide"===d.vars.animation&&(d.vars.animation="swing"),d.prop=k?"top":"marginLeft",d.args={},d.manualPause=!1,d.stopped=!1,d.started=!1,d.startTimeout=null,d.transitions=!d.vars.video&&!n&&d.vars.useCSS&&function(){var a=document.createElement("div"),b=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var c in b)if(void 0!==a.style[b[c]])return d.pfx=b[c].replace("Perspective","").toLowerCase(),d.prop="-"+d.pfx+"-transform",!0;return!1}(),d.ensureAnimationEnd="",""!==d.vars.controlsContainer&&(d.controlsContainer=a(d.vars.controlsContainer).length>0&&a(d.vars.controlsContainer)),""!==d.vars.manualControls&&(d.manualControls=a(d.vars.manualControls).length>0&&a(d.vars.manualControls)),d.vars.randomize&&(d.slides.sort(function(){return Math.round(Math.random())-.5}),d.container.empty().append(d.slides)),d.doMath(),d.setup("init"),d.vars.controlNav&&p.controlNav.setup(),d.vars.directionNav&&p.directionNav.setup(),d.vars.keyboard&&(1===a(d.containerSelector).length||d.vars.multipleKeyboard)&&a(document).bind("keyup",function(a){var b=a.keyCode;if(!d.animating&&(39===b||37===b)){var c=39===b?d.getTarget("next"):37===b?d.getTarget("prev"):!1;d.flexAnimate(c,d.vars.pauseOnAction)}}),d.vars.mousewheel&&d.bind("mousewheel",function(a,b){a.preventDefault();var f=0>b?d.getTarget("next"):d.getTarget("prev");d.flexAnimate(f,d.vars.pauseOnAction)}),d.vars.pausePlay&&p.pausePlay.setup(),d.vars.slideshow&&d.vars.pauseInvisible&&p.pauseInvisible.init(),d.vars.slideshow&&(d.vars.pauseOnHover&&d.hover(function(){d.manualPlay||d.manualPause||d.pause()},function(){d.manualPause||d.manualPlay||d.stopped||d.play()}),d.vars.pauseInvisible&&p.pauseInvisible.isHidden()||(d.vars.initDelay>0?d.startTimeout=setTimeout(d.play,d.vars.initDelay):d.play())),o&&p.asNav.setup(),g&&d.vars.touch&&p.touch(),(!n||n&&d.vars.smoothHeight)&&a(window).bind("resize orientationchange focus",p.resize),d.find("img").attr("draggable","false"),setTimeout(function(){d.vars.start(d)},200)},asNav:{setup:function(){d.asNav=!0,d.animatingTo=Math.floor(d.currentSlide/d.move),d.currentItem=d.currentSlide,d.slides.removeClass(e+"active-slide").eq(d.currentItem).addClass(e+"active-slide"),f?(b._slider=d,d.slides.each(function(){var b=this;b._gesture=new MSGesture,b._gesture.target=b,b.addEventListener("MSPointerDown",function(a){a.preventDefault(),a.currentTarget._gesture&&a.currentTarget._gesture.addPointer(a.pointerId)},!1),b.addEventListener("MSGestureTap",function(b){b.preventDefault();var c=a(this),e=c.index();a(d.vars.asNavFor).data("flexslider").animating||c.hasClass("active")||(d.direction=d.currentItem=g&&c.hasClass(e+"active-slide")?d.flexAnimate(d.getTarget("prev"),!0):a(d.vars.asNavFor).data("flexslider").animating||c.hasClass(e+"active-slide")||(d.direction=d.currentItem'),d.pagingCount>1)for(var j=0;j':""+c+"","thumbnails"===d.vars.controlNav&&!0===d.vars.thumbCaptions){var k=g.attr("data-thumbcaption");""!=k&&void 0!=k&&(f+=''+k+"")}d.controlNavScaffold.append("
    • "+f+"
    • "),c++}d.controlsContainer?a(d.controlsContainer).append(d.controlNavScaffold):d.append(d.controlNavScaffold),p.controlNav.set(),p.controlNav.active(),d.controlNavScaffold.delegate("a, img",h,function(b){if(b.preventDefault(),""===i||i===b.type){var c=a(this),f=d.controlNav.index(c);c.hasClass(e+"active")||(d.direction=f>d.currentSlide?"next":"prev",d.flexAnimate(f,d.vars.pauseOnAction))}""===i&&(i=b.type),p.setToClearWatchedEvent()})},setupManual:function(){d.controlNav=d.manualControls,p.controlNav.active(),d.controlNav.bind(h,function(b){if(b.preventDefault(),""===i||i===b.type){var c=a(this),f=d.controlNav.index(c);c.hasClass(e+"active")||(d.direction=f>d.currentSlide?"next":"prev",d.flexAnimate(f,d.vars.pauseOnAction))}""===i&&(i=b.type),p.setToClearWatchedEvent()})},set:function(){var b="thumbnails"===d.vars.controlNav?"img":"a";d.controlNav=a("."+e+"control-nav li "+b,d.controlsContainer?d.controlsContainer:d)},active:function(){d.controlNav.removeClass(e+"active").eq(d.animatingTo).addClass(e+"active")},update:function(b,c){d.pagingCount>1&&"add"===b?d.controlNavScaffold.append(a("
    • "+d.count+"
    • ")):1===d.pagingCount?d.controlNavScaffold.find("li").remove():d.controlNav.eq(c).closest("li").remove(),p.controlNav.set(),d.pagingCount>1&&d.pagingCount!==d.controlNav.length?d.update(c,b):p.controlNav.active()}},directionNav:{setup:function(){var b=a('");d.controlsContainer?(a(d.controlsContainer).append(b),d.directionNav=a("."+e+"direction-nav li a",d.controlsContainer)):(d.append(b),d.directionNav=a("."+e+"direction-nav li a",d)),p.directionNav.update(),d.directionNav.bind(h,function(b){b.preventDefault();var c;(""===i||i===b.type)&&(c=a(this).hasClass(e+"next")?d.getTarget("next"):d.getTarget("prev"),d.flexAnimate(c,d.vars.pauseOnAction)),""===i&&(i=b.type),p.setToClearWatchedEvent()})},update:function(){var a=e+"disabled";1===d.pagingCount?d.directionNav.addClass(a).attr("tabindex","-1"):d.vars.animationLoop?d.directionNav.removeClass(a).removeAttr("tabindex"):0===d.animatingTo?d.directionNav.removeClass(a).filter("."+e+"prev").addClass(a).attr("tabindex","-1"):d.animatingTo===d.last?d.directionNav.removeClass(a).filter("."+e+"next").addClass(a).attr("tabindex","-1"):d.directionNav.removeClass(a).removeAttr("tabindex")}},pausePlay:{setup:function(){var b=a('
      ');d.controlsContainer?(d.controlsContainer.append(b),d.pausePlay=a("."+e+"pauseplay a",d.controlsContainer)):(d.append(b),d.pausePlay=a("."+e+"pauseplay a",d)),p.pausePlay.update(d.vars.slideshow?e+"pause":e+"play"),d.pausePlay.bind(h,function(b){b.preventDefault(),(""===i||i===b.type)&&(a(this).hasClass(e+"pause")?(d.manualPause=!0,d.manualPlay=!1,d.pause()):(d.manualPause=!1,d.manualPlay=!0,d.play())),""===i&&(i=b.type),p.setToClearWatchedEvent()})},update:function(a){"play"===a?d.pausePlay.removeClass(e+"pause").addClass(e+"play").html(d.vars.playText):d.pausePlay.removeClass(e+"play").addClass(e+"pause").html(d.vars.pauseText)}},touch:function(){function r(f){d.animating?f.preventDefault():(window.navigator.msPointerEnabled||1===f.touches.length)&&(d.pause(),g=k?d.h:d.w,i=Number(new Date),o=f.touches[0].pageX,p=f.touches[0].pageY,e=m&&l&&d.animatingTo===d.last?0:m&&l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:m&&d.currentSlide===d.last?d.limit:m?(d.itemW+d.vars.itemMargin)*d.move*d.currentSlide:l?(d.last-d.currentSlide+d.cloneOffset)*g:(d.currentSlide+d.cloneOffset)*g,a=k?p:o,c=k?o:p,b.addEventListener("touchmove",s,!1),b.addEventListener("touchend",t,!1))}function s(b){o=b.touches[0].pageX,p=b.touches[0].pageY,h=k?a-p:a-o,j=k?Math.abs(h)f)&&(b.preventDefault(),!n&&d.transitions&&(d.vars.animationLoop||(h/=0===d.currentSlide&&0>h||d.currentSlide===d.last&&h>0?Math.abs(h)/g+2:1),d.setProps(e+h,"setTouch")))}function t(){if(b.removeEventListener("touchmove",s,!1),d.animatingTo===d.currentSlide&&!j&&null!==h){var k=l?-h:h,m=k>0?d.getTarget("next"):d.getTarget("prev");d.canAdvance(m)&&(Number(new Date)-i<550&&Math.abs(k)>50||Math.abs(k)>g/2)?d.flexAnimate(m,d.vars.pauseOnAction):n||d.flexAnimate(d.currentSlide,d.vars.pauseOnAction,!0)}b.removeEventListener("touchend",t,!1),a=null,c=null,h=null,e=null}function u(a){a.stopPropagation(),d.animating?a.preventDefault():(d.pause(),b._gesture.addPointer(a.pointerId),q=0,g=k?d.h:d.w,i=Number(new Date),e=m&&l&&d.animatingTo===d.last?0:m&&l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:m&&d.currentSlide===d.last?d.limit:m?(d.itemW+d.vars.itemMargin)*d.move*d.currentSlide:l?(d.last-d.currentSlide+d.cloneOffset)*g:(d.currentSlide+d.cloneOffset)*g)}function v(a){a.stopPropagation();var c=a.target._slider;if(c){var d=-a.translationX,f=-a.translationY;return q+=k?f:d,h=q,j=k?Math.abs(q)500)&&(a.preventDefault(),!n&&c.transitions&&(c.vars.animationLoop||(h=q/(0===c.currentSlide&&0>q||c.currentSlide===c.last&&q>0?Math.abs(q)/g+2:1)),c.setProps(e+h,"setTouch"))),void 0)}}function w(b){b.stopPropagation();var d=b.target._slider;if(d){if(d.animatingTo===d.currentSlide&&!j&&null!==h){var f=l?-h:h,k=f>0?d.getTarget("next"):d.getTarget("prev");d.canAdvance(k)&&(Number(new Date)-i<550&&Math.abs(f)>50||Math.abs(f)>g/2)?d.flexAnimate(k,d.vars.pauseOnAction):n||d.flexAnimate(d.currentSlide,d.vars.pauseOnAction,!0)}a=null,c=null,h=null,e=null,q=0}}var a,c,e,g,h,i,j=!1,o=0,p=0,q=0;f?(b.style.msTouchAction="none",b._gesture=new MSGesture,b._gesture.target=b,b.addEventListener("MSPointerDown",u,!1),b._slider=d,b.addEventListener("MSGestureChange",v,!1),b.addEventListener("MSGestureEnd",w,!1)):b.addEventListener("touchstart",r,!1)},resize:function(){!d.animating&&d.is(":visible")&&(m||d.doMath(),n?p.smoothHeight():m?(d.slides.width(d.computedW),d.update(d.pagingCount),d.setProps()):k?(d.viewport.height(d.h),d.setProps(d.h,"setTotal")):(d.vars.smoothHeight&&p.smoothHeight(),d.newSlides.width(d.computedW),d.setProps(d.computedW,"setTotal")))},smoothHeight:function(a){if(!k||n){var b=n?d:d.viewport;a?b.animate({height:d.slides.eq(d.animatingTo).height()},a):b.height(d.slides.eq(d.animatingTo).height())}},sync:function(b){var c=a(d.vars.sync).data("flexslider"),e=d.animatingTo;switch(b){case"animate":c.flexAnimate(e,d.vars.pauseOnAction,!1,!0);break;case"play":c.playing||c.asNav||c.play();break;case"pause":c.pause()}},uniqueID:function(b){return b.find("[id]").each(function(){var b=a(this);b.attr("id",b.attr("id")+"_clone")}),b},pauseInvisible:{visProp:null,init:function(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b0?setTimeout(d.play,d.vars.initDelay):d.play()})}},isHidden:function(){return document[p.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(j),j=setTimeout(function(){i=""},3e3)}},d.flexAnimate=function(b,c,f,h,i){if(d.vars.animationLoop||b===d.currentSlide||(d.direction=b>d.currentSlide?"next":"prev"),o&&1===d.pagingCount&&(d.direction=d.currentItemd.limit&&1!==d.visible?d.limit:t):s=0===d.currentSlide&&b===d.count-1&&d.vars.animationLoop&&"next"!==d.direction?l?(d.count+d.cloneOffset)*q:0:d.currentSlide===d.last&&0===b&&d.vars.animationLoop&&"prev"!==d.direction?l?0:(d.count+1)*q:l?(d.count-1-b+d.cloneOffset)*q:(b+d.cloneOffset)*q,d.setProps(s,"",d.vars.animationSpeed),d.transitions?(d.vars.animationLoop&&d.atEnd||(d.animating=!1,d.currentSlide=d.animatingTo),d.container.unbind("webkitTransitionEnd transitionend"),d.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(d.ensureAnimationEnd),d.wrapup(q)}),clearTimeout(d.ensureAnimationEnd),d.ensureAnimationEnd=setTimeout(function(){d.wrapup(q)},d.vars.animationSpeed+100)):d.container.animate(d.args,d.vars.animationSpeed,d.vars.easing,function(){d.wrapup(q)})}d.vars.smoothHeight&&p.smoothHeight(d.vars.animationSpeed)}},d.wrapup=function(a){n||m||(0===d.currentSlide&&d.animatingTo===d.last&&d.vars.animationLoop?d.setProps(a,"jumpEnd"):d.currentSlide===d.last&&0===d.animatingTo&&d.vars.animationLoop&&d.setProps(a,"jumpStart")),d.animating=!1,d.currentSlide=d.animatingTo,d.vars.after(d)},d.animateSlides=function(){!d.animating&&q&&d.flexAnimate(d.getTarget("next"))},d.pause=function(){clearInterval(d.animatedSlides),d.animatedSlides=null,d.playing=!1,d.vars.pausePlay&&p.pausePlay.update("play"),d.syncExists&&p.sync("pause")},d.play=function(){d.playing&&clearInterval(d.animatedSlides),d.animatedSlides=d.animatedSlides||setInterval(d.animateSlides,d.vars.slideshowSpeed),d.started=d.playing=!0,d.vars.pausePlay&&p.pausePlay.update("pause"),d.syncExists&&p.sync("play")},d.stop=function(){d.pause(),d.stopped=!0},d.canAdvance=function(a,b){var c=o?d.pagingCount-1:d.last;return b?!0:o&&d.currentItem===d.count-1&&0===a&&"prev"===d.direction?!0:o&&0===d.currentItem&&a===d.pagingCount-1&&"next"!==d.direction?!1:a!==d.currentSlide||o?d.vars.animationLoop?!0:d.atEnd&&0===d.currentSlide&&a===c&&"next"!==d.direction?!1:d.atEnd&&d.currentSlide===c&&0===a&&"next"===d.direction?!1:!0:!1},d.getTarget=function(a){return d.direction=a,"next"===a?d.currentSlide===d.last?0:d.currentSlide+1:0===d.currentSlide?d.last:d.currentSlide-1},d.setProps=function(a,b,c){var e=function(){var c=a?a:(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo,e=function(){if(m)return"setTouch"===b?a:l&&d.animatingTo===d.last?0:l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:d.animatingTo===d.last?d.limit:c;switch(b){case"setTotal":return l?(d.count-1-d.currentSlide+d.cloneOffset)*a:(d.currentSlide+d.cloneOffset)*a;case"setTouch":return l?a:a;case"jumpEnd":return l?a:d.count*a;case"jumpStart":return l?d.count*a:a;default:return a}}();return-1*e+"px"}();d.transitions&&(e=k?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",c=void 0!==c?c/1e3+"s":"0s",d.container.css("-"+d.pfx+"-transition-duration",c),d.container.css("transition-duration",c)),d.args[d.prop]=e,(d.transitions||void 0===c)&&d.container.css(d.args),d.container.css("transform",e)},d.setup=function(b){if(n)d.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(g?d.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+d.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(d.currentSlide).css({opacity:1,zIndex:2}):d.slides.css({opacity:0,display:"block",zIndex:1}).eq(d.currentSlide).css({zIndex:2}).animate({opacity:1},d.vars.animationSpeed,d.vars.easing)),d.vars.smoothHeight&&p.smoothHeight();else{var c,f;"init"===b&&(d.viewport=a('
      ').css({overflow:"hidden",position:"relative"}).appendTo(d).append(d.container),d.cloneCount=0,d.cloneOffset=0,l&&(f=a.makeArray(d.slides).reverse(),d.slides=a(f),d.container.empty().append(d.slides))),d.vars.animationLoop&&!m&&(d.cloneCount=2,d.cloneOffset=1,"init"!==b&&d.container.find(".clone").remove(),p.uniqueID(d.slides.first().clone().addClass("clone").attr("aria-hidden","true")).appendTo(d.container),p.uniqueID(d.slides.last().clone().addClass("clone").attr("aria-hidden","true")).prependTo(d.container)),d.newSlides=a(d.vars.selector,d),c=l?d.count-1-d.currentSlide+d.cloneOffset:d.currentSlide+d.cloneOffset,k&&!m?(d.container.height(200*(d.count+d.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){d.newSlides.css({display:"block"}),d.doMath(),d.viewport.height(d.h),d.setProps(c*d.h,"init")},"init"===b?100:0)):(d.container.width(200*(d.count+d.cloneCount)+"%"),d.setProps(c*d.computedW,"init"),setTimeout(function(){d.doMath(),d.newSlides.css({width:d.computedW,"float":"left",display:"block"}),d.vars.smoothHeight&&p.smoothHeight()},"init"===b?100:0))}m||d.slides.removeClass(e+"active-slide").eq(d.currentSlide).addClass(e+"active-slide"),d.vars.init(d)},d.doMath=function(){var a=d.slides.first(),b=d.vars.itemMargin,c=d.vars.minItems,e=d.vars.maxItems;d.w=void 0===d.viewport?d.width():d.viewport.width(),d.h=a.height(),d.boxPadding=a.outerWidth()-a.width(),m?(d.itemT=d.vars.itemWidth+b,d.minW=c?c*d.itemT:d.w,d.maxW=e?e*d.itemT-b:d.w,d.itemW=d.minW>d.w?(d.w-b*(c-1))/c:d.maxWd.w?d.w:d.vars.itemWidth,d.visible=Math.floor(d.w/d.itemW),d.move=d.vars.move>0&&d.vars.moved.w?d.itemW*(d.count-1)+b*(d.count-1):(d.itemW+b)*d.count-d.w-b):(d.itemW=d.w,d.pagingCount=d.count,d.last=d.count-1),d.computedW=d.itemW-d.boxPadding},d.update=function(a,b){d.doMath(),m||(ad.controlNav.length?p.controlNav.update("add"):("remove"===b&&!m||d.pagingCountd.last&&(d.currentSlide-=1,d.animatingTo-=1),p.controlNav.update("remove",d.last))),d.vars.directionNav&&p.directionNav.update()},d.addSlide=function(b,c){var e=a(b);d.count+=1,d.last=d.count-1,k&&l?void 0!==c?d.slides.eq(d.count-c).after(e):d.container.prepend(e):void 0!==c?d.slides.eq(c).before(e):d.container.append(e),d.update(c,"add"),d.slides=a(d.vars.selector+":not(.clone)",d),d.setup(),d.vars.added(d)},d.removeSlide=function(b){var c=isNaN(b)?d.slides.index(a(b)):b;d.count-=1,d.last=d.count-1,isNaN(b)?a(b,d.slides).remove():k&&l?d.slides.eq(d.last).remove():d.slides.eq(b).remove(),d.doMath(),d.update(c,"remove"),d.slides=a(d.vars.selector+":not(.clone)",d),d.setup(),d.vars.removed(d)},p.init()},a(window).blur(function(){focused=!1}).focus(function(){focused=!0}),a.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,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},a.fn.flexslider=function(b){if(void 0===b&&(b={}),"object"==typeof b)return this.each(function(){var c=a(this),d=b.selector?b.selector:".slides > li",e=c.find(d);1===e.length&&b.allowOneSlide===!0||0===e.length?(e.fadeIn(400),b.start&&b.start(c)):void 0===c.data("flexslider")&&new a.flexslider(this,b)});var c=a(this).data("flexslider");switch(b){case"play":c.play();break;case"pause":c.pause();break;case"stop":c.stop();break;case"next":c.flexAnimate(c.getTarget("next"),!0);break;case"prev":case"previous":c.flexAnimate(c.getTarget("prev"),!0);break;default:"number"==typeof b&&c.flexAnimate(b,!0)}}}(jQuery); (function(window,$,undefined){$.infinitescroll=function infscr(options,callback,element){this.element=$(element);this._create(options,callback);};$.infinitescroll.defaults={loading:{finished:undefined,finishedMsg:"Congratulations, you've reached the end of the internet.",img:"http://www.infinite-scroll.com/loading.gif",msg:null,msgText:"Loading the next set of posts...",selector:null,speed:'fast',start:undefined},state:{isDuringAjax:false,isInvalidPage:false,isDestroyed:false,isDone:false,isPaused:false,currPage:1},callback:undefined,debug:false,behavior:undefined,binder:$(window),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:false,pathParse:undefined,dataType:'html',appendCallback:true,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:undefined,path:undefined};$.infinitescroll.prototype={_binding:function infscr_binding(binding){var instance=this,opts=instance.options;if(!!opts.behavior&&this['_binding_'+opts.behavior]!==undefined){this['_binding_'+opts.behavior].call(this);return;} if(binding!=='bind'&&binding!=='unbind'){this._debug('Binding value '+binding+' not valid') return false;} if(binding=='unbind'){(this.options.binder).unbind('smartscroll.infscr.'+instance.options.infid);}else{(this.options.binder)[binding]('smartscroll.infscr.'+instance.options.infid,function(){instance.scroll();});};this._debug('Binding',binding);},_create:function infscr_create(options,callback){if(!this._validate(options)){return false;} var opts=this.options=$.extend(true,{},$.infinitescroll.defaults,options),relurl=/(.*?\/\/).*?(\/.*)/,path=$(opts.nextSelector).attr('href');opts.contentSelector=opts.contentSelector||this.element;opts.loading.selector=opts.loading.selector||opts.contentSelector;if(!path){this._debug('Navigation selector not found');return;} opts.path=this._determinepath(path);opts.loading.msg=$('
      '+opts.loading.msgText+'
      ');opts.pixelsFromNavToBottom=$(document).height()-$(opts.navSelector).offset().top;opts.loading.start=opts.loading.start||function(){$(opts.navSelector).hide();opts.loading.msg.appendTo(opts.loading.selector).show(opts.loading.speed,function(){beginAjax(opts);});};opts.loading.finished=opts.loading.finished||function(){opts.loading.msg.fadeOut('normal');};opts.callback=function(instance,data){if(!!opts.behavior&&instance['_callback_'+opts.behavior]!==undefined){instance['_callback_'+opts.behavior].call($(opts.contentSelector)[0],data);} if(callback){callback.call($(opts.contentSelector)[0],data);}};this._setup();},_debug:function infscr_debug(){if(this.options.debug){return window.console&&console.log.call(console,arguments);}},_determinepath:function infscr_determinepath(path){var opts=this.options;if(!!opts.behavior&&this['_determinepath_'+opts.behavior]!==undefined){this['_determinepath_'+opts.behavior].call(this,path);return;} if(!!opts.pathParse){this._debug('pathParse manual');return opts.pathParse;}else if(path.match(/^(.*?)\b2\b(.*?$)/)){path=path.match(/^(.*?)\b2\b(.*?$)/).slice(1);}else if(path.match(/^(.*?)2(.*?$)/)){if(path.match(/^(.*?page=)2(\/.*|$)/)){path=path.match(/^(.*?page=)2(\/.*|$)/).slice(1);return path;} path=path.match(/^(.*?)2(.*?$)/).slice(1);}else{if(path.match(/^(.*?page=)1(\/.*|$)/)){path=path.match(/^(.*?page=)1(\/.*|$)/).slice(1);return path;}else{this._debug('Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.');opts.state.isInvalidPage=true;}} this._debug('determinePath',path);return path;},_error:function infscr_error(xhr){var opts=this.options;if(!!opts.behavior&&this['_error_'+opts.behavior]!==undefined){this['_error_'+opts.behavior].call(this,xhr);return;} if(xhr!=='destroy'&&xhr!=='end'){xhr='unknown';} this._debug('Error',xhr);if(xhr=='end'){this._showdonemsg();} opts.state.isDone=true;opts.state.currPage=1;opts.state.isPaused=false;this._binding('unbind');},_loadcallback:function infscr_loadcallback(box,data){var opts=this.options,callback=this.options.callback,result=(opts.state.isDone)?'done':(!opts.appendCallback)?'no-append':'append',frag;if(!!opts.behavior&&this['_loadcallback_'+opts.behavior]!==undefined){this['_loadcallback_'+opts.behavior].call(this,box,data);return;} switch(result){case'done':this._showdonemsg();return false;break;case'no-append':if(opts.dataType=='html'){data='
      '+data+'
      ';data=$(data).find(opts.itemSelector);};break;case'append':var children=box.children();if(children.length==0){return this._error('end');} frag=document.createDocumentFragment();while(box[0].firstChild){frag.appendChild(box[0].firstChild);} this._debug('contentSelector',$(opts.contentSelector)[0]) $(opts.contentSelector)[0].appendChild(frag);data=children.get();break;} opts.loading.finished.call($(opts.contentSelector)[0],opts) if(opts.animate){var scrollTo=$(window).scrollTop()+$('#infscr-loading').height()+opts.extraScrollPx+'px';$('html,body').animate({scrollTop:scrollTo},800,function(){opts.state.isDuringAjax=false;});} if(!opts.animate)opts.state.isDuringAjax=false;callback(this,data);},_nearbottom:function infscr_nearbottom(){var opts=this.options,pixelsFromWindowBottomToBottom=0+$(document).height()-(opts.binder.scrollTop())-$(window).height();if(!!opts.behavior&&this['_nearbottom_'+opts.behavior]!==undefined){this['_nearbottom_'+opts.behavior].call(this);return;} this._debug('math:',pixelsFromWindowBottomToBottom,opts.pixelsFromNavToBottom);return(pixelsFromWindowBottomToBottom-opts.bufferPx-1&&$(opts[key]).length===0){this._debug('Your '+key+' found no elements.');return false;} return true;}},bind:function infscr_bind(){this._binding('bind');},destroy:function infscr_destroy(){this.options.state.isDestroyed=true;return this._error('destroy');},pause:function infscr_pause(){this._pausing('pause');},resume:function infscr_resume(){this._pausing('resume');},retrieve:function infscr_retrieve(pageNum){var instance=this,opts=instance.options,path=opts.path,box,frag,desturl,method,condition,pageNum=pageNum||null,getPage=(!!pageNum)?pageNum:opts.state.currPage;beginAjax=function infscr_ajax(opts){opts.state.currPage++;instance._debug('heading into ajax',path);box=$(opts.contentSelector).is('table')?$(''):$('
      ');desturl=path.join(opts.state.currPage);method=(opts.dataType=='html'||opts.dataType=='json')?opts.dataType:'html+callback';if(opts.appendCallback&&opts.dataType=='html')method+='+callback' switch(method){case'html+callback':instance._debug('Using HTML via .load() method');box.load(desturl+' '+opts.itemSelector,null,function infscr_ajax_callback(responseText){instance._loadcallback(box,responseText);});break;case'html':case'json':instance._debug('Using '+(method.toUpperCase())+' via $.ajax() method');$.ajax({url:desturl,dataType:opts.dataType,complete:function infscr_ajax_callback(jqXHR,textStatus){condition=(typeof(jqXHR.isResolved)!=='undefined')?(jqXHR.isResolved()):(textStatus==="success"||textStatus==="notmodified");(condition)?instance._loadcallback(box,jqXHR.responseText):instance._error('end');}});break;}};if(!!opts.behavior&&this['retrieve_'+opts.behavior]!==undefined){this['retrieve_'+opts.behavior].call(this,pageNum);return;} if(opts.state.isDestroyed){this._debug('Instance is destroyed');return false;};opts.state.isDuringAjax=true;opts.loading.start.call($(opts.contentSelector)[0],opts);},scroll:function infscr_scroll(){var opts=this.options,state=opts.state;if(!!opts.behavior&&this['scroll_'+opts.behavior]!==undefined){this['scroll_'+opts.behavior].call(this);return;} if(state.isDuringAjax||state.isInvalidPage||state.isDone||state.isDestroyed||state.isPaused)return;if(!this._nearbottom())return;this.retrieve();},toggle:function infscr_toggle(){this._pausing();},unbind:function infscr_unbind(){this._binding('unbind');},update:function infscr_options(key){if($.isPlainObject(key)){this.options=$.extend(true,this.options,key);}}} $.fn.infinitescroll=function infscr_init(options,callback){var thisCall=typeof options;switch(thisCall){case'string':var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=$.data(this,'infinitescroll');if(!instance){return false;} if(!$.isFunction(instance[options])||options.charAt(0)==="_"){return false;} instance[options].apply(instance,args);});break;case'object':this.each(function(){var instance=$.data(this,'infinitescroll');if(instance){instance.update(options);}else{$.data(this,'infinitescroll',new $.infinitescroll(options,callback,this));}});break;} return this;};var event=$.event,scrollTimeout;event.special.smartscroll={setup:function(){$(this).bind("scroll",event.special.smartscroll.handler);},teardown:function(){$(this).unbind("scroll",event.special.smartscroll.handler);},handler:function(event,execAsap){var context=this,args=arguments;event.type="smartscroll";if(scrollTimeout){clearTimeout(scrollTimeout);} scrollTimeout=setTimeout(function(){$.event.handle.apply(context,args);},execAsap==="execAsap"?0:100);}};$.fn.smartscroll=function(fn){return fn?this.bind("smartscroll",fn):this.trigger("smartscroll",["execAsap"]);};})(window,jQuery); (function($){var eventNamespace='waitForImages';$.waitForImages={hasImageProperties:['backgroundImage','listStyleImage','borderImage','borderCornerImage']};$.expr[':'].uncached=function(obj){if(!$(obj).is('img[src!=""]')){return false}var img=new Image();img.src=obj.src;return!img.complete};$.fn.waitForImages=function(finishedCallback,eachCallback,waitForAll){var allImgsLength=0;var allImgsLoaded=0;if($.isPlainObject(arguments[0])){waitForAll=arguments[0].waitForAll;eachCallback=arguments[0].each;finishedCallback=arguments[0].finished}finishedCallback=finishedCallback||$.noop;eachCallback=eachCallback||$.noop;waitForAll=!!waitForAll;if(!$.isFunction(finishedCallback)||!$.isFunction(eachCallback)){throw new TypeError('An invalid callback was supplied.');}return this.each(function(){var obj=$(this);var allImgs=[];var hasImgProperties=$.waitForImages.hasImageProperties||[];var matchUrl=/url\(\s*(['"]?)(.*?)\1\s*\)/g;if(waitForAll){obj.find('*').andSelf().each(function(){var element=$(this);if(element.is('img:uncached')){allImgs.push({src:element.attr('src'),element:element[0]})}$.each(hasImgProperties,function(i,property){var propertyValue=element.css(property);var match;if(!propertyValue){return true}while(match=matchUrl.exec(propertyValue)){allImgs.push({src:match[2],element:element[0]})}})})}else{obj.find('img:uncached').each(function(){allImgs.push({src:this.src,element:this})})}allImgsLength=allImgs.length;allImgsLoaded=0;if(allImgsLength===0){finishedCallback.call(obj[0])}$.each(allImgs,function(i,img){var image=new Image();$(image).bind('load.'+eventNamespace+' error.'+eventNamespace,function(event){allImgsLoaded++;eachCallback.call(img.element,allImgsLoaded,allImgsLength,event.type=='load');if(allImgsLoaded==allImgsLength){finishedCallback.call(obj[0]);return false}});image.src=img.src})})}}(jQuery)); ;(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)})(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;a.length>i;i++)n.append(a[i].name,a[i].value);if(t.extraData){var o=r(t.extraData);for(i=0;o.length>i;i++)o[i]&&n.append(o[i][0],o[i][1])}t.data=null;var s=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:u||"POST"});t.uploadProgress&&(s.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(100*(a/n))),t.uploadProgress(e,a,n,r)},!1),r}),s.data=null;var c=s.beforeSend;return s.beforeSend=function(e,r){r.data=t.formData?t.formData:n,c&&c.call(this,e,r)},e.ajax(s)}function s(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(r){a("cannot get iframe.contentWindow document: "+r)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function o(){function t(){try{var e=n(g).readyState;a("state="+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(r){a("Server abort: ",r," (",r.name,")"),s(k),j&&clearTimeout(j),j=void 0}}var r=f.attr2("target"),i=f.attr2("action");w.setAttribute("target",p),(!u||/post/i.test(u))&&w.setAttribute("method","POST"),i!=m.url&&w.setAttribute("action",m.url),m.skipEncodingOverride||u&&!/post/i.test(u)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(j=setTimeout(function(){T=!0,s(D)},m.timeout));var o=[];try{if(m.extraData)for(var c in m.extraData)m.extraData.hasOwnProperty(c)&&(e.isPlainObject(m.extraData[c])&&m.extraData[c].hasOwnProperty("name")&&m.extraData[c].hasOwnProperty("value")?o.push(e('').val(m.extraData[c].value).appendTo(w)[0]):o.push(e('').val(m.extraData[c]).appendTo(w)[0]));m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(l){var d=document.createElement("form").submit;d.apply(w)}}finally{w.setAttribute("action",i),r?w.setAttribute("target",r):f.removeAttr("target"),e(o).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),S.reject(x,"timeout"),void 0;if(t==k&&x)return x.abort("server abort"),S.reject(x,"error","server abort"),void 0;if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),setTimeout(s,250),void 0;var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(b){i="parsererror",x.error=r=b||i}}catch(b){a("error caught: ",b),i="error",x.error=r=b||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&300>x.status||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,b,y,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;h.length>l;l++)c=e(h[l]),i?c.prop("disabled",!1):c.removeAttr("disabled");if(m=e.extend(!0,{},e.ajaxSettings,t),m.context=m.context||m,p="jqFormIO"+(new Date).getTime(),m.iframeTarget?(v=e(m.iframeTarget),y=v.attr2("name"),y?p=y:v.attr2("name",p)):(v=e('':"vimeo"===g.type&&(c=''),f.addClass("owl-video-playing"),this._playing=f,d=a('
      '+c+"
      "),e.after(d)},d.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),d&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==b.orientation?(this._core.state.orientation=b.orientation,!1):!0},d.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=d}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){this.swapping="translated"==a.type},this),"translate.owl.carousel":a.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c)),f&&e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this.core=b,this.core.options=a.extend({},d.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay() },this),"play.owl.autoplay":a.proxy(function(a,b,c){this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};d.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},d.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(b.clearInterval(this.interval),this.interval=b.setInterval(a.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):b.clearInterval(this.interval)},d.prototype.play=function(){return c.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void b.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},d.prototype.stop=function(){b.clearInterval(this.interval)},d.prototype.pause=function(){b.clearInterval(this.interval)},d.prototype.destroy=function(){var a,c;b.clearInterval(this.interval);for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=d}(window.Zepto||window.jQuery,window,document),function(a){"use strict";var b=function(c){this._core=c,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.splice(b.position,0,a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":a.proxy(function(a){this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"change.owl.carousel":a.proxy(function(a){if("position"==a.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var b=this._core.current(),c=this._core.maximum(),d=this._core.minimum();a.data=a.property.value>c?b>=c?d:c:a.property.value").addClass(d.dotClass).append(a("")).prop("outerHTML")]),d.navContainer&&d.dotsContainer||(this._controls.$container=a("
      ").addClass(d.controlsClass).appendTo(this.$element)),this._controls.$indicators=d.dotsContainer?a(d.dotsContainer):a("
      ").hide().addClass(d.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",a.proxy(function(b){var c=a(b.target).parent().is(this._controls.$indicators)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(c,d.dotsSpeed)},this)),b=d.navContainer?a(d.navContainer):a("
      ").addClass(d.navContainerClass).prependTo(this._controls.$container),this._controls.$next=a("<"+d.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click",a.proxy(function(){this.prev(d.navSpeed)},this)),this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click",a.proxy(function(){this.next(d.navSpeed)},this));for(c in this._overrides)this._core[c]=a.proxy(this[c],this)},b.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},b.prototype.update=function(){var a,b,c,d=this._core.settings,e=this._core.clones().length/2,f=e+this._core.items().length,g=d.center||d.autoWidth||d.dotData?1:d.dotsEach||d.items;if("page"!==d.slideBy&&(d.slideBy=Math.min(d.slideBy,d.items)),d.dots||"page"==d.slideBy)for(this._pages=[],a=e,b=0,c=0;f>a;a++)(b>=g||0===b)&&(this._pages.push({start:a-e,end:a-e+g-1}),b=0,++c),b+=this._core.mergers(this._core.relative(a))},b.prototype.draw=function(){var b,c,d="",e=this._core.settings,f=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!e.nav||e.loop||e.navRewind||(this._controls.$previous.toggleClass("disabled",0>=f),this._controls.$next.toggleClass("disabled",f>=this._core.maximum())),this._controls.$previous.toggle(e.nav),this._controls.$next.toggle(e.nav),e.dots){if(b=this._pages.length-this._controls.$indicators.children().length,e.dotData&&0!==b){for(c=0;c0?(d=new Array(b+1).join(this._templates[0]),this._controls.$indicators.append(d)):0>b&&this._controls.$indicators.children().slice(b).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(a.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(e.dots)},b.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotData?1:c.dotsEach||c.items)}},b.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,function(a){return a.start<=b&&a.end>=b}).pop()},b.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},b.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},b.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},b.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=b}(window.Zepto||window.jQuery,window,document),function(a,b){"use strict";var c=function(d){this._core=d,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(){"URLHash"==this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[c]=b.content},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(){var a=b.location.hash.substring(1),c=this._core.$stage.children(),d=this._hashes[a]&&c.index(this._hashes[a])||0;return a?void this._core.to(d,!1,!0):!1},this))};c.Defaults={URLhashListener:!1},c.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=c}(window.Zepto||window.jQuery,window,document); (function(){var j=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function extender(f){var g=this.prototype;j=true;var h=new this();j=false;for(var i in f){h[i]=typeof f[i]=='function'&&typeof g[i]=='function'?(function(d,e){return function(){var b=this._super;this._super=function(a){return g[d].apply(this,a||[])};var c=e.apply(this,arguments);this._super=b;return c}})(i,f[i]):f[i]}function JQClass(){if(!j&&this._init){this._init.apply(this,arguments)}}JQClass.prototype=h;JQClass.prototype.constructor=JQClass;JQClass.extend=extender;return JQClass}})();(function($){JQClass.classes.JQPlugin=JQClass.extend({name:'plugin',defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return'is-'+this.name},_init:function(){$.extend(this.defaultOptions,(this.regionalOptions&&this.regionalOptions[''])||{});var c=camelCase(this.name);$[c]=this;$.fn[c]=function(a){var b=Array.prototype.slice.call(arguments,1);if($[c]._isNotChained(a,b)){return $[c][a].apply($[c],[this[0]].concat(b))}return this.each(function(){if(typeof a==='string'){if(a[0]==='_'||!$[c][a]){throw'Unknown method: '+a;}$[c][a].apply($[c],[this].concat(b))}else{$[c]._attach(this,a)}})}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_isNotChained:function(a,b){if(a==='option'&&(b.length===0||(b.length===1&&typeof b[0]==='string'))){return true}return $.inArray(a,this._getters)>-1},_attach:function(a,b){a=$(a);if(a.hasClass(this._getMarker())){return}a.addClass(this._getMarker());b=$.extend({},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c);this._postAttach(a,c);this.option(a,b)},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(d){try{var f=d.data(this.name.toLowerCase())||'';f=f.replace(/'/g,'"');f=f.replace(/([a-zA-Z0-9]+):/g,function(a,b,i){var c=f.substring(0,i).match(/"/g);return(!c||c.length%2===0?'"'+b+'":':b+':')});f=$.parseJSON('{'+f+'}');for(var g in f){var h=f[g];if(typeof h==='string'&&h.match(/^new Date\((.*)\)$/)){f[g]=eval(h)}}return f}catch(e){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name);if(!b||(typeof b==='string'&&c==null)){var e=(d||{}).options;return(e&&b?e[b]:e)}if(!a.hasClass(this._getMarker())){return}var e=b||{};if(typeof b==='string'){e={};e[b]=c}this._optionsChanged(a,d,e);$.extend(d.options,e)},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}this._preDestroy(a,this._getInst(a));a.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(a,b){}});function camelCase(c){return c.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}$.JQPlugin={createPlugin:function(a,b){if(typeof a==='object'){b=a;a='JQPlugin'}a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b);new JQClass.classes[c]()}}})(jQuery); (function($){var w='countdown';var Y=0;var O=1;var W=2;var D=3;var H=4;var M=5;var S=6;$.JQPlugin.createPlugin({name:w,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:'dHMS',layout:'',compact:false,padZeroes:false,significant:0,description:'',expiryUrl:'',expiryText:'',alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{'':{labels:['Years','Months','Weeks','Days','Hours','Minutes','Seconds'],labels1:['Year','Month','Week','Day','Hour','Minute','Second'],compactLabels:['y','m','w','d'],whichLabels:null,digits:['0','1','2','3','4','5','6','7','8','9'],timeSeparator:':',isRTL:false}},_getters:['getTimes'],_rtlClass:w+'-rtl',_sectionClass:w+'-section',_amountClass:w+'-amount',_periodClass:w+'-period',_rowClass:w+'-row',_holdingClass:w+'-holding',_showClass:w+'-show',_descrClass:w+'-descr',_timerElems:[],_init:function(){var c=this;this._super();this._serverSyncs=[];var d=(typeof Date.now=='function'?Date.now:function(){return new Date().getTime()});var e=(window.performance&&typeof window.performance.now=='function');function timerCallBack(a){var b=(a<1e12?(e?(performance.now()+performance.timing.navigationStart):d()):a||d());if(b-g>=1000){c._updateElems();g=b}f(timerCallBack)}var f=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var g=0;if(!f||$.noRequestAnimationFrame){$.noRequestAnimationFrame=null;setInterval(function(){c._updateElems()},980)}else{g=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||d();f(timerCallBack)}},UTCDate:function(a,b,c,e,f,g,h,i){if(typeof b=='object'&&b.constructor==Date){i=b.getMilliseconds();h=b.getSeconds();g=b.getMinutes();f=b.getHours();e=b.getDate();c=b.getMonth();b=b.getFullYear()}var d=new Date();d.setUTCFullYear(b);d.setUTCDate(1);d.setUTCMonth(c||0);d.setUTCDate(e||1);d.setUTCHours(f||0);d.setUTCMinutes((g||0)-(Math.abs(a)<30?a*60:a));d.setUTCSeconds(h||0);d.setUTCMilliseconds(i||0);return d},periodsToSeconds:function(a){return a[0]*31557600+a[1]*2629800+a[2]*604800+a[3]*86400+a[4]*3600+a[5]*60+a[6]},resync:function(){var d=this;$('.'+this._getMarker()).each(function(){var a=$.data(this,d.name);if(a.options.serverSync){var b=null;for(var i=0;i-1)},_removeElem:function(b){this._timerElems=$.map(this._timerElems,function(a){return(a==b?null:a)})},_updateElems:function(){for(var i=this._timerElems.length-1;i>=0;i--){this._updateCountdown(this._timerElems[i])}},_optionsChanged:function(a,b,c){if(c.layout){c.layout=c.layout.replace(/</g,'<').replace(/>/g,'>')}this._resetExtraLabels(b.options,c);var d=(b.options.timezone!=c.timezone);$.extend(b.options,c);this._adjustSettings(a,b,c.until!=null||c.since!=null||d);var e=new Date();if((b._since&&b._sincee)){this._addElem(a[0])}this._updateCountdown(a,b)},_updateCountdown:function(a,b){a=a.jquery?a:$(a);b=b||this._getInst(a);if(!b){return}a.html(this._generateHTML(b)).toggleClass(this._rtlClass,b.options.isRTL);if($.isFunction(b.options.onTick)){var c=b._hold!='lap'?b._periods:this._calculatePeriods(b,b._show,b.options.significant,new Date());if(b.options.tickInterval==1||this.periodsToSeconds(c)%b.options.tickInterval==0){b.options.onTick.apply(a[0],[c])}}var d=b._hold!='pause'&&(b._since?b._now.getTime()=b._until.getTime());if(d&&!b._expiring){b._expiring=true;if(this._hasElem(a[0])||b.options.alwaysExpire){this._removeElem(a[0]);if($.isFunction(b.options.onExpiry)){b.options.onExpiry.apply(a[0],[])}if(b.options.expiryText){var e=b.options.layout;b.options.layout=b.options.expiryText;this._updateCountdown(a[0],b);b.options.layout=e}if(b.options.expiryUrl){window.location=b.options.expiryUrl}}b._expiring=false}else if(b._hold=='pause'){this._removeElem(a[0])}},_resetExtraLabels:function(a,b){for(var n in b){if(n.match(/[Ll]abels[02-9]|compactLabels1/)){a[n]=b[n]}}for(var n in a){if(n.match(/[Ll]abels[02-9]|compactLabels1/)&&typeof b[n]==='undefined'){a[n]=null}}},_adjustSettings:function(a,b,c){var d=null;for(var i=0;i0);h[i]=(c._show[i]=='?'&&!e?null:c._show[i]);f+=(h[i]?1:0);g-=(c._periods[i]>0?1:0)}var j=[false,false,false,false,false,false,false];for(var i=S;i>=Y;i--){if(c._show[i]){if(c._periods[i]){j[i]=true}else{j[i]=g>0;g--}}}var k=(c.options.compact?c.options.compactLabels:c.options.labels);var l=c.options.whichLabels||this._normalLabels;var m=function(a){var b=c.options['compactLabels'+l(c._periods[a])];return(h[a]?d._translateDigits(c,c._periods[a])+(b?b[a]:k[a])+' ':'')};var n=(c.options.padZeroes?2:1);var o=function(a){var b=c.options['labels'+l(c._periods[a])];return((!c.options.significant&&h[a])||(c.options.significant&&j[a])?''+''+d._minDigits(c,c._periods[a],n)+''+''+(b?b[a]:k[a])+'':'')};return(c.options.layout?this._buildLayout(c,h,c.options.layout,c.options.compact,c.options.significant,j):((c.options.compact?''+m(Y)+m(O)+m(W)+m(D)+(h[H]?this._minDigits(c,c._periods[H],2):'')+(h[M]?(h[H]?c.options.timeSeparator:'')+this._minDigits(c,c._periods[M],2):'')+(h[S]?(h[H]||h[M]?c.options.timeSeparator:'')+this._minDigits(c,c._periods[S],2):''):''+o(Y)+o(O)+o(W)+o(D)+o(H)+o(M)+o(S))+''+(c.options.description?''+c.options.description+'':'')))},_buildLayout:function(c,d,e,f,g,h){var j=c.options[f?'compactLabels':'labels'];var k=c.options.whichLabels||this._normalLabels;var l=function(a){return(c.options[(f?'compactLabels':'labels')+k(c._periods[a])]||j)[a]};var m=function(a,b){return c.options.digits[Math.floor(a/b)%10]};var o={desc:c.options.description,sep:c.options.timeSeparator,yl:l(Y),yn:this._minDigits(c,c._periods[Y],1),ynn:this._minDigits(c,c._periods[Y],2),ynnn:this._minDigits(c,c._periods[Y],3),y1:m(c._periods[Y],1),y10:m(c._periods[Y],10),y100:m(c._periods[Y],100),y1000:m(c._periods[Y],1000),ol:l(O),on:this._minDigits(c,c._periods[O],1),onn:this._minDigits(c,c._periods[O],2),onnn:this._minDigits(c,c._periods[O],3),o1:m(c._periods[O],1),o10:m(c._periods[O],10),o100:m(c._periods[O],100),o1000:m(c._periods[O],1000),wl:l(W),wn:this._minDigits(c,c._periods[W],1),wnn:this._minDigits(c,c._periods[W],2),wnnn:this._minDigits(c,c._periods[W],3),w1:m(c._periods[W],1),w10:m(c._periods[W],10),w100:m(c._periods[W],100),w1000:m(c._periods[W],1000),dl:l(D),dn:this._minDigits(c,c._periods[D],1),dnn:this._minDigits(c,c._periods[D],2),dnnn:this._minDigits(c,c._periods[D],3),d1:m(c._periods[D],1),d10:m(c._periods[D],10),d100:m(c._periods[D],100),d1000:m(c._periods[D],1000),hl:l(H),hn:this._minDigits(c,c._periods[H],1),hnn:this._minDigits(c,c._periods[H],2),hnnn:this._minDigits(c,c._periods[H],3),h1:m(c._periods[H],1),h10:m(c._periods[H],10),h100:m(c._periods[H],100),h1000:m(c._periods[H],1000),ml:l(M),mn:this._minDigits(c,c._periods[M],1),mnn:this._minDigits(c,c._periods[M],2),mnnn:this._minDigits(c,c._periods[M],3),m1:m(c._periods[M],1),m10:m(c._periods[M],10),m100:m(c._periods[M],100),m1000:m(c._periods[M],1000),sl:l(S),sn:this._minDigits(c,c._periods[S],1),snn:this._minDigits(c,c._periods[S],2),snnn:this._minDigits(c,c._periods[S],3),s1:m(c._periods[S],1),s10:m(c._periods[S],10),s100:m(c._periods[S],100),s1000:m(c._periods[S],1000)};var p=e;for(var i=Y;i<=S;i++){var q='yowdhms'.charAt(i);var r=new RegExp('\\{'+q+'<\\}([\\s\\S]*)\\{'+q+'>\\}','g');p=p.replace(r,((!g&&d[i])||(g&&h[i])?'$1':''))}$.each(o,function(n,v){var a=new RegExp('\\{'+n+'\\}','g');p=p.replace(a,v)});return p},_minDigits:function(a,b,c){b=''+b;if(b.length>=c){return this._translateDigits(a,b)}b='0000000000'+b;return this._translateDigits(a,b.substr(b.length-c))},_translateDigits:function(b,c){return(''+c).replace(/[0-9]/g,function(a){return b.options.digits[a]})},_determineShow:function(a){var b=a.options.format;var c=[];c[Y]=(b.match('y')?'?':(b.match('Y')?'!':null));c[O]=(b.match('o')?'?':(b.match('O')?'!':null));c[W]=(b.match('w')?'?':(b.match('W')?'!':null));c[D]=(b.match('d')?'?':(b.match('D')?'!':null));c[H]=(b.match('h')?'?':(b.match('H')?'!':null));c[M]=(b.match('m')?'?':(b.match('M')?'!':null));c[S]=(b.match('s')?'?':(b.match('S')?'!':null));return c},_calculatePeriods:function(c,d,e,f){c._now=f;c._now.setMilliseconds(0);var g=new Date(c._now.getTime());if(c._since){if(f.getTime()c._until.getTime()){c._now=f=g}}var h=[0,0,0,0,0,0,0];if(d[Y]||d[O]){var i=this._getDaysInMonth(f.getFullYear(),f.getMonth());var j=this._getDaysInMonth(g.getFullYear(),g.getMonth());var k=(g.getDate()==f.getDate()||(g.getDate()>=Math.min(i,j)&&f.getDate()>=Math.min(i,j)));var l=function(a){return(a.getHours()*60+a.getMinutes())*60+a.getSeconds()};var m=Math.max(0,(g.getFullYear()-f.getFullYear())*12+g.getMonth()-f.getMonth()+((g.getDate()o){f.setDate(o)}f.setFullYear(f.getFullYear()+h[Y]);f.setMonth(f.getMonth()+h[O]);if(n){f.setDate(o)}}var p=Math.floor((g.getTime()-f.getTime())/1000);var q=function(a,b){h[a]=(d[a]?Math.floor(p/b):0);p-=h[a]*b};q(W,604800);q(D,86400);q(H,3600);q(M,60);q(S,1);if(p>0&&!c._since){var r=[1,12,4.3482,7,24,60,60];var s=S;var t=1;for(var u=S;u>=Y;u--){if(d[u]){if(h[s]>=t){h[s]=0;p=1}if(p>0){h[u]++;p=0;s=u;t=1}}t*=r[u]}}if(e){for(var u=Y;u<=S;u++){if(e&&h[u]){e--}else if(!e){h[u]=0}}}return h}})})(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'); }}; 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); }}; 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); }); }; FN._unbind_events=function(){ $cfs.unbind(cf_e('', conf)); $cfs.unbind(cf_e('', conf, false)); $cfs.unbind('_cfs_triggerEvent'); }; 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.bind(cf_e('resize', conf, false, true, true), onResize); }}; 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); }; 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(f){jQuery.fn.extend({slimScroll:function(g){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function s(d){d=d||window.event; var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}function m(d,f,g){k=!1;var e=d,h=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),h),e=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&w||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var w,x,y,A,z,r,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+ a.railClass);v();if(f.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==g.height?b.parent().height():g.height;n=f("
      ").addClass(a.wrapperClass).css({position:"relative", overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=f("
      ").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("
      ").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible? "block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)}); b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){u()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){w=!0;u();p()},function(){w=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&& (m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});v();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery); (function(a){a.fn.fullpage=function(c){function N(){a(".fp-section").each(function(){var b=a(this).find(".fp-slide");b.length?b.each(function(){A(a(this))}):A(a(this))});a.isFunction(c.afterRender)&&c.afterRender.call(this)}function O(){if(!c.autoScrolling){var b=a(window).scrollTop(),d=a(".fp-section").map(function(){if(a(this).offset().topMath.abs(z-y))Math.abs(C-B)> a(window).width()/100*c.touchSensitivity&&(C>B?a.fn.fullpage.moveSlideRight():a.fn.fullpage.moveSlideLeft());else if(c.autoScrolling&&(d=b.find(".fp-slides").length?b.find(".fp-slide.active").find(".fp-scrollable"):b.find(".fp-scrollable"),Math.abs(z-y)>a(window).height()/100*c.touchSensitivity))if(z>y)if(0z)if(0b)if(0g?"left":"right";l||a.isFunction(c.onSlideLeave)&&c.onSlideLeave.call(this, r,h+1,n,p)}d.addClass("active").siblings().removeClass("active");"undefined"===typeof s&&(s=g);c.loopHorizontal||(m.find(".fp-controlArrow.fp-prev").toggle(0!=g),m.find(".fp-controlArrow.fp-next").toggle(!d.is(":last-child")));m.hasClass("active")&&T(g,s,r);c.css3?(e="translate3d(-"+e.left+"px, 0px, 0px)",b.find(".fp-slidesContainer").toggleClass("fp-easing",0b||900>d?(900>d&&(f=d,c=900),c=(100*f/c).toFixed(2),a("body").css("font-size",c+"%")):a("body").css("font-size","100%")}function J(b,d){c.navigation&&(a("#fp-nav").find(".active").removeClass("active"),b?a("#fp-nav").find('a[href="#'+ b+'"]').addClass("active"):a("#fp-nav").find("li").eq(d).find("a").addClass("active"))}function I(b){c.menu&&(a(c.menu).find(".active").removeClass("active"),a(c.menu).find('[data-menuanchor="'+b+'"]').addClass("active"))}function D(b,a){if("top"===b)return!a.scrollTop();if("bottom"===b)return a.scrollTop()+1+a.innerHeight()>=a[0].scrollHeight}function H(b){var c=a(".fp-section.active").index(".fp-section");b=b.index(".fp-section");return c>b?"up":"down"}function A(b){b.css("overflow","hidden");var a= b.closest(".fp-section"),e=b.find(".fp-scrollable");if(e.length)var f=e.get(0).scrollHeight;else f=b.get(0).scrollHeight,c.verticalCentered&&(f=b.find(".fp-tableCell").get(0).scrollHeight);a=n-parseInt(a.css("padding-bottom"))-parseInt(a.css("padding-top"));f>a?e.length?e.css("height",a+"px").parent().css("height",a+"px"):(c.verticalCentered?b.find(".fp-tableCell").wrapInner('
      '):b.wrapInner('
      '),b.find(".fp-scrollable").slimScroll({allowPageScroll:!0, height:a+"px",size:"10px",alwaysVisible:!0})):Z(b);b.css("overflow","")}function Z(a){a.find(".fp-scrollable").children().first().unwrap().unwrap();a.find(".slimScrollBar").remove();a.find(".slimScrollRail").remove()}function $(a){a.addClass("fp-table").wrapInner('
      ')}function aa(a){var d=n;if(c.paddingTop||c.paddingBottom)d=a,d.hasClass("fp-section")||(d=a.closest(".fp-section")),a=parseInt(d.css("padding-top"))+parseInt(d.css("padding-bottom")), d=n-a;return d}function V(a,c){h.toggleClass("fp-easing",c);h.css(Y(a))}function L(b,c){"undefined"===typeof c&&(c=0);var e=isNaN(b)?a('[data-anchor="'+b+'"]'):a(".fp-section").eq(b-1);b===w||e.hasClass("active")?ba(e,c):l(e,function(){ba(e,c)})}function ba(a,c){if("undefined"!=typeof c){var e=a.find(".fp-slides"),f=e.find('[data-anchor="'+c+'"]');f.length||(f=e.find(".fp-slide").eq(c));f.length&&k(e,f)}}function ja(a,d){a.append('
        ');var e=a.find(".fp-slidesNav"); e.addClass(c.slidesNavPosition);for(var f=0;f');e.css("margin-left","-"+e.width()/2+"px");e.find("li").first().find("a").addClass("active")}function T(a,d,e){var f="";c.anchors.length&&(a?("undefined"!==typeof e&&(f=e),"undefined"===typeof d&&(d=a),K=d,location.hash=f+"/"+d):("undefined"!==typeof a&&(K=d),location.hash=e))}function ka(){var a=document.createElement("p"),c,e={webkitTransform:"-webkit-transform",OTransform:"-o-transform", msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(a,null);for(var f in e)void 0!==a.style[f]&&(a.style[f]="translate3d(1px,1px,1px)",c=window.getComputedStyle(a).getPropertyValue(e[f]));document.body.removeChild(a);return void 0!==c&&0
          ');var x=a("#fp-nav");x.css("color",c.navigationColor);x.addClass(c.navigationPosition)}a(".fp-section").each(function(b){var d=a(this),e=a(this).find(".fp-slide"),f=e.length;b||0!==a(".fp-section.active").length||a(this).addClass("active");a(this).css("height",n+"px");(c.paddingTop||c.paddingBottom)&& a(this).css("padding",c.paddingTop+" 0 "+c.paddingBottom+" 0");"undefined"!==typeof c.sectionsColor[b]&&a(this).css("background-color",c.sectionsColor[b]);"undefined"!==typeof c.anchors[b]&&a(this).attr("data-anchor",c.anchors[b]);if(c.navigation){var g="";c.anchors.length&&(g=c.anchors[b]);b=c.navigationTooltips[b];"undefined"===typeof b&&(b="");x.find("ul").append('
        • ')}if(1'); e.parent().wrap('
          ');a(this).find(".fp-slidesContainer").css("width",g+"%");a(this).find(".fp-slides").after('
          ');"#fff"!=c.controlArrowColor&&(a(this).find(".fp-controlArrow.fp-next").css("border-color","transparent transparent transparent "+c.controlArrowColor),a(this).find(".fp-controlArrow.fp-prev").css("border-color","transparent "+c.controlArrowColor+" transparent transparent"));c.loopHorizontal|| a(this).find(".fp-controlArrow.fp-prev").hide();c.slidesNavigation&&ja(a(this),f);e.each(function(b){var e=d.find(".fp-slide.active");b||0!=e.length?da(e):a(this).addClass("active");a(this).css("width",h+"%");c.verticalCentered&&$(a(this))})}else c.verticalCentered&&$(a(this))}).promise().done(function(){a.fn.fullpage.setAutoScrolling(c.autoScrolling);var b=a(".fp-section.active").find(".fp-slide.active");b.length&&(0!=a(".fp-section.active").index(".fp-section")||0==a(".fp-section.active").index(".fp-section")&& 0!=b.index())&&da(b);c.fixedElements&&c.css3&&a(c.fixedElements).appendTo("body");c.navigation&&(x.css("margin-top","-"+x.height()/2+"px"),x.find("li").eq(a(".fp-section.active").index(".fp-section")).find("a").addClass("active"));c.menu&&c.css3&&a(c.menu).closest(".fullpage-wrapper").length&&a(c.menu).appendTo("body");c.scrollOverflow?(h.hasClass("fullpage-used")&&N(),a(window).on("load",N)):a.isFunction(c.afterRender)&&c.afterRender.call(this);b=window.location.hash.replace("#","").split("/")[0]; if(b.length){var d=a('[data-anchor="'+b+'"]');!c.animateAnchor&&d.length&&(c.autoScrolling?v(d.position().top):(v(0),a("html, body").scrollTop(d.position().top)),I(b),J(b,null),a.isFunction(c.afterLoad)&&c.afterLoad.call(this,b,d.index(".fp-section")+1),d.addClass("active").siblings().removeClass("active"))}a(window).on("load",function(){var a=window.location.hash.replace("#","").split("/"),b=a[0],a=a[1];b&&L(b,a)})});var P,G=!1;a(window).on("scroll",O);var z=0,C=0,y=0,B=0;a.fn.fullpage.moveSectionUp= function(){var b=a(".fp-section.active").prev(".fp-section");b.length||!c.loopTop&&!c.continuousVertical||(b=a(".fp-section").last());b.length&&l(b,null,!0)};a.fn.fullpage.moveSectionDown=function(){var b=a(".fp-section.active").next(".fp-section");b.length||!c.loopBottom&&!c.continuousVertical||(b=a(".fp-section").first());(0'+b+"
          ").hide().appendTo(a(this)).fadeIn(200)},mouseleave:function(){a(this).find(".fp-tooltip").fadeOut().remove()}},"#fp-nav li");c.normalScrollElements&&(a(document).on("mouseenter",c.normalScrollElements,function(){a.fn.fullpage.setMouseWheelScrolling(!1)}), a(document).on("mouseleave",c.normalScrollElements,function(){a.fn.fullpage.setMouseWheelScrolling(!0)}));a(".fp-section").on("click",".fp-controlArrow",function(){a(this).hasClass("fp-prev")?a.fn.fullpage.moveSlideLeft():a.fn.fullpage.moveSlideRight()});a(".fp-section").on("click",".toSlide",function(b){b.preventDefault();b=a(this).closest(".fp-section").find(".fp-slides");b.find(".fp-slide.active");var c=null,c=b.find(".fp-slide").eq(a(this).data("index")-1);0 options.offset){ x=$(this).position().left; slide=i; }}); if(x > 0&&$sliderContainer.outerWidth() - scroll - $slider.width() - 1 > 0){ slideTo(e, $slider, scroll + x, slide, 'slow'); }else if(options.loop){ slideTo(e, $slider, 0, 0, 'slow'); }}); $slider.bind('prevSlide', function(e, t){ var scroll=$slider.scrollLeft(); var x=0; var slide=0; $items.each(function(i){ if($(this).position().left < options.offset){ x=$(this).position().left; slide=i; }}); if(x){ slideTo(e, $slider, scroll + x, slide, 'slow') }else if(options.loop){ var a=$sliderContainer.outerWidth() - $slider.width(); var b=$items.filter(':last').position().left; slide=$items.size() - 1; if(a > b){ slideTo(e, $slider, b, slide, 'slow'); }else{ slideTo(e, $slider, a, slide, 'slow'); }} }); $slider.bind('nextPage', function(e, t){ var scroll=$slider.scrollLeft(); var w=$slider.width(); var x=0; var slide=0; $items.each(function(i){ if($(this).position().left < w){ x=$(this).position().left; slide=i; }}); if(x > 0&&scroll + w + 1 < originalWidth){ slideTo(e, $slider, scroll + x, slide, 'slow'); }else if(options.loop){ slideTo(e, $slider, 0, 0, 'slow'); }}); $slider.bind('prevPage', function(e, t){ var scroll=$slider.scrollLeft(); var w=$slider.width(); var x=0; $items.each(function(i){ if($(this).position().left < 1 - w){ x=$(this).next().position().left; slide=i; }}); if(scroll){ if(x==0){ slideTo(e, $slider, 0, 0, 'slow'); }else{ slideTo(e, $slider, scroll + x, slide, 'slow'); }}else if(options.loop){ var a=$sliderContainer.outerWidth() - $slider.width(); var b=$items.filter(':last').position().left; if(a > b){ $slider.animate({ 'scrollLeft': b }, 'slow'); }else{ $slider.animate({ 'scrollLeft': a }, 'slow'); }} }); $slider.bind('slideTo', function(e, i, t){ slideTo( e, $slider, $slider.scrollLeft() + $items.filter(':eq(' + i + ')').position().left, i, t); }); $sliderControls.find('.next-slide').click(function(){ $slider.trigger('nextSlide'); return false; }); $sliderControls.find('.prev-slide').click(function(){ $slider.trigger('prevSlide'); return false; }); $sliderControls.find('.next-page').click(function(){ $slider.trigger('nextPage'); return false; }); $sliderControls.find('.prev-page').click(function(){ $slider.trigger('prevPage'); return false; }); $slider.data('slider', { 'target': $slider, 'options': options }) }}); }, addItem: function(options){ var options=$.extend({}, $.fn.lemmonSlider.defaults, options); var $slider=$(this), $sliderContainer=$slider.find(options.slider), $sliderControls=$slider.next().filter('.controls'), $items=$sliderContainer.find(options.items) options.infinite=$slider.data('slider-infinite') if(!options.item){ return false } methods.destroy.apply(this); if(options.prepend){ $sliderContainer.prepend(options.item); }else{ $sliderContainer.append(options.item); } methods.init.apply(this, [options]); }, destroy: function(){ return this.each(function(){ var $slider=$(this), $sliderControls=$slider.next().filter('.controls'), $items=$slider.find('> *:first > *'), data=$slider.data('slider'); $slider.unbind('nextSlide'); $slider.unbind('prevSlide'); $slider.unbind('nextPage'); $slider.unbind('prevPage'); $slider.unbind('slideTo'); $sliderControls.find('.next-slide').unbind('click'); $sliderControls.find('.prev-slide').unbind('click'); $sliderControls.find('.next-page').unbind('click'); $sliderControls.find('.next-page').unbind('click'); $slider.removeData('slider'); if($slider.data('slider-infinite')){ $.merge($items.filter('.-before'), $items.filter('.-after')).each(function(index, item){ $(item).remove(); }); }}); }} function slideTo(e, $slider, x, i, t){ $slider.items.filter('li:eq(' + i + ')').addClass('active').siblings('.active').removeClass('active'); if($slider.options.center){ var currentElement=$($slider.items[ i ]); $slider.options.offset=Math.floor(( $('.qode_image_gallery_holder').width() - currentElement.width()) / 2); console.log('set offset to ', $slider.options.offset); } if(typeof t=='undefined'){ t='slow'; } if(t){ $slider.animate({ 'scrollLeft': x - $slider.options.offset }, t, function(){ checkInfinite($slider); }); }else{ var time=0; $slider.scrollLeft(x - $slider.options.offset); checkInfinite($slider); }} function checkInfinite($slider){ var $active=$slider.items.filter('.active'); if($active.hasClass('-before')){ var i=$active.prevAll().size(); $active.removeClass('active'); $active=$slider.items.filter(':not(.-before):eq(' + i + ')').addClass('active'); $slider.scrollLeft($slider.scrollLeft() + $active.position().left - $slider.options.offset); }else if($active.hasClass('-after')){ var i=$active.prevAll('.-after').size(); $active.removeClass('active'); $active=$slider.items.filter(':not(.-before):eq(' + i + ')').addClass('active'); $slider.scrollLeft($slider.scrollLeft() + $active.position().left - $slider.options.offset); }} function debug(text){ $('#debug span').text(text); } $.fn.lemmonSlider=function(method, options){ if(methods[method]){ return methods[ method ].apply(this, Array.prototype.slice.call(arguments, 1)); }else if(typeof method==='object'||!method){ return methods.init.apply(this, arguments); }else{ $.error('Method ' + method + ' does not exist on jQuery.lemmonSlider'); }}; $.fn.lemmonSlider.defaults={ 'items': '> *', 'loop': true, 'slideToLast': false, 'slider': '> *:first', 'infinite': true, 'center': true, 'offset': 0 }})(jQuery); (function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); (function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var p="left",o="right",e="up",x="down",c="in",z="out",m="none",s="auto",l="swipe",t="pinch",A="tap",j="doubletap",b="longtap",y="hold",D="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,B="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};f.fn.swipe=function(G){var F=f(this),E=F.data(B);if(E&&typeof G==="string"){if(E[G]){return E[G].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+G+" does not exist on jQuery.swipe")}}else{if(!E&&(typeof G==="object"||!G)){return w.apply(this,arguments)}}return F};f.fn.swipe.defaults=n;f.fn.swipe.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipe.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:z};f.fn.swipe.pageScroll={NONE:m,HORIZONTAL:D,VERTICAL:u,AUTO:s};f.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(E){if(E&&(E.allowPageScroll===undefined&&(E.swipe!==undefined||E.swipeStatus!==undefined))){E.allowPageScroll=m}if(E.click!==undefined&&E.tap===undefined){E.tap=E.click}if(!E){E={}}E=f.extend({},f.fn.swipe.defaults,E);return this.each(function(){var G=f(this);var F=G.data(B);if(!F){F=new C(this,E);G.data(B,F)}})}function C(a4,av){var az=(a||d||!av.fallbackToMouseEvents),J=az?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",ay=az?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",U=az?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",S=az?null:"mouseleave",aD=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ag=0,aP=null,ab=0,a1=0,aZ=0,G=1,aq=0,aJ=0,M=null;var aR=f(a4);var Z="start";var W=0;var aQ=null;var T=0,a2=0,a5=0,ad=0,N=0;var aW=null,af=null;try{aR.bind(J,aN);aR.bind(aD,a9)}catch(ak){f.error("events not supported "+J+","+aD+" on jQuery.swipe")}this.enable=function(){aR.bind(J,aN);aR.bind(aD,a9);return aR};this.disable=function(){aK();return aR};this.destroy=function(){aK();aR.data(B,null);return aR};this.option=function(bc,bb){if(av[bc]!==undefined){if(bb===undefined){return av[bc]}else{av[bc]=bb}}else{f.error("Option "+bc+" does not exist on jQuery.swipe.options")}return null};function aN(bd){if(aB()){return}if(f(bd.target).closest(av.excludedElements,aR).length>0){return}var be=bd.originalEvent?bd.originalEvent:bd;var bc,bb=a?be.touches[0]:be;Z=g;if(a){W=be.touches.length}else{bd.preventDefault()}ag=0;aP=null;aJ=null;ab=0;a1=0;aZ=0;G=1;aq=0;aQ=aj();M=aa();R();if(!a||(W===av.fingers||av.fingers===i)||aX()){ai(0,bb);T=at();if(W==2){ai(1,be.touches[1]);a1=aZ=au(aQ[0].start,aQ[1].start)}if(av.swipeStatus||av.pinchStatus){bc=O(be,Z)}}else{bc=false}if(bc===false){Z=q;O(be,Z);return bc}else{if(av.hold){af=setTimeout(f.proxy(function(){aR.trigger("hold",[be.target]);if(av.hold){bc=av.hold.call(aR,be,be.target)}},this),av.longTapThreshold)}ao(true)}return null}function a3(be){var bh=be.originalEvent?be.originalEvent:be;if(Z===h||Z===q||am()){return}var bd,bc=a?bh.touches[0]:bh;var bf=aH(bc);a2=at();if(a){W=bh.touches.length}if(av.hold){clearTimeout(af)}Z=k;if(W==2){if(a1==0){ai(1,bh.touches[1]);a1=aZ=au(aQ[0].start,aQ[1].start)}else{aH(bh.touches[1]);aZ=au(aQ[0].end,aQ[1].end);aJ=ar(aQ[0].end,aQ[1].end)}G=a7(a1,aZ);aq=Math.abs(a1-aZ)}if((W===av.fingers||av.fingers===i)||!a||aX()){aP=aL(bf.start,bf.end);al(be,aP);ag=aS(bf.start,bf.end);ab=aM();aI(aP,ag);if(av.swipeStatus||av.pinchStatus){bd=O(bh,Z)}if(!av.triggerOnTouchEnd||av.triggerOnTouchLeave){var bb=true;if(av.triggerOnTouchLeave){var bg=aY(this);bb=E(bf.end,bg)}if(!av.triggerOnTouchEnd&&bb){Z=aC(k)}else{if(av.triggerOnTouchLeave&&!bb){Z=aC(h)}}if(Z==q||Z==h){O(bh,Z)}}}else{Z=q;O(bh,Z)}if(bd===false){Z=q;O(bh,Z)}}function L(bb){var bc=bb.originalEvent;if(a){if(bc.touches.length>0){F();return true}}if(am()){W=ad}a2=at();ab=aM();if(ba()||!an()){Z=q;O(bc,Z)}else{if(av.triggerOnTouchEnd||(av.triggerOnTouchEnd==false&&Z===k)){bb.preventDefault();Z=h;O(bc,Z)}else{if(!av.triggerOnTouchEnd&&a6()){Z=h;aF(bc,Z,A)}else{if(Z===k){Z=q;O(bc,Z)}}}}ao(false);return null}function a9(){W=0;a2=0;T=0;a1=0;aZ=0;G=1;R();ao(false)}function K(bb){var bc=bb.originalEvent;if(av.triggerOnTouchLeave){Z=aC(h);O(bc,Z)}}function aK(){aR.unbind(J,aN);aR.unbind(aD,a9);aR.unbind(ay,a3);aR.unbind(U,L);if(S){aR.unbind(S,K)}ao(false)}function aC(bf){var be=bf;var bd=aA();var bc=an();var bb=ba();if(!bd||bb){be=q}else{if(bc&&bf==k&&(!av.triggerOnTouchEnd||av.triggerOnTouchLeave)){be=h}else{if(!bc&&bf==h&&av.triggerOnTouchLeave){be=q}}}return be}function O(bd,bb){var bc=undefined;if(I()||V()){bc=aF(bd,bb,l)}else{if((P()||aX())&&bc!==false){bc=aF(bd,bb,t)}}if(aG()&&bc!==false){bc=aF(bd,bb,j)}else{if(ap()&&bc!==false){bc=aF(bd,bb,b)}else{if(ah()&&bc!==false){bc=aF(bd,bb,A)}}}if(bb===q){a9(bd)}if(bb===h){if(a){if(bd.touches.length==0){a9(bd)}}else{a9(bd)}}return bc}function aF(be,bb,bd){var bc=undefined;if(bd==l){aR.trigger("swipeStatus",[bb,aP||null,ag||0,ab||0,W,aQ]);if(av.swipeStatus){bc=av.swipeStatus.call(aR,be,bb,aP||null,ag||0,ab||0,W,aQ);if(bc===false){return false}}if(bb==h&&aV()){aR.trigger("swipe",[aP,ag,ab,W,aQ]);if(av.swipe){bc=av.swipe.call(aR,be,aP,ag,ab,W,aQ);if(bc===false){return false}}switch(aP){case p:aR.trigger("swipeLeft",[aP,ag,ab,W,aQ]);if(av.swipeLeft){bc=av.swipeLeft.call(aR,be,aP,ag,ab,W,aQ)}break;case o:aR.trigger("swipeRight",[aP,ag,ab,W,aQ]);if(av.swipeRight){bc=av.swipeRight.call(aR,be,aP,ag,ab,W,aQ)}break;case e:aR.trigger("swipeUp",[aP,ag,ab,W,aQ]);if(av.swipeUp){bc=av.swipeUp.call(aR,be,aP,ag,ab,W,aQ)}break;case x:aR.trigger("swipeDown",[aP,ag,ab,W,aQ]);if(av.swipeDown){bc=av.swipeDown.call(aR,be,aP,ag,ab,W,aQ)}break}}}if(bd==t){aR.trigger("pinchStatus",[bb,aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchStatus){bc=av.pinchStatus.call(aR,be,bb,aJ||null,aq||0,ab||0,W,G,aQ);if(bc===false){return false}}if(bb==h&&a8()){switch(aJ){case c:aR.trigger("pinchIn",[aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchIn){bc=av.pinchIn.call(aR,be,aJ||null,aq||0,ab||0,W,G,aQ)}break;case z:aR.trigger("pinchOut",[aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchOut){bc=av.pinchOut.call(aR,be,aJ||null,aq||0,ab||0,W,G,aQ)}break}}}if(bd==A){if(bb===q||bb===h){clearTimeout(aW);clearTimeout(af);if(Y()&&!H()){N=at();aW=setTimeout(f.proxy(function(){N=null;aR.trigger("tap",[be.target]);if(av.tap){bc=av.tap.call(aR,be,be.target)}},this),av.doubleTapThreshold)}else{N=null;aR.trigger("tap",[be.target]);if(av.tap){bc=av.tap.call(aR,be,be.target)}}}}else{if(bd==j){if(bb===q||bb===h){clearTimeout(aW);N=null;aR.trigger("doubletap",[be.target]);if(av.doubleTap){bc=av.doubleTap.call(aR,be,be.target)}}}else{if(bd==b){if(bb===q||bb===h){clearTimeout(aW);N=null;aR.trigger("longtap",[be.target]);if(av.longTap){bc=av.longTap.call(aR,be,be.target)}}}}}return bc}function an(){var bb=true;if(av.threshold!==null){bb=ag>=av.threshold}return bb}function ba(){var bb=false;if(av.cancelThreshold!==null&&aP!==null){bb=(aT(aP)-ag)>=av.cancelThreshold}return bb}function ae(){if(av.pinchThreshold!==null){return aq>=av.pinchThreshold}return true}function aA(){var bb;if(av.maxTimeThreshold){if(ab>=av.maxTimeThreshold){bb=false}else{bb=true}}else{bb=true}return bb}function al(bb,bc){if(av.allowPageScroll===m||aX()){bb.preventDefault()}else{var bd=av.allowPageScroll===s;switch(bc){case p:if((av.swipeLeft&&bd)||(!bd&&av.allowPageScroll!=D)){bb.preventDefault()}break;case o:if((av.swipeRight&&bd)||(!bd&&av.allowPageScroll!=D)){bb.preventDefault()}break;case e:if((av.swipeUp&&bd)||(!bd&&av.allowPageScroll!=u)){bb.preventDefault()}break;case x:if((av.swipeDown&&bd)||(!bd&&av.allowPageScroll!=u)){bb.preventDefault()}break}}}function a8(){var bc=aO();var bb=X();var bd=ae();return bc&&bb&&bd}function aX(){return !!(av.pinchStatus||av.pinchIn||av.pinchOut)}function P(){return !!(a8()&&aX())}function aV(){var be=aA();var bg=an();var bd=aO();var bb=X();var bc=ba();var bf=!bc&&bb&&bd&&bg&&be;return bf}function V(){return !!(av.swipe||av.swipeStatus||av.swipeLeft||av.swipeRight||av.swipeUp||av.swipeDown)}function I(){return !!(aV()&&V())}function aO(){return((W===av.fingers||av.fingers===i)||!a)}function X(){return aQ[0].end.x!==0}function a6(){return !!(av.tap)}function Y(){return !!(av.doubleTap)}function aU(){return !!(av.longTap)}function Q(){if(N==null){return false}var bb=at();return(Y()&&((bb-N)<=av.doubleTapThreshold))}function H(){return Q()}function ax(){return((W===1||!a)&&(isNaN(ag)||agav.longTapThreshold)&&(ag=0)){return p}else{if((bd<=360)&&(bd>=315)){return p}else{if((bd>=135)&&(bd<=225)){return o}else{if((bd>45)&&(bd<135)){return x}else{return e}}}}}function at(){var bb=new Date();return bb.getTime()}function aY(bb){bb=f(bb);var bd=bb.offset();var bc={left:bd.left,right:bd.left+bb.outerWidth(),top:bd.top,bottom:bd.top+bb.outerHeight()};return bc}function E(bb,bc){return(bb.x>bc.left&&bb.xbc.top&&bb.y
          '); $j(this).ajaxSubmit(options); return false; }); } var header_height=100; var min_header_height_scroll=57; var min_header_height_fixed_hidden=50; var min_header_height_sticky=60; var scroll_amount_for_sticky=85; var content_line_height=60; var header_bottom_border_weight=1; var scroll_amount_for_fixed_hiding=200; var paspartu_width_init=0.02; var search_header_height=50; var add_for_admin_bar=0; header_height=50; min_header_height_sticky=80; scroll_amount_for_sticky=200; var logo_height=130; var logo_width=280; logo_height=79; logo_width=124; header_top_height=33; var loading_text; loading_text='Loading new posts...'; var finished_text; finished_text='No more posts'; var piechartcolor; piechartcolor="#e6ae48"; var geocoder; var map; function initialize(){ "use strict"; var mapStyles=[ { stylers: [ {hue: "#393939" }, {saturation: "-100"}, {lightness: "-60"}, {gamma: 1} ] } ]; var qodeMapType=new google.maps.StyledMapType(mapStyles, {name: "Qode Map"}); geocoder=new google.maps.Geocoder(); var latlng=new google.maps.LatLng(-34.397, 150.644); var myOptions={ zoom: 12, scrollwheel: false, center: latlng, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.RIGHT_CENTER }, scaleControl: false, scaleControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, streetViewControl: false, streetViewControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, panControl: false, panControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, mapTypeControl: false, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'qode_style'], style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.LEFT_CENTER }, mapTypeId: 'qode_style' }; map=new google.maps.Map(document.getElementById("map_canvas"), myOptions); map.mapTypes.set('qode_style', qodeMapType); } function codeAddress(data){ "use strict"; if(data==='') return; var contentString='
          '+ '
          '+ '
          '+ '
          '+ '

          '+data+'

          '+ '
          '+ '
          '; var infowindow=new google.maps.InfoWindow({ content: contentString }); geocoder.geocode({ 'address': data}, function(results, status){ if(status===google.maps.GeocoderStatus.OK){ map.setCenter(results[0].geometry.location); var marker=new google.maps.Marker({ map: map, position: results[0].geometry.location, icon: 'http://17.havenunderdeck.com/wp-content/themes/stockholm/img/pin.png', title: data['store_title'] }); google.maps.event.addListener(marker, 'click', function(){ infowindow.open(map,marker); }); }}); } var $j=jQuery.noConflict(); $j(document).ready(function(){ "use strict"; showContactMap(); }); function showContactMap(){ "use strict"; if($j("#map_canvas").length > 0){ initialize(); codeAddress(""); codeAddress(""); codeAddress(""); codeAddress(""); codeAddress(""); }} var no_ajax_pages=[]; var qode_root='https://havenunderdeck.com/'; var theme_root='https://havenunderdeck.com/wp-content/themes/stockholm'; var header_style_admin=""; if(typeof no_ajax_obj!=='undefined'){ no_ajax_pages=no_ajax_obj.no_ajax_pages; }; function headerSize(a){"use strict";if($j("header.page_header").hasClass("scroll_top")&&$j("header.page_header").hasClass("has_top")&&$j("header.page_header").hasClass("fixed")&&(a>=0&&a<=33?($j("header.page_header").css("top",-a),$j("header.page_header").css("margin-top",0),$j(".header_top").show()):a>33&&($j("header.page_header").css("top","-33px"),$j("header.page_header").css("margin-top",33),$j(".header_top").hide())),sticky_amount="undefined"!=typeof page_scroll_amount_for_sticky?page_scroll_amount_for_sticky:$j(".carousel.full_screen").length?$j(".carousel").height():scroll_amount_for_sticky,$j("header").hasClass("regular")&&(header_height-logo_height>0?$j(".q_logo a").height(logo_height):$j(".q_logo a").height(header_height),$j(".q_logo a img").css("height","100%")),$j("header.page_header").hasClass("fixed")&&($top_header_height=$j("header.page_header").hasClass("scroll_top")?33:0,header_height-a+$top_header_height>=min_header_height_scroll&&a>=$top_header_height?($j("header.page_header").removeClass("scrolled"),$j("header:not(.centered_logo.centered_logo_animate) nav.main_menu > ul > li > a").css("line-height",header_height-a+$top_header_height+"px"),$j("header:not(.centered_logo.centered_logo_animate) .side_menu_button").css("height",header_height-a+$top_header_height+"px"),$j("header:not(.centered_logo.centered_logo_animate) .shopping_cart_inner").css("height",header_height-a+$top_header_height+"px"),$j("header:not(.centered_logo.centered_logo_animate) .logo_wrapper").css("height",header_height-a+$top_header_height+"px"),header_height-logo_height>0?$j("header:not(.centered_logo.centered_logo_animate) .q_logo a").css("height",logo_height+"px"):$j("header:not(.centered_logo.centered_logo_animate) .q_logo a").css("height",header_height-a+$top_header_height+"px")):a<$top_header_height?($j("header.page_header").removeClass("scrolled"),$j("header:not(.centered_logo.centered_logo_animate) nav.main_menu > ul > li > a").css("line-height",header_height+"px"),$j("header:not(.centered_logo.centered_logo_animate) .side_menu_button").css("height",header_height+"px"),$j("header:not(.centered_logo.centered_logo_animate) .shopping_cart_inner").css("height",header_height+"px"),$j("header:not(.centered_logo.centered_logo_animate) .logo_wrapper").css("height",header_height+"px"),header_height-logo_height>0?$j("header:not(.centered_logo.centered_logo_animate) .q_logo a").css("height",logo_height+"px"):$j("header:not(.centered_logo.centered_logo_animate) .q_logo a").css("height",header_height+"px")):header_height-a+$top_header_height ul > li > a").css("line-height",min_header_height_scroll+"px"),$j("header:not(.centered_logo.centered_logo_animate) .side_menu_button").css("height",min_header_height_scroll+"px"),$j("header:not(.centered_logo.centered_logo_animate) .shopping_cart_inner").css("height",min_header_height_scroll+"px"),$j("header:not(.centered_logo.centered_logo_animate) .logo_wrapper").css("height",min_header_height_scroll+"px"),min_header_height_scroll-logo_height>0?$j("header:not(.centered_logo.centered_logo_animate) .q_logo a").css("height",logo_height+"px"):$j("header:not(.centered_logo.centered_logo_animate) .q_logo a").css("height",min_header_height_scroll+"px")),$j("header.page_header").hasClass("centered_logo")&&$j("header.page_header").hasClass("centered_logo_animate")?header_height-a+$top_header_height=min_header_height_scroll&&logo_height>min_header_height_scroll&&a>=$top_header_height?$j(".q_logo a").height(header_height-a+$top_header_height):header_height-a+$top_header_height=min_header_height_scroll&&logo_height>min_header_height_scroll&&a<$top_header_height?$j(".q_logo a").height(header_height):header_height-a+$top_header_heightmin_header_height_scroll?$j(".q_logo a").height(min_header_height_scroll):header_height-a+$top_header_heightheader_height?$j(".q_logo a").height(logo_height):$j(".q_logo a").height(logo_height):$j("header.page_header").hasClass("centered_logo")?($j(".q_logo a").height(logo_height),$j(".q_logo img").height("auto")):$j(".q_logo img").height("100%")),$j("header.page_header").hasClass("fixed_hiding")&&(asticky_amount){if(!$j("header.page_header").hasClass("sticky")){$top_header_height=$j("header.page_header").hasClass("has_top")?33:0;var b=$j("header.page_header").hasClass("centered_logo")?$j("header.page_header").height():header_height+$top_header_height;$j("header.page_header").hasClass("menu_bottom")&&(b=header_height+60),$j("header.page_header").addClass("sticky"),$j(".content").css("padding-top",b),window.clearTimeout(sticky_animate),sticky_animate=window.setTimeout(function(){$j("header.page_header").addClass("sticky_animate")},100),min_header_height_sticky-logo_height>0?$j(".q_logo a").height(logo_height):$j(".q_logo a").height(min_header_height_sticky),$j("header.page_header").hasClass("menu_bottom")&&initDropDownMenu()}min_header_height_sticky-logo_height>0?$j(".q_logo a").height(logo_height):$j(".q_logo a").height(min_header_height_sticky)}else $j("header.page_header").hasClass("sticky")&&($j("header").removeClass("sticky_animate"),$j("header").removeClass("sticky"),$j(".content").css("padding-top","0px"),$j("header.page_header").hasClass("menu_bottom")&&initDropDownMenu()),setMargingsForLeftAndRightMenu(),$j("header.page_header").hasClass("centered_logo")?($j(".q_logo a").height(logo_height),$j(".q_logo img").height("auto")):header_height-logo_height>0?$j(".q_logo a").height(logo_height):$j(".q_logo a").height(header_height),$j(".q_logo a img").css("height","100%")}function setMargingsForLeftAndRightMenu(){"use strict";if($j("header.page_header").hasClass("stick_with_left_right_menu")&&!$j("header.page_header").hasClass("left_right_margin_set")){var a=$j(".q_logo a img").width()/2;0===$scroll&&0!==a&&$j("header.page_header").addClass("left_right_margin_set"),$j(".logo_wrapper").width(2*a),$j("nav.main_menu.left_side > ul > li:last-child").css("margin-right",a),$j("nav.main_menu.right_side > ul > li:first-child").css("margin-left",a)}}function logoSizeOnSmallScreens(){"use strict";100-logo_height>0?$j(".q_logo a").height(logo_height):$j(".q_logo a").height(100),$j(".q_logo a img").css("height","100%"),$j("header.page_header").removeClass("sticky_animate sticky"),$j(".content").css("padding-top","0px")}function initQodeSlider(){"use strict";var a=/url\(["']?([^'")]+)['"]?\)/;default_header_style="",$j("header.page_header").hasClass("light")&&(default_header_style="light"),$j("header.page_header").hasClass("dark")&&(default_header_style="dark"),$j(".carousel").length&&($j(".carousel").each(function(){function k(a,c){1==a?(b.find(".left.carousel-control .prev").html(c),b.find(".right.carousel-control .next").html(a+1)):a==c?(b.find(".left.carousel-control .prev").html(a-1),b.find(".right.carousel-control .next").html(1)):(b.find(".left.carousel-control .prev").html(a-1),b.find(".right.carousel-control .next").html(a+1))}function l(){b.find(".carousel-inner .item:first-child").addClass("active"),checkSliderForHeaderStyle($j(".carousel .active"),b.hasClass("header_effect")),b.hasClass("slider_thumbs")&&(k(1,j),b.find(".active").next("div").find(".image").length?(src=a.exec(b.find(".active").next("div").find(".image").attr("style")),next_image=new Image,next_image.src=src[1]):(next_image=b.find(".active").next("div").find("> .video").clone(),next_image.find(".video-overlay").remove(),next_image.find(".video-wrap").width(170).height(95),next_image.find(".mejs-container").width(170).height(95),next_image.find("video").width(170).height(95)),b.find(".right.carousel-control .img").html(next_image).find("img, div.video").addClass("old"),b.find(".carousel-inner .item:last-child .image").length?(src=a.exec(b.find(".carousel-inner .item:last-child .image").attr("style")),prev_image=new Image,prev_image.src=src[1]):(prev_image=b.find(".carousel-inner .item:last-child > .video").clone(),prev_image.find(".video-overlay").remove(),prev_image.find(".video-wrap").width(170).height(95),prev_image.find(".mejs-container").width(170).height(95),prev_image.find("video").width(170).height(95)),b.find(".left.carousel-control .img").html(prev_image).find("img, div.video").addClass("old")),b.hasClass("q_auto_start")?b.carousel({interval:i,pause:!1}):b.carousel({interval:0,pause:!1}),b.find(".item video").length&&initVideoBackgroundSize()}var c,b=$j(this),d=$j(".paspartu_top").length>0?Math.round($window_width*paspartu_width):0,e=$j(".paspartu_bottom").length>0?Math.round($window_width*paspartu_width):0;if(b.hasClass("full_screen"))c=$j(window).width()<1e3?$j("header.page_header").height()-6:0,b.css({height:$j(window).height()-c-d-e+"px"}),b.find(".qode_slider_preloader").css({height:$j(window).height()-c-d-e+"px"}),b.find(".qode_slider_preloader .ajax_loader").css({display:"block"}),b.find(".item").css({height:$j(window).height()-c-d-e+"px"}),$j(window).resize(function(){var a=$j(window).width()<1e3?$j("header.page_header").height()-6:0;b.css({height:$j(window).height()-a-d-e+"px"}),b.find(".item").css({height:$j(window).height()-a-d-e+"px"})});else if(b.hasClass("responsive_height")){c=$j(window).width()<1e3?$j("header.page_header").height()-6:0;var f=b.data("height");b.find(".qode_slider_preloader").css({height:b.height()-c-d-e+"px",display:"block"});var g=f;if($window_width>1600)var g=f;else if($window_width<=1600&&$window_width>1300)var g=.8*f;else if($window_width<=1300&&$window_width>1e3)var g=.8*f;else if($window_width<=1e3&&$window_width>768)var g=.55*f;else if($window_width<=768)var g=1*f;b.css({height:g+"px"}),b.find(".qode_slider_preloader").css({height:g+"px"}),b.find(".qode_slider_preloader .ajax_loader").css({display:"block"}),b.find(".item").css({height:g+"px"}),$j(window).resize(function(){if($window_width>1600)var a=f;else if($window_width<=1600&&$window_width>1300)var a=.8*f;else if($window_width<=1300&&$window_width>1e3)var a=.8*f;else if($window_width<=1e3&&$window_width>768)var a=.55*f;else if($window_width<=768)var a=1*f;b.css({height:a+"px"}),b.find(".item").css({height:a+"px"})})}else c=$j(window).width()<1e3?$j("header.page_header").height()-6:0,b.find(".qode_slider_preloader").css({height:b.height()-c+"px",display:"block"}),b.find(".qode_slider_preloader .ajax_loader").css({display:"block"});if($j("body:not(.boxed):not(.vertical_menu_transparency)").hasClass("vertical_menu_enabled")&&$j(window).width()>1e3){var h=$j("body").hasClass("paspartu_enabled")?2*Math.round($window_width*paspartu_width):0;b.find(".carousel-inner").width($window_width-260-h),$j(window).resize(function(){$j(window).width()>1e3?(h=$j("body").hasClass("paspartu_enabled")?2*Math.round($window_width*paspartu_width):0,b.find(".carousel-inner").width($window_width-260-h)):b.find(".carousel-inner").css("width","100%")})}$j(window).scroll(function(){$scroll>$j(window).height()&&$j(window).width()>1e3?b.find(".carousel-inner, .carousel-indicators, button").hide():b.find(".carousel-inner, .carousel-indicators, button").show()});var i=b.data("slide_animation");""===i&&(i=6e3);var j=$j("div.item").length;if($j("html").hasClass("touch")){if(b.find(".item:first-child .mobile-video-image").length>0){if(src=a.exec(b.find(".item:first-child .mobile-video-image").attr("style"))){var m=new Image;m.src=src[1],$j(m).load(function(){$j(".qode_slider_preloader").fadeOut(500),l()})}}else if(src=a.exec(b.find(".item:first-child .image").attr("style"))){var m=new Image;m.src=src[1],$j(m).load(function(){$j(".qode_slider_preloader").fadeOut(500),l()})}}else if(b.find(".item:first-child video").length>0)b.find(".item:first-child video").get(0).addEventListener("loadeddata",function(){$j(".qode_slider_preloader").fadeOut(500),l()});else if(src=a.exec(b.find(".item:first-child .image").attr("style"))){var m=new Image;m.src=src[1],$j(m).load(function(){$j(".qode_slider_preloader").fadeOut(500),l()})}b.on("slide.bs.carousel",function(){b.addClass("in_progress"),b.find(".active .slider_content_outer").fadeTo(800,0)}),b.on("slid.bs.carousel",function(){if(b.removeClass("in_progress"),b.find(".active .slider_content_outer").fadeTo(0,1),b.hasClass("slider_thumbs")){var c=$j("div.item").index($j("div.item.active")[0])+1;k(c,j),b.find(".active").prev("div.item").length?(b.find(".active").prev("div").find(".image").length?(src=a.exec(b.find(".active").prev("div").find(".image").attr("style")),prev_image=new Image,prev_image.src=src[1]):(prev_image=b.find(".active").prev("div").find("> .video").clone(),prev_image.find(".video-overlay").remove(),prev_image.find(".video-wrap").width(170).height(95),prev_image.find(".mejs-container").width(170).height(95),prev_image.find("video").width(170).height(95)),b.find(".left.carousel-control .img .old").fadeOut(300,function(){$j(this).remove()}),b.find(".left.carousel-control .img").append(prev_image).find("img, div.video").fadeIn(300).addClass("old")):(b.find(".carousel-inner .item:last-child .image").length?(src=a.exec(b.find(".carousel-inner .item:last-child .image").attr("style")),prev_image=new Image,prev_image.src=src[1]):(prev_image=b.find(".carousel-inner .item:last-child > .video").clone(),prev_image.find(".video-overlay").remove(),prev_image.find(".video-wrap").width(170).height(95),prev_image.find(".mejs-container").width(170).height(95),prev_image.find("video").width(170).height(95)),b.find(".left.carousel-control .img .old").fadeOut(300,function(){$j(this).remove()}),b.find(".left.carousel-control .img").append(prev_image).find("img, div.video").fadeIn(300).addClass("old")),b.find(".active").next("div.item").length?(b.find(".active").next("div").find(".image").length?(src=a.exec(b.find(".active").next("div").find(".image").attr("style")),next_image=new Image,next_image.src=src[1]):(next_image=b.find(".active").next("div").find("> .video").clone(),next_image.find(".video-overlay").remove(),next_image.find(".video-wrap").width(170).height(95),next_image.find(".mejs-container").width(170).height(95),next_image.find("video").width(170).height(95)),b.find(".right.carousel-control .img .old").fadeOut(300,function(){$j(this).remove()}),b.find(".right.carousel-control .img").append(next_image).find("img, div.video").fadeIn(300).addClass("old")):(b.find(".carousel-inner .item:first-child .image").length?(src=a.exec(b.find(".carousel-inner .item:first-child .image").attr("style")),next_image=new Image,next_image.src=src[1]):(next_image=b.find(".carousel-inner .item:first-child > .video").clone(),next_image.find(".video-overlay").remove(),next_image.find(".video-wrap").width(170).height(95),next_image.find(".mejs-container").width(170).height(95),next_image.find("video").width(170).height(95)),b.find(".right.carousel-control .img .old").fadeOut(300,function(){$j(this).remove()}),b.find(".right.carousel-control .img").append(next_image).find("img, div.video").fadeIn(300).addClass("old"))}}),b.swipe({swipeLeft:function(a,c,d,e,f){b.carousel("next")},swipeRight:function(a,c,d,e,f){b.carousel("prev")},threshold:20})}),"yes"==$j(".carousel").data("parallax")&&$j(".no-touch .carousel").length&&(skrollr_slider=skrollr.init({edgeStrategy:"set",smoothScrolling:!0,forceHeight:!1}),skrollr_slider.refresh()))}function checkSliderForHeaderStyle(a,b){"use strict";var c="";a.hasClass("light")&&(c="light"),a.hasClass("dark")&&(c="dark"),""!==c?(b&&($j("header.page_header").removeClass("dark light").addClass(c),$j("aside.vertical_menu_area").removeClass("dark light").addClass(c)),$j(".carousel .carousel-control, .carousel .carousel-indicators").removeClass("dark light").addClass(c)):(b&&""!==default_header_style&&($j("header.page_header").removeClass("dark light").addClass(default_header_style),$j("aside.vertical_menu_area").removeClass("dark light").addClass(default_header_style)),$j(".carousel .carousel-control, .carousel .carousel-indicators").removeClass("dark light").addClass(default_header_style))}function calculateHeights(){$j(".portfolio_slides").length&&$j(".portfolio_slides").each(function(){$j(this).parents(".caroufredsel_wrapper").css({height:$j(this).find("li.item").outerHeight()-3+"px"})}),$j(".qode_carousels .slides").length&&$j(".qode_carousels .slides").each(function(){$j(this).parents(".caroufredsel_wrapper").css({height:$j(this).find("li.item").outerHeight()+"px"})})}function initQodeCarousel(){"use strict";$j(".qode_carousels:not(.carousel_owl)").length&&($j(".qode_carousels:not(.carousel_owl)").each(function(){var b,c,d=1!=$j(this).parents(".grid_section").length&&1==$j(this).parents(".page-template-full_width").length;"undefined"!=typeof $j(this).data("number_of_items")?(b=$j(this).data("number_of_items"),c=!0):(b=5,c=!1);var f,e=1==$j(this).parents(".grid_section").length?216:380;if(d)switch(b){case 3:f=660;break;case 4:f=500;break;case 5:f=380;break;default:f=380}else switch(b){case 3:f=380;break;case 4:f=275;break;case 5:f=216;break;default:f=216}e=c?f:e,$j(this).find(".slides").carouFredSel({circular:!0,responsive:!0,scroll:{items:1,duration:1e3,pauseOnHover:!1},prev:{button:function(){return $j(this).parent().siblings(".caroufredsel-direction-nav").find(".qode_carousel_prev")}},next:{button:function(){return $j(this).parent().siblings(".caroufredsel-direction-nav").find(".qode_carousel_next")}},items:{width:e,visible:{min:1,max:b}},auto:!0,mousewheel:!1,swipe:{onMouse:!0,onTouch:!0}}).animate({opacity:1},1e3)}),calculateHeights())}function intCarouselOWLSlider(){"use strict";$j(".qode_carousels.carousel_owl").length&&$j(".qode_carousels.carousel_owl").each(function(){$j(this).find(".slides").owlCarousel({center:!0,loop:!0,margin:0,nav:!1,video:!0,autoplay:!0,autoplayTimeout:5e3,autoplaySpeed:1e3,autoplayHoverPause:!0,responsive:{0:{items:1,stagePadding:0},600:{items:2,stagePadding:50},1100:{items:3,stagePadding:100},1500:{items:3,stagePadding:200}}}).animate({opacity:1},600)})}function initPortfolioSlider(){"use strict";$j(".portfolio_slider").length&&($j(".portfolio_slider").each(function(){var a=1==$j(this).parents(".grid_section").length?3:"auto",b=1==$j(this).parents(".grid_section").length?353:500;$j(".portfolio_slides").carouFredSel({circular:!0,responsive:!0,scroll:1,prev:{button:function(){return $j(this).parent().siblings(".caroufredsel-direction-nav").find("#caroufredsel-prev")}},next:{button:function(){return $j(this).parent().siblings(".caroufredsel-direction-nav").find("#caroufredsel-next")}},items:{width:b,visible:{min:1,max:a}},auto:!1,mousewheel:!0,swipe:{onMouse:!0,onTouch:!0}}).animate({opacity:1},1e3)}),calculateHeights(),$j(".portfolio_slider .flex-direction-nav a").click(function(a){a.preventDefault(),a.stopImmediatePropagation(),a.stopPropagation()}))}function initSideMenu(){"use strict";$j("body").hasClass("side_area_uncovered")&&$j(".side_menu_button_wrapper a.side_menu_button_link, a.close_side_menu, a.close_side_menu_fold").click(function(a){if(a.preventDefault(),$j(".side_menu").css({right:"0"}),$j(".side_menu_button_wrapper a.side_menu_button_link").hasClass("opened")){$j(".side_menu_button_wrapper a.side_menu_button_link").removeClass("opened"),$j("body").removeClass("right_side_menu_opened");var b=setTimeout(function(){$j(".side_menu").css({visibility:"hidden"}),clearTimeout(b)},400)}else $j(".side_menu").css({visibility:"visible"}),$j(this).addClass("opened"),$j("body").addClass("right_side_menu_opened"),current_scroll=$j(window).scrollTop(),$j(window).scroll(function(){if(Math.abs($scroll-current_scroll)>400){$j("body").removeClass("right_side_menu_opened"),$j(".side_menu_button_wrapper a").removeClass("opened");var a=setTimeout(function(){$j(".side_menu").css({visibility:"hidden"}),clearTimeout(a)},400)}})}),$j("body").hasClass("side_area_over_content")&&($j(".wrapper").prepend('
          '),$j(".side_menu_button_wrapper a.side_menu_button_link, a.close_side_menu, a.close_side_menu_fold").click(function(a){a.preventDefault(),$j(".side_menu_button_wrapper a.side_menu_button_link").hasClass("opened")?($j(".side_menu_button_wrapper a.side_menu_button_link").removeClass("opened"),$j("body").removeClass("side_area_uncovered_opened")):($j(this).addClass("opened"),$j("body").addClass("side_area_uncovered_opened"),$j(" .wrapper .cover").click(function(){$j(".side_menu_button_wrapper a.side_menu_button_link").removeClass("opened"),$j("body").removeClass("side_area_uncovered_opened"),$j(".side_menu_button_wrapper a").removeClass("opened")}),current_scroll=$j(window).scrollTop(),$j(window).scroll(function(){Math.abs($scroll-current_scroll)>400&&($j("body").removeClass("side_area_uncovered_opened"),$j(".side_menu_button_wrapper a").removeClass("opened"))}))})),$j("body").hasClass("side_area_slide_with_content")&&$j(".side_menu_button_wrapper a.side_menu_button_link, a.close_side_menu, a.close_side_menu_fold").click(function(a){a.preventDefault(),$j(".side_menu_button_wrapper a.side_menu_button_link").hasClass("opened")?($j("body").removeClass("side_menu_open"),$j(".side_menu_button_wrapper a.side_menu_button_link").removeClass("opened"),$j("body").removeClass("side_menu_open")):($j(this).addClass("opened"),$j("body").addClass("side_menu_open"),current_scroll=$j(window).scrollTop(),$j(window).scroll(function(){Math.abs($scroll-current_scroll)>400&&($j("body").removeClass("side_menu_open"),$j(".side_menu_button_wrapper a").removeClass("opened"))})),a.stopPropagation(),$j(".wrapper").click(function(){a.preventDefault(),$j("body").removeClass("side_menu_open"),$j(".side_menu_button_wrapper a.side_menu_button_link").removeClass("opened"),$j("body").removeClass("side_menu_open")})})}function setDropDownMenuPosition(){"use strict";var a=$j(".drop_down > ul > li.narrow");a.each(function(b){var c=$j(window).width()-16,d=1150,e=$j(a[b]).offset().left,f=$j(a[b]).find(".second .inner ul").width(),g=0;g=$j("body").hasClass("boxed")?d-(e-(c-d)/2)+24:c-e+24;var h;$j(a[b]).find("li.sub").length>0&&(h=g-f),(g ul > li");a.each(function(b){if($j(a[b]).find(".second").length>0){if($j(a[b]).hasClass("wide")){var c=$j(this).find(".inner > ul"),d=parseInt(c.css("padding-left").slice(0,-2))+parseInt(c.css("padding-right").slice(0,-2));$j(this).hasClass("left_position")||$j(this).hasClass("right_position")||$j(this).find(".second").css("left",0);var e=0;$j(this).find(".second > .inner > ul > li").each(function(){var a=$j(this).height();a>e&&(e=a)}),$j(this).find(".second > .inner > ul > li").height(e);var f;f=$j(this).find(".second > .inner > ul > li").length>4?4:$j(this).find(".second > .inner > ul > li").length;var g=f*$j(this).find(".second > .inner > ul > li").outerWidth();if($j(this).find(".second > .inner > ul").width(g),!$j(this).hasClass("left_position")&&!$j(this).hasClass("right_position")){var h=($j(window).width()-2*($j(window).width()-$j(this).find(".second").offset().left))/2+(g+d)/2;$j(this).find(".second").css("left",-h)}}if(menu_dropdown_height_set||($j(a[b]).data("original_height",$j(a[b]).find(".second").height()+"px"),$j(a[b]).find(".second").height(0)),navigator.userAgent.match(/(iPod|iPhone|iPad)/))$j(a[b]).on("touchstart mouseenter",function(){$j(a[b]).find(".second").css({height:$j(a[b]).data("original_height"),overflow:"visible",visibility:"visible",opacity:"1"})}).on("mouseleave",function(){$j(a[b]).find(".second").css({height:"0px",overflow:"hidden",visivility:"hidden",opacity:"0"})});else if($j(".drop_down.animate_height ").length)$j(a[b]).mouseenter(function(){$j(a[b]).find(".second").css({visibility:"visible",height:"0px",opacity:"0"}),$j(a[b]).find(".second").stop().animate({height:$j(a[b]).data("original_height"),opacity:1},300,function(){$j(a[b]).find(".second").css("overflow","visible")})}).mouseleave(function(){$j(a[b]).find(".second").stop().animate({height:"0px"},0,function(){$j(a[b]).find(".second").css({overflow:"hidden",visibility:"hidden"})})});else{var i={interval:0,over:function(){setTimeout(function(){$j(a[b]).find(".second").addClass("drop_down_start"),$j(a[b]).find(".second").stop().css({height:$j(a[b]).data("original_height")})},150)},timeout:150,out:function(){$j(a[b]).find(".second").stop().css({height:"0px"}),$j(a[b]).find(".second").removeClass("drop_down_start")}};$j(a[b]).hoverIntent(i)}}}),$j(".drop_down ul li.wide ul li a").on("click",function(){var a=$j(this);setTimeout(function(){a.mouseleave()},500)}),menu_dropdown_height_set=!0}function initVerticalMenuToggle(){"use strict";if($j(".no-touch .vertical_menu").hasClass("vm_click_event")){var a=$j(".no-touch .vertical_menu_toggle > ul > li > a"),b=$j(".no-touch .vertical_menu_toggle ul li ul li a");a.each(function(b){if($j(a[b]).parent().hasClass("has_sub")){$j(a[b]).find(".inner > ul > li").length;$j(a[b]).on("click",function(a){return a.preventDefault(),$j(this).parent().hasClass("open")||$j(this).parent().hasClass("current-menu-ancestor")?($j(this).parent().removeClass("open"),$j(this).parent().find(".second").slideUp("fast",function(){$j(this).parent().removeClass("current-menu-ancestor"),$j(".vertical_menu_area.with_scroll").getNiceScroll().resize()})):($j(".no-touch .vertical_menu_toggle > ul > li").removeClass("open current-menu-ancestor"),$j(".no-touch .vertical_menu_toggle > ul > li").find(".second").slideUp("fast"),$j(this).parent().addClass("open"),$j(this).parent().find(".second").slideDown("slow",function(){$j(".vertical_menu_area.with_scroll").getNiceScroll().resize()})),!1})}}),b.each(function(a){if($j(b[a]).parent().hasClass("menu-item-has-children")){$j(b[a]).find("ul > li").length;$j(b[a]).on("click",function(a){return a.preventDefault(),$j(this).parent().hasClass("open")||$j(this).parent().hasClass("current_page_parent")?($j(this).parent().removeClass("open"),$j(this).parent().find("ul").slideUp("fast",function(){$j(this).parent().removeClass("current_page_parent"),$j(".vertical_menu_area.with_scroll").getNiceScroll().resize()})):($j(".no-touch .vertical_menu_toggle ul li ul li").removeClass("open current_page_parent"),$j(".no-touch .vertical_menu_toggle ul li ul li").find("ul").slideUp("fast"),$j(this).parent().addClass("open"),$j(this).parent().find("ul").slideDown("slow",function(){$j(".vertical_menu_area.with_scroll").getNiceScroll().resize()})),!1})}})}else{var a=$j(".no-touch .vertical_menu_toggle > ul > li"),b=$j(".no-touch .vertical_menu_toggle ul li ul li");a.each(function(b){if($j(a[b]).hasClass("has_sub")){var c=$j(a[b]).find(".inner > ul > li").length;$j(a[b]).hoverIntent({over:function(){$j(a[b]).addClass("open"),$j(a[b]).find(".second").slideDown(40*c,"easeInOutSine",function(){$j(".vertical_menu_area.with_scroll").getNiceScroll().resize()})},out:function(){$j(a[b]).removeClass("open"),$j(a[b]).find(".second").slideUp(40*c,"easeInOutSine")},timeout:1e3})}}),b.each(function(a){if($j(b[a]).hasClass("menu-item-has-children")){var c=$j(b[a]).find("ul > li").length;$j(b[a]).hoverIntent({over:function(){$j(b[a]).addClass("open"),$j(b[a]).find("ul").slideDown(40*c,"easeInOutSine",function(){$j(".vertical_menu_area.with_scroll").getNiceScroll().resize()})},out:function(){$j(b[a]).removeClass("open"),$j(b[a]).find("ul").slideUp(40*c,"easeInOutSine")},timeout:1e3})}})}}function initVerticalMobileMenu(){"use strict";$j(".touch .vertical_menu_toggle > ul > li.has_sub > a").on("tap click",function(a){a.stopPropagation(),a.preventDefault(),$j(this).next("div.second").is(":visible")?($j(this).parents(".touch .vertical_menu_toggle > ul > li.has_sub").removeClass("open"),$j(this).next("div.second").slideUp(200)):($j(this).parents(".touch .vertical_menu_toggle > ul > li.has_sub").addClass("open"),$j(this).next("div.second").slideDown(200))}),$j(".touch .vertical_menu_toggle ul li ul li.sub > a").on("tap click",function(a){a.stopPropagation(),a.preventDefault(),$j(this).next("ul").is(":visible")?($j(this).parents(".touch .vertical_menu_toggle ul li ul li").removeClass("open"),$j(this).next("ul").slideUp(200)):($j(this).parents(".touch .vertical_menu_toggle ul li ul li").addClass("open"),$j(this).next("ul").slideDown(200))})}function checkVerticalMenuTransparency(){"use strict";0!==$scroll?($j("body.vertical_menu_transparency").removeClass("vertical_menu_transparency_on"),$j("body.vertical_menu_transparency").addClass("vertical_menu_transparency_off")):($j("body.vertical_menu_transparency").addClass("vertical_menu_transparency_on"),$j("body.vertical_menu_transparency").removeClass("vertical_menu_transparency_off"))}function initToCounter(){"use strict";$j(".counter.zero").length&&$j(".counter.zero").each(function(){$j(this).hasClass("executed")||($j(this).addClass("executed"),$j(this).appear(function(){$j(this).parent().css("opacity","1");var a=parseFloat($j(this).text());$j(this).countTo({from:0,to:a,speed:1500,refreshInterval:100})},{accX:0,accY:-150}))})}function initCounter(){"use strict";$j(".counter.random").length&&$j(".counter.random").each(function(){$j(this).hasClass("executed")||($j(this).addClass("executed"),$j(this).appear(function(){$j(this).parent().css("opacity","1"),$j(this).absoluteCounter({speed:2e3,fadeInDelay:1e3})},{accX:0,accY:-150}))})}function initCountdown(){"use strict";var b,c,d,e,f,g,h,i,j,k,l,a=$j(".qode-countdown");a.length&&a.each(function(){function q(){m.find(".countdown-amount").css({"font-size":n+"px","line-height":n+"px",color:p}),m.find(".countdown-period").css({"font-size":o+"px"})}var n,o,p,a=$j(this).attr("id"),m=$j("#"+a);b=m.data("year"),c=m.data("month"),d=m.data("day"),e=m.data("hour"),f=m.data("minute"),g=m.data("timezone"),h=m.data("month-label"),i=m.data("day-label"),j=m.data("hour-label"),k=m.data("minute-label"),l=m.data("second-label"),n=m.data("digit-size"),o=m.data("label-size"),p=m.data("digit-color"),m.countdown({until:new Date(b,c-1,d,e,f,44),labels:["Years",h,"Weeks",i,j,k,l],format:"ODHMS",timezone:g,padZeroes:!0,onTick:q})})}function initProgressBars(){"use strict";$j(".q_progress_bar").length&&$j(".q_progress_bar").each(function(){$j(this).appear(function(){initToCounterHorizontalProgressBar($j(this));var a=$j(this).find(".progress_content").data("percentage");$j(this).find(".progress_content").css("width","0%"),$j(this).find(".progress_content").animate({width:a+"%"},1500),$j(this).find(".progress_number_wrapper").css("width","0%"),$j(this).find(".progress_number_wrapper").animate({width:a+"%"},1500)},{accX:0,accY:-150})})}function initToCounterHorizontalProgressBar(a){"use strict";var b=parseFloat(a.find(".progress_content").data("percentage"));a.find(".progress_number span").length&&a.find(".progress_number span").each(function(){$j(this).parents(".progress_number_wrapper").css("opacity","1"),$j(this).countTo({from:0,to:b,speed:1500,refreshInterval:50})})}function initListAnimation(){"use strict";$j(".animate_list").length>0&&0===$j(".no_animation_on_touch").length&&$j(".animate_list").each(function(){$j(this).appear(function(){$j(this).find("li").each(function(a){var b=$j(this);setTimeout(function(){b.animate({opacity:1,top:0},1500)},100*a)})},{accX:0,accY:-150})})}function initPieChart(){"use strict";$j(".q_percentage").length&&$j(".q_percentage").each(function(){var a=piechartcolor,b=174;""!==$j(this).data("active")&&(a=$j(this).data("active"));var c="#fff";""!==$j(this).data("noactive")&&(c=$j(this).data("noactive")); var d=10;""!==$j(this).data("linewidth")&&(d=$j(this).data("linewidth")),""!==$j(this).data("chartwidth")&&(b=$j(this).data("chartwidth")),$j(this).appear(function(){initToCounterPieChart($j(this)),$j(this).parent().css("opacity","1"),$j(this).easyPieChart({barColor:a,trackColor:c,scaleColor:!1,lineCap:"butt",lineWidth:d,animate:1500,size:b})},{accX:0,accY:-150})})}function initPieChartWithIcon(){"use strict";$j(".q_percentage_with_icon").length&&$j(".q_percentage_with_icon").each(function(){var a=piechartcolor,b=174;""!==$j(this).data("active")&&(a=$j(this).data("active"));var c="#fff";""!==$j(this).data("noactive")&&(c=$j(this).data("noactive"));var d=10;""!==$j(this).data("linewidth")&&(d=$j(this).data("linewidth")),""!==$j(this).data("chartwidth")&&(b=$j(this).data("chartwidth")),$j(this).appear(function(){$j(this).parent().css("opacity","1"),$j(this).css("opacity","1"),$j(this).easyPieChart({barColor:a,trackColor:c,scaleColor:!1,lineCap:"butt",lineWidth:d,animate:1500,size:b})},{accX:0,accY:-150})})}function initToCounterPieChart(a){"use strict";$j(a).css("opacity","1");var b=parseFloat($j(a).find(".tocounter").text());$j(a).find(".tocounter").countTo({from:0,to:b,speed:1500,refreshInterval:50})}function initPortfolio(){"use strict";$j(".projects_holder_outer:not(.masonry_with_space, .portfolio_justified_gallery)").length&&$j(".projects_holder_outer").each(function(){$j(".filter_holder .filter").on("click",function(){var a=$j(this).text(),b=$j(".filter_holder").find(".label span");b.each(function(){$j(this).text(a)})}),$j(this).find(".projects_holder").mixitup({showOnLoad:"all",transitionSpeed:600,minHeight:150})})}function initPortfolioZIndex(){"use strict";$j(".projects_holder_outer.portfolio_no_space").length&&$j(".no_space.hover_text article").each(function(a){$j(this).css("z-index",a+10)})}function initPortfolioJustifiedGallery(){"use strict";if($j(".portfolio_justified_gallery").length){var a=$j(".projects_holder_outer.portfolio_justified_gallery");a.each(function(){var a=$j(this).find(".filter_holder");a.find("li.filter").first().addClass("current"),a.find(".filter").on("click",function(){var c=$j(this).text(),d=a.find(".label span");d.each(function(){$j(this).text(c)});var e=$j(this).attr("data-filter"),f=b.find("article"),g=500;return f.css("transition","all "+g+"ms ease"),f.not(e).css({transform:"scale(0)"}),setTimeout(function(){f.filter(e).css({transform:""}),b.css("transition","height "+g+"ms ease").justifiedGallery({selector:">article"+("*"!=e?e:"")})},1.1*g),setTimeout(function(){f.css("transition",""),b.css("transition","")},2.2*g),$j(".filter").removeClass("current active"),$j(this).addClass("current active"),!1});var b=$j(this).find(".projects_holder"),c="undefined"!=typeof b.data("row-height")?b.data("row-height"):200,d="undefined"!=typeof b.data("spacing")?b.data("spacing"):0,e="undefined"!=typeof b.data("last-row")?b.data("last-row"):"nojustify",f="undefined"!=typeof b.data("justify-threshold")?b.data("justify-threshold"):.75;b.justifiedGallery({captions:!1,rowHeight:c,margins:d,border:0,lastRow:e,justifyThreshold:f,selector:"> article"}).on("jg.complete jg.rowflush",function(){$j(this).find("article").addClass("show").each(function(){$j(this).height(Math.round($j(this).height()))})})})}}function initPortfolioMasonry(){"use strict";$j(".projects_masonry_holder, .masonry_with_space").length&&$j(".projects_masonry_holder, .masonry_with_space .projects_holder").each(function(){var a=jQuery(window),b=$j(this);b.animate({opacity:1}),$j(".projects_masonry_holder").length&&resizeMasonry(b),b.isotope({itemSelector:".portfolio_masonry_item, .masonry_with_space .mix",layoutMode:"masonry"}),b.hasClass("appear_from_bottom")&&b.find("article").each(function(a){$j(this).appear(function(){var a=$j(this);a.addClass("show"),setTimeout(function(){a.addClass("shown")},1e3)},{accX:0,accY:0})}),initPortfolioMasonryFilter(b),$j(".projects_masonry_holder").length&&(setPortfolioMasZIndex(),a.resize(function(){resizeMasonry(b),setPortfolioMasZIndex()})),setPortfolioParallax(b),$j(".parallax_section_holder").length&&initParallax()})}function resizeMasonry(a){"use strict";var b=jQuery(window);if($j(".full_width").length)portfolio_width=$j("body").hasClass("vertical_menu_enabled")&&$window_width>1e3?b.innerWidth()-260:b.innerWidth(),a.hasClass("masonry_extended")&&(portfolio_width-=60);else{var c=a.closest(".container_inner");portfolio_width=c.has(".column_inner").length?a.closest(".column_inner").innerWidth():c.innerWidth(),a.hasClass("masonry_extended")&&(portfolio_width+=60)}a.width(portfolio_width);var d=5;portfolio_width>1600?d=5:portfolio_width<=1600&&portfolio_width>1300?d=4:portfolio_width<=1300&&portfolio_width>1e3?d=3:portfolio_width<=1e3&&portfolio_width>480?d=2:portfolio_width<=480&&(d=1),a.hasClass("masonry_extended")&&(portfolio_width>1600?d=4:portfolio_width<=1600&&portfolio_width>964?d=4:portfolio_width<=964&&portfolio_width>728?d=3:portfolio_width<=728&&portfolio_width>540?d=2:portfolio_width<=540&&(d=1));var e=a.find('article[class*="default"]:first img').height(),f=a.find('article[class*="default"]:first img').height(),g=b.innerWidth()>480?2:1;a.hasClass("masonry_extended")&&(e+=30,a.find('article[class*="large_width"] img').css("height",f)),a.find('article[class*="large_width_height"] img, article[class*="large_height"] img').css("height",e*g),a.isotope({masonry:{columnWidth:portfolio_width/parseInt(d)}})}function setPortfolioParallax(a){a.hasClass("masonry_extended")&&a.find(".portfolio_masonry_item.parallax_item").each(function(b){$j(this).masonryParallax(a.data("parallax_item_speed"),!0,a.data("parallax_item_offset"))})}function setPortfolioMasZIndex(){"use strict";var a={},b={};$j(".projects_masonry_holder article").each(function(){a[$j(this).index()]=getPortfolioXPos($j(this).css("left"))});var c=$j.map(a,function(a){return a});c=cleanPortfolioMasXArray(c),c.sort(function(a,b){return a-b});for(var d=0;da?$j(".load_more a").attr("href",g):$j(".load_more").remove(),$j(".projects_holder .portfolio_paging:last").remove(),i.show(),j.hide()})}else{$j(".projects_holder .filler").slice(-h).remove();var c=$j(d,b).wrapInner("").html();g=$j(e,b).attr("href"),$j(d,b).waitForImages(function(){if($j("article.mix:last").after(c),$j(".masonry_with_space").length)$j(".masonry_with_space .projects_holder").isotope("reloadItems").isotope();else{var b=$j("article.mix:first").height();$j("article.mix").css("min-height",b),$j(".projects_holder").mixitup("remix","all")}prettyPhoto(),$j(".load_more").attr("rel")>a?$j(".load_more a").attr("href",g):$j(".load_more").remove(),$j(".projects_holder .portfolio_paging:last").remove(),$j("article.mix").css("min-height",0),i.show(),j.hide(),setTimeout(function(){$j(".projects_holder article").css("visibility","visible"),$j("article:not(.show)").each(function(a){$j(this).addClass("show"),setTimeout(function(){$j(this).addClass("shown")},1e3)})},600)})}}),a++})}function prettyPhoto(){"use strict";$j("a[data-rel]").each(function(){$j(this).attr("rel",$j(this).data("rel"))}),$j("a[rel^='prettyPhoto']").prettyPhoto({animation_speed:"normal",slideshow:!1,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,horizontal_padding:0,default_width:960,default_height:540,counter_separator_label:"/",theme:"pp_default",hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,overlay_gallery:!1,keyboard_shortcuts:!0,deeplinking:!1,social_tools:!1})}function checkTitleToShowOrHide(){if($j(".title_outer.animate_title_area").length){var a=$j(".title_outer").data("height");$scroll>$j(".title").height()&&$j(".title_outer").css({height:a,opacity:"1",overflow:"visible"})}}function initTitleAreaAnimation(){if($j(".title_outer.animate_title_area").length){var a=$j(".title_outer").data("height");$j(".title_outer").hasClass("with_image")&&(a=$j(".image.responsive").height()),$scroll<$j(".title").height()&&$j(".title_outer").animate({height:a,opacity:1},500,function(){$j(this).css({overflow:"visible"}),initPortfolioSingleInfo(),$j("nav.content_menu").length>0&&(content_menu_position=$j("nav.content_menu").offset().top,contentMenuPosition())})}}function cleanPortfolioMasXArray(a){var b,c=a.length,d=[],e={};for(b=0;b0&&0===$j(".touch").length){if($j(".title.has_fixed_background").length){var a=parseInt($j(".title.has_fixed_background").css("background-size").match(/\d+/)),b=$j(".title.has_fixed_background").height(),c=b/1e4*7,d=$scroll-$j(".title.has_fixed_background").offset().top;$j(".title.has_fixed_background").css({"background-position":"center "+(0+add_for_admin_bar)+"px"}),$j(".title.has_fixed_background").hasClass("zoom_out")&&$j(".title.has_fixed_background").css({"background-size":a-$scroll+"px auto"})}$j(window).on("scroll",function(){if($j(".title.has_fixed_background").length){var b=$scroll-$j(".title.has_fixed_background").offset().top,d=-(b*c);$j(".title.has_fixed_background").css({"background-position":"center "+(d+add_for_admin_bar)+"px"}),$j(".title.has_fixed_background").hasClass("zoom_out")&&$j(".title.has_fixed_background").css({"background-size":a-$scroll+"px auto"})}})}}function initParallax(){"use strict";$j(".parallax_section_holder").length&&$j(".parallax_section_holder").each(function(){$j(this).hasClass("full_screen_height_parallax")&&($j(this).height($window_height),$j(this).find(".parallax_content_outer").css("padding",0));var a=.4*$j(this).data("speed");$j(this).parallax("50%",a)})}function initSideAreaScroll(){"use strict";$j(".side_menu").length&&$j(".side_menu").niceScroll({scrollspeed:60,mousescrollstep:40,cursorwidth:0,cursorborder:0,cursorborderradius:0,cursorcolor:"transparent",autohidemode:!1,horizrailenabled:!1})}function initVerticalAreaMenuScroll(){"use strict";$j(".vertical_menu_area.with_scroll").length&&$j(".vertical_menu_area.with_scroll").niceScroll({scrollspeed:60,mousescrollstep:40,cursorwidth:0,cursorborder:0,cursorborderradius:0,cursorcolor:"transparent",autohidemode:!1,horizrailenabled:!1})}function initMobileMenu(){"use strict";$j(".mobile_menu_button span").on("tap click",function(a){a.preventDefault(),$j(".mobile_menu > ul").is(":visible")?$j(".mobile_menu > ul").slideUp(200):$j(".mobile_menu > ul").slideDown(200)}),$j(".mobile_menu > ul > li.has_sub > span.mobile_arrow, .mobile_menu > ul > li.has_sub > h3, .mobile_menu > ul > li.has_sub > a[href*='#']").on("tap click",function(a){a.preventDefault(),$j(this).closest("li.has_sub").find("> ul.sub_menu").is(":visible")?($j(this).closest("li.has_sub").find("> ul.sub_menu").slideUp(200),$j(this).closest("li.has_sub").removeClass("open_sub")):($j(this).closest("li.has_sub").addClass("open_sub"),$j(this).closest("li.has_sub").find("> ul.sub_menu").slideDown(200))}),$j(".mobile_menu > ul > li.has_sub > ul.sub_menu > li.has_sub > span.mobile_arrow, .mobile_menu > ul > li.has_sub > ul.sub_menu > li.has_sub > h3, .mobile_menu > ul > li.has_sub > ul.sub_menu > li.has_sub > a[href*='#']").on("tap click",function(a){a.preventDefault(),$j(this).parent().find("ul.sub_menu").is(":visible")?($j(this).parent().find("ul.sub_menu").slideUp(200),$j(this).parent().removeClass("open_sub")):($j(this).parent().addClass("open_sub"),$j(this).parent().find("ul.sub_menu").slideDown(200))}),$j(".mobile_menu ul li > a, .q_logo a").on("click",function(){"http://#"!==$j(this).attr("href")&&"#"!==$j(this).attr("href")&&$j(".mobile_menu > ul").slideUp()})}function initFlexSlider(){"use strict";$j(".flexslider").each(function(){var a=8e3;"undefined"!=typeof $j(this).data("interval")&&$j(this).data("interval")!==!1&&(a=1e3*parseFloat($j(this).data("interval")));var b=!0;0===a&&(b=!1);var c="slide";"undefined"!=typeof $j(this).data("flex_fx")&&$j(this).data("flex_fx")!==!1&&(c=$j(this).data("flex_fx")),$j(this).flexslider({animationLoop:!0,controlNav:!1,useCSS:!1,pauseOnAction:!0,pauseOnHover:!0,slideshow:b,animation:c,prevText:"",nextText:"",animationSpeed:600,slideshowSpeed:a,start:function(){setTimeout(function(){$j(".flexslider").fitVids()},100)}}),$j(".flex-direction-nav a").click(function(a){a.preventDefault(),a.stopImmediatePropagation(),a.stopPropagation()})})}function fitVideo(){"use strict";$j(".portfolio_images").fitVids(),$j(".video_holder").fitVids(),$j(".format-video .post_image").fitVids(),$j(".format-video .q_masonry_blog_post_image").fitVids(),$j(".portfolio_owl_slider").fitVids()}function initPortfolioSingleInfo(){"use strict";var a=$j(".portfolio_single_follow");if($j(".portfolio_single_follow").length>0){var b=a.offset();$scrollHeight=$j(".portfolio_container").height();var c=$j(".portfolio_container").offset(),d=$j(window),e=parseInt($j("header.page_header").css("height"),10),f=$j("body").hasClass("paspartu_enabled")?$window_width*paspartu_width:0;d.scroll(function(){d.width()>960?d.scrollTop()+e+f>b.top?d.scrollTop()+e+f+a.height()+24",""],responsive:{0:{stagePadding:60},600:{stagePadding:120},1e3:{stagePadding:160}}}).animate({opacity:1},600)})}function initTabs(){"use strict";if($j(".q_tabs").length){$j(".q_tabs").appear(function(){$j(".q_tabs").css("visibility","visible")},{accX:0,accY:-100});var a=$j(".tabs-nav"),b=a.children("li");a.each(function(){var a=$j(this);a.next().children(".tab-content").stop(!0,!0).hide().first().show(),a.children("li").first().addClass("active").stop(!0,!0).show()}),b.on("click",function(a){var b=$j(this);b.siblings().removeClass("active").end().addClass("active"),b.parent().next().children(".tab-content").stop(!0,!0).hide().siblings(b.find("a").attr("href")).fadeIn(),a.preventDefault()})}}function initAccordion(){"use strict";$j(".q_accordion_holder").length&&($j(".q_accordion_holder").appear(function(){$j(".q_accordion_holder").css("visibility","visible")},{accX:0,accY:-100}),$j(".accordion").length&&($j(".accordion").accordion({animate:"swing",collapsible:!0,active:!1,icons:"",heightStyle:"content"}),$j(".accordion").each(function(){var a=parseInt($j(this).data("active-tab"));""!==a&&(a-=1,$j(this).accordion("option","active",a));var b=parseInt($j(this).data("border-radius"));""!==b&&$j(this).find(".accordion_mark").css("border-radius",b+"px");var c="yes"==$j(this).data("collapsible");$j(this).accordion("option","collapsible",c),$j(this).accordion("option","collapsible",c)})),$j(".toggle").addClass("accordion ui-accordion ui-accordion-icons ui-widget ui-helper-reset").find(".title-holder").addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom").hover(function(){$j(this).toggleClass("ui-state-hover")}).click(function(){return $j(this).toggleClass("ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom").next().toggleClass("ui-accordion-content-active").slideToggle(400),!1}).next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),$j(".toggle").each(function(){var a=parseInt($j(this).data("active-tab")),b=parseInt($j(this).data("border-radius"));""!==b&&$j(this).find(".accordion_mark").css("border-radius",b+"px"),""!==a&&a>=1&&(a-=1,$j(this).find(".ui-accordion-content").eq(a).show(),$j(this).find(".ui-accordion-header").eq(a).addClass("ui-state-active"))}))}function initAccordionContentLink(){"use strict";$j(".accordion").length&&$j(".accordion_holder .accordion_inner .accordion_content a").click(function(){return"_blank"===$j(this).attr("target")?window.open($j(this).attr("href"),"_blank"):window.open($j(this).attr("href"),"_self"),!1})}function initTestimonials(){"use strict";$j(".testimonials_carousel").length&&$j(".testimonials_carousel").each(function(){$j(this).appear(function(){$j(this).css("visibility","visible")},{accX:0,accY:-100});var a=5e3;"undefined"!=typeof $j(this).data("auto-rotate-slides")&&$j(this).data("auto-rotate-slides")!==!1&&(a=1e3*parseFloat($j(this).data("auto-rotate-slides")));var b=!0;0===a&&(b=!1);var c="fade";"undefined"!=typeof $j(this).data("animation-type")&&$j(this).data("animation-type")!==!1&&(c=$j(this).data("animation-type"));var d=!0;"undefined"!=typeof $j(this).data("show-navigation")&&(d="no"!=$j(this).data("show-navigation"));var e=600;"undefined"!=typeof $j(this).data("animation-speed")&&$j(this).data("animation-speed")!==!1&&(e=$j(this).data("animation-speed")),$j(this).flexslider({animationLoop:!0,controlNav:d,directionNav:!1,useCSS:!1,pauseOnAction:!0,pauseOnHover:!1,slideshow:b,animation:c,itemMargin:25,minItems:1,maxItems:1,animationSpeed:e,slideshowSpeed:a,start:function(a){initParallax()}})})}function initMessages(){"use strict";$j(".q_message").length&&$j(".q_message").each(function(){$j(this).find(".close").click(function(a){a.preventDefault(),$j(this).parent().parent().fadeOut(500)})})}function initElementsAnimation(){"use strict";$j(".element_from_fade").length>0&&0===$j(".no_animation_on_touch").length&&$j(".element_from_fade").each(function(){var a=$j(this);a.appear(function(){a.addClass("element_from_fade_on")},{accX:0,accY:-100})}),$j(".element_from_left").length>0&&0===$j(".no_animation_on_touch").length&&$j(".element_from_left").each(function(){var a=$j(this);a.appear(function(){a.addClass("element_from_left_on")},{accX:0,accY:-100})}),$j(".element_from_right").length>0&&0===$j(".no_animation_on_touch").length&&$j(".element_from_right").each(function(){var a=$j(this);a.appear(function(){a.addClass("element_from_right_on")},{accX:0,accY:-100})}),$j(".element_from_top").length>0&&0===$j(".no_animation_on_touch").length&&$j(".element_from_top").each(function(){var a=$j(this);a.appear(function(){a.addClass("element_from_top_on")},{accX:0,accY:-100})}),$j(".element_from_bottom").length>0&&0===$j(".no_animation_on_touch").length&&$j(".element_from_bottom").each(function(){var a=$j(this);a.appear(function(){a.addClass("element_from_bottom_on")},{accX:0,accY:-100})}),$j(".element_transform").length>0&&0===$j(".no_animation_on_touch").length&&$j(".element_transform").each(function(){var a=$j(this);a.appear(function(){a.addClass("element_transform_on")},{accX:0,accY:-100})})}function fitAudio(){"use strict";$j("audio.blog_audio").mediaelementplayer({audioWidth:"100%"})}function initBlog(){"use strict";if($j(".blog_holder.masonry").length){var a=$j(this).closest(".container_inner").width();$j(".blog_holder.masonry").closest(".column_inner").length&&(a=$j(".blog_holder.masonry").closest(".column_inner").width()),$j(".blog_holder.masonry").width(a);var b=$j(".blog_holder.masonry"),c=3;if(b.width()<420?c=1:b.width()<=805&&(c=2),b.isotope({itemSelector:"article",resizable:!1,masonry:{columnWidth:$j(".blog_holder.masonry").width()/c}}),$j(".filter").click(function(){var a=$j(this).attr("data-filter");return b.isotope({filter:a}),!1}),b.hasClass("masonry_infinite_scroll"))b.infinitescroll({navSelector:".blog_infinite_scroll_button span",nextSelector:".blog_infinite_scroll_button span a",itemSelector:"article",loading:{finishedMsg:finished_text,msgText:loading_text}},function(a){b.isotope("appended",$j(a)),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.masonry").isotope("layout")},400)});else if(b.hasClass("masonry_load_more")){var d=1;$j(".blog_load_more_button a").on("click",function(a){a.preventDefault();var c=$j(this).attr("href"),e=".masonry_load_more",f=".blog_load_more_button a",g=$j(f).attr("href");$j.get(c+"",function(a){var c=$j(e,a).wrapInner("").html();g=$j(f,a).attr("href"),b.append($j(c)).isotope("reloadItems").isotope({sortBy:"original-order"}),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.masonry").isotope("layout")},400),$j(".blog_load_more_button span").attr("rel")>d?$j(".blog_load_more_button a").attr("href",g):$j(".blog_load_more_button").remove(),setTimeout(function(){$j("article:not(.show)").each(function(a){$j(this).addClass("show")})},1e3)}),d++})}$j(window).resize(function(){c=b.width()<420?1:b.width()<=785?2:3}),$j(".blog_appear_from_bottom").length&&$j(".blog_holder").find("article").each(function(a){$j(this).appear(function(){var a=$j(this);a.addClass("show")},{accX:0,accY:-70})}),$j(".blog_holder.masonry, .blog_load_more_button_holder").animate({opacity:"1"},400,function(){$j(".blog_holder.masonry").isotope("layout")})}}function initBlogMasonryFullWidth(){"use strict";if($j(".masonry_full_width").length){var a=$j(".full_width_inner").width();$j(".masonry_full_width").width(a);var b=$j(".masonry_full_width");if($j(".masonry_full_width").hasClass("pinterest_full_width")){var c=4;b.width()<480?c=1:b.width()<=950?c=2:b.width()<=1320&&(c=3)}else{var c=5;b.width()<480?c=1:b.width()<=703?c=2:b.width()<=920?c=3:b.width()<=1320&&(c=4)}if($j(".filter").click(function(){var a=$j(this).attr("data-filter");return b.isotope({filter:a}),!1}),b.hasClass("masonry_infinite_scroll"))b.infinitescroll({navSelector:".blog_infinite_scroll_button span",nextSelector:".blog_infinite_scroll_button span a",itemSelector:"article",loading:{finishedMsg:finished_text,msgText:loading_text}},function(a){b.isotope("appended",$j(a)),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.masonry_full_width").isotope("layout")},400)});else if(b.hasClass("masonry_load_more")){var d=1;$j(".blog_load_more_button a").on("click",function(a){a.preventDefault();var c=$j(this).attr("href"),e=".masonry_load_more",f=".blog_load_more_button a",g=$j(f).attr("href");$j.get(c+"",function(a){var c=$j(e,a).wrapInner("").html();g=$j(f,a).attr("href"),b.append($j(c)).isotope("reloadItems").isotope({sortBy:"original-order"}),fitVideo(),fitAudio(),initFlexSlider(),setTimeout(function(){$j(".blog_holder.masonry_full_width").isotope("layout")},400),$j(".blog_load_more_button span").attr("rel")>d?$j(".blog_load_more_button a").attr("href",g):$j(".blog_load_more_button").remove(),setTimeout(function(){$j("article:not(.show)").each(function(a){$j(this).addClass("show")})},1e3)}),d++})}b.isotope({itemSelector:"article",resizable:!1,masonry:{columnWidth:$j(".masonry_full_width").width()/c}}),$j(window).resize(function(){c=b.width()<480?1:b.width()<=703?2:b.width()<=920?3:b.width()<=1320?4:5}),$j(".blog_appear_from_bottom").length&&$j(".blog_holder").find("article").each(function(a){$j(this).appear(function(){var a=$j(this);a.addClass("show")},{accX:0,accY:-70})}),$j(".masonry_full_width, .blog_load_more_button_holder").animate({opacity:"1"},400,function(){$j(".blog_holder.masonry_full_width").isotope("layout")})}}function initBlogChequered(){"use strict";var a=$j(".blog_holder.blog_chequered"),b=-1;if(a.length){var c=a.find("article");c.each(function(){b=b>$j(this).find(".qodef-post-content-inner").outerHeight()?b:$j(this).find(".qodef-post-content-inner").outerHeight()}),c.each(function(){$j(this).find(".qodef-post-content").height(b),$j(this).css("opacity","1")})}}function initPortfolioSingleMasonry(){"use strict";if($j(".portfolio_single.masonry-gallery").length){var a=$j(".portfolio_single.masonry-gallery").width();$j(".portfolio_single .portfolio_masonry_gallery").width(a);var b=$j(".portfolio_single .portfolio_masonry_gallery"),c=4;b.width()<420?c=1:b.width()<=805&&(c=3),b.isotope({itemSelector:".mix",resizable:!1,masonry:{columnWidth:$j(".portfolio_single .portfolio_masonry_gallery").width()/c}}),$j(".portfolio_single .portfolio_masonry_gallery").css("opacity","1"),$j(window).resize(function(){c=b.width()<=420?1:b.width()<=785?3:4})}}function initProgressBarsIcon(){"use strict";$j(".q_progress_bars_icons_holder").length&&$j(".q_progress_bars_icons_holder").each(function(){var a=$j(this);a.appear(function(){a.find(".q_progress_bars_icons").css("opacity","1"),a.find(".q_progress_bars_icons").each(function(){var a=$j(this).find(".q_progress_bars_icons_inner").data("number"),b=$j(this).find(".q_progress_bars_icons_inner").data("size");""!==b&&($j(this).find(".q_progress_bars_icons_inner.custom_size .bar").css({width:b+"px",height:b+"px"}),$j(this).find(".q_progress_bars_icons_inner.custom_size .bar .fa-stack").css({"font-size":b/2+"px"}));var c=$j(this).find(".bar");c.each(function(b){if(b0&&d<601?800:d>600&&d<1201?1500:2100,a.find(".more_facts_outer").css({height:"0px",display:"none",opacity:"0"}),a.find(".more_facts_button").on("mouseenter",function(){$j(this).css("color",$j(this).data("hovercolor"))}).on("mouseleave",function(){a.find(".more_facts_outer").is(":visible")||$j(this).css("color",$j(this).data("color"))}),a.find(".more_facts_button").click(function(){a.find(".more_facts_outer").is(":visible")?(a.find(".more_facts_fake_arrow").fadeOut(e),$j(this).parent().parent().find(".more_facts_outer").stop().animate({height:"0px"},e,function(){$j(this).css({display:"none",opacity:"0"}),a.find(".more_facts_button").is(":hover")||a.find(".more_facts_button").css("color",a.find(".more_facts_button").data("color")),a.removeClass("more_fact_opened"),$j(".parallax_section_holder").length&&initParallax()}),$j(this).find(".more_facts_button_text").text(b),$j(this).find(".more_facts_button_arrow").removeClass("rotate_arrow")):(a.find(".more_facts_fake_arrow").fadeIn(e),a.addClass("more_fact_opened"),$j(this).parent().parent().find(".more_facts_outer").css({display:"block",opacity:"1"}).stop().animate({height:d+30},e,function(){$j(".parallax_section_holder").length&&initParallax()}),$j(this).find(".more_facts_button_text").text(c),$j(this).find(".more_facts_button_arrow").addClass("rotate_arrow"))})})}function contentMinHeightWithPaspartu(){"use strict";if($j(".paspartu_enabled").length){var a,b=0,c=$window_width*paspartu_width,d=$j("footer").height();b=2*c,a=$window_height-header_height-b-d,$j(".content").length&&$j(".content").css("min-height",a)}}function placeholderReplace(){"use strict";$j("#contact-form [placeholder]").focus(function(){var a=$j(this);a.val()===a.attr("placeholder")&&(this.originalType&&(this.type=this.originalType,delete this.originalType),a.val(""),a.removeClass("placeholder"))}).blur(function(){var a=$j(this);""===a.val()&&("password"===this.type&&(this.originalType=this.type,this.type="text"),a.addClass("placeholder"),a.val(a.attr("placeholder")))}).blur(),$j("#contact-form [placeholder]").parents("form").submit(function(){$j(this).find("[placeholder]").each(function(){var a=$j(this);a.val()===a.attr("placeholder")&&a.val("")})})}function totop_button(a){"use strict";var b=$j("#back_to_top");b.removeClass("off on"),"on"===a?b.addClass("on"):b.addClass("off")}function backButtonShowHide(){"use strict";$j(window).scroll(function(){var c,a=$j(this).scrollTop(),b=$j(this).height();c=a>0?a+b/2:1,totop_button(c<1e3?"off":"on")})}function backToTop(){"use strict";$j(document).on("click","#back_to_top",function(a){a.preventDefault(),$j("body,html").animate({scrollTop:0},$j(window).scrollTop()/3,"linear")})}function initMessageHeight(){"use strict";$j(".q_message.with_icon").length&&$j(".q_message.with_icon").each(function(){$j(this).find(".message_text_holder").height()>$j(this).find(".q_message_icon_holder").height()?$j(this).find(".q_message_icon_holder").height($j(this).find(".message_text").height()):$j(this).find(".message_text").height($j(this).find(".q_message_icon_holder").height())})}function initImageHover(){"use strict";$j(".image_hover").length&&$j(".image_hover").each(function(){$j(this).appear(function(){var a=300,b=$j(this).attr("data-transition-delay"),c=a+parseFloat(b),d=$j(this);setTimeout(function(){d.addClass("show")},parseFloat(b)),setTimeout(function(){d.removeClass("show")},c)},{accX:0,accY:-200})})}function initProgressBarsVertical(){"use strict";$j(".q_progress_bars_vertical").length&&$j(".q_progress_bars_vertical").each(function(){$j(this).appear(function(){initToCounterVerticalProgressBar($j(this));var a=$j(this).find(".progress_content").data("percentage");$j(this).find(".progress_content").css("height","0%"),$j(this).find(".progress_content").animate({height:a+"%"},1500)},{accX:0,accY:-150})})}function initToCounterVerticalProgressBar(a){"use strict";a.find(".progress_number span").length&&a.find(".progress_number span").each(function(){var a=parseFloat($j(this).text());$j(this).countTo({from:0,to:a,speed:1500,refreshInterval:50})})}function checkAnchorOnLoad(){"use strict";var b,c,a=window.location.hash,d=$j("body").hasClass("paspartu_enabled")?$window_width*paspartu_width:0;if(""!==a&&$j('[data-q_id="'+a+'"]').length>0){if($j("header.page_header").hasClass("fixed")&&!$j("body").hasClass("vertical_menu_enabled"))if(c=$j("header.page_header").hasClass("scroll_top")?33:0,!$j("header.page_header").hasClass("transparent")||$j("header.page_header").hasClass("scrolled_not_transparent"))if(header_height-($j('[data-q_id="'+a+'"]').offset().top+c)/4>=min_header_height_scroll){var e=$j('[data-q_id="'+a+'"]').offset().top-header_height-d;b=e+e/4+e/16+e/64+1}else b=$j("header.page_header").hasClass("centered_logo")?$j('[data-q_id="'+a+'"]').offset().top-min_header_height_scroll-logo_height-20-d:$j('[data-q_id="'+a+'"]').offset().top-min_header_height_scroll-d;else b=$j('[data-q_id="'+a+'"]').offset().top-d;else b=$j("header.page_header").hasClass("fixed_hiding")&&!$j("body").hasClass("vertical_menu_enabled")?!$j("header.page_header").hasClass("transparent")||$j("header.page_header").hasClass("scrolled_not_transparent")?$j('[data-q_id="'+a+'"]').offset().top-(header_height+logo_height/2+40)<=scroll_amount_for_fixed_hiding?$j('[data-q_id="'+a+'"]').offset().top-header_height-logo_height/2-40-d:$j('[data-q_id="'+a+'"]').offset().top-min_header_height_fixed_hidden-40-d:$j('[data-q_id="'+a+'"]').offset().top-d:($j("header.page_header").hasClass("stick")||$j("header.page_header").hasClass("stick_with_left_right_menu")&&!$j("body").hasClass("vertical_menu_enabled"))&&(!$j("header.page_header").hasClass("transparent")||$j("header.page_header").hasClass("scrolled_not_transparent"))?sticky_amount>=$j('[data-q_id="'+a+'"]').offset().top?$j('[data-q_id="'+a+'"]').offset().top+1-d:$j('[data-q_id="'+a+'"]').offset().top-min_header_height_sticky-d:$j('[data-q_id="'+a+'"]').offset().top-d; $j("html, body").animate({scrollTop:Math.round(b)},1500,function(){})}$j(".main_menu a, .vertical_menu a, .mobile_menu a").each(function(){var a=$j(this).prop("hash");""!==a&&$j('[data-q_id="'+a+'"]').length>0&&$j('[data-q_id="'+a+'"]').offset().top>=$window_height&&0===$scroll&&($j(this).parent().removeClass("active"),$j(this).removeClass("current"))})}function changeActiveState(a){"use strict";$j(".main_menu a[href*='#']").length&&$j(".main_menu a").parent().removeClass("active"),$j(".main_menu a").each(function(){var b=$j(this).prop("hash");b===a&&(0===$j(this).closest(".second").length?$j(this).parent().addClass("active"):$j(this).closest(".second").parent().addClass("active"),$j(".main_menu a").removeClass("current"),$j(this).addClass("current"))}),$j(".vertical_menu a[href*='#']").length&&$j(".vertical_menu a").parent().removeClass("active"),$j(".vertical_menu a").each(function(){var b=$j(this).prop("hash");b===a&&(0===$j(this).closest(".second").length?$j(this).parent().addClass("active"):$j(this).closest(".second").parent().addClass("active"),$j(".vertical_menu a").removeClass("current"),$j(this).addClass("current"))}),$j(".mobile_menu a[href*='#']").length&&$j(".mobile_menu a").parent().removeClass("active"),$j(".mobile_menu a").each(function(){var b=$j(this).prop("hash");b===a&&(0===$j(this).closest(".sub_menu").length?$j(this).parent().addClass("active"):$j(this).closest(".sub_menu").parent().addClass("active"),$j(".mobile_menu a").removeClass("current"),$j(this).addClass("current"))})}function checkAnchorOnScroll(){"use strict";$j("[data-q_id]").length&&!$j("header.page_header").hasClass("regular")&&($j("[data-q_id]").waypoint(function(a){"down"===a&&changeActiveState($j(this).data("q_id"))},{offset:"50%"}),$j("[data-q_id]").waypoint(function(a){"up"===a&&changeActiveState($j(this).data("q_id"))},{offset:function(){return-($j(this).outerHeight()-150)}}))}function initHashClick(){"use strict";var b,a=$j("html, body"),c=$j("body").hasClass("paspartu_enabled")?$window_width*paspartu_width:0;$j(document).on("click",".main_menu a, .vertical_menu a, .qbutton:not(.contact_form_button), .anchor, .widget li.anchor a",function(){var f,d=$j(this),e=$j(this).prop("hash");if(""!==e&&""===$j(this).attr("href").split("#")[0]||""!==e&&""!==$j(this).attr("href").split("#")[0]&&e===window.location.hash||""!==e&&$j(this).attr("href").split("#")[0]===window.location.href.split("#")[0]){if($j("header.page_header").hasClass("fixed")&&!$j("body").hasClass("vertical_menu_enabled"))if(f=$j("header.page_header").hasClass("scroll_top")?33:0,!$j("header.page_header").hasClass("transparent")||$j("header.page_header").hasClass("scrolled_not_transparent"))if(header_height-($j('[data-q_id="'+e+'"]').offset().top+f)/4>=min_header_height_scroll){var g=$j('[data-q_id="'+e+'"]').offset().top-header_height-c;b=g+g/4+g/16+g/64+1}else b=$j("header.page_header").hasClass("centered_logo")?$j('[data-q_id="'+e+'"]').offset().top-min_header_height_scroll-logo_height-20-c:$j('[data-q_id="'+e+'"]').offset().top-min_header_height_scroll-c;else b=$j('[data-q_id="'+e+'"]').offset().top-c;else b=$j("header.page_header").hasClass("fixed_hiding")&&!$j("body").hasClass("vertical_menu_enabled")?!$j("header.page_header").hasClass("transparent")||$j("header.page_header").hasClass("scrolled_not_transparent")?$j('[data-q_id="'+e+'"]').offset().top-(header_height+logo_height/2+40)<=scroll_amount_for_fixed_hiding?$j('[data-q_id="'+e+'"]').offset().top-header_height-logo_height/2-40-c:$j('[data-q_id="'+e+'"]').offset().top-min_header_height_fixed_hidden-40-c:$j('[data-q_id="'+e+'"]').offset().top-c:($j("header.page_header").hasClass("stick")||$j("header.page_header").hasClass("stick_with_left_right_menu")&&!$j("body").hasClass("vertical_menu_enabled"))&&(!$j("header.page_header").hasClass("transparent")||$j("header.page_header").hasClass("scrolled_not_transparent"))?sticky_amount>=$j('[data-q_id="'+e+'"]').offset().top?0!=$j('[data-q_id="'+e+'"]').offset().top?$j('[data-q_id="'+e+'"]').offset().top+1-c:$j('[data-q_id="'+e+'"]').offset().top-c:$j('[data-q_id="'+e+'"]').offset().top-min_header_height_sticky-c:$j('[data-q_id="'+e+'"]').offset().top-c;return $j('[data-q_id="'+e+'"]').length>0&&a.stop().animate({scrollTop:Math.round(b)},1500,function(){anchorActiveState(d)}),history.pushState&&history.pushState(null,null,e),!1}}),$j(document).on("click",".mobile_menu a",function(){var b=$j(this),c=$j(this).prop("hash");if(""!==c&&""===$j(this).attr("href").split("#")[0]||""!==c&&""!==$j(this).attr("href").split("#")[0]&&c===window.location.hash||""!==c&&$j(this).attr("href").split("#")[0]===window.location.href.split("#")[0])return $j('[data-q_id="'+c+'"]').length>0&&a.animate({scrollTop:Math.round($j('[data-q_id="'+c+'"]').offset().top-$j(".mobile_menu").height())},500,function(){anchorActiveState(b)}),history.pushState&&history.pushState(null,null,c),!1})}function animatedTextIconHeight(){"use strict";if($j(".animated_icons_with_text").length){var b,a=$j(".animated_icons_with_text");a.find(".animated_text p").each(function(){b=b>$j(this).height()?b:$j(this).height()}),b<155&&(b=155),a.find(".animated_icon_with_text_inner").height(b)}}function countAnimatedTextIconPerRow(){"use strict";$j(".animated_icons_with_text").length&&$j(".animated_icons_with_text").each(function(){var d,a=$j(this),c=(a.height(),a.width()),e=a.find(".animated_icon_with_text_holder").width()+1,f=a.find(".animated_icon_with_text_holder").length;a.find(".animated_icon_with_text_holder").each(function(){d=d>$j(this).height()?d:$j(this).height()}),d+=30;var g=Math.ceil(c/e),h=Math.floor(f/g),i=f-g*h;0===i&&(i=g),a.find(".animated_icon_with_text_holder").removeClass("border-bottom-none");var j=f-i-1;a.find(".animated_icon_with_text_holder:gt("+j+")").addClass("border-bottom-none")})}function anchorActiveState(a){a.closest(".main_menu").length>0&&$j(".main_menu a").parent().removeClass("active"),a.closest(".vertical_menu").length>0&&$j(".vertical_menu a").parent().removeClass("active"),0===a.closest(".second").length?a.parent().addClass("active"):a.closest(".second").parent().addClass("active"),a.closest(".mobile_menu").length>0&&($j(".mobile_menu a").parent().removeClass("active"),a.parent().addClass("active")),$j(".mobile_menu a, .main_menu a, .vertical_menu a").removeClass("current"),a.addClass("current")}function initVideoBackground(){"use strict";$j(".video-wrap .video").mediaelementplayer({enableKeyboard:!1,iPadUseNativeControls:!1,pauseOtherPlayers:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1}),navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)&&(initVideoBackgroundSize(),$j(".mobile-video-image").show(),$j(".video-wrap").remove())}function initVideoBackgroundSize(){"use strict";$j(".section .video-wrap").each(function(a){var b=$j(this).closest(".section").outerWidth();$j(this).width(b);var c=$j(this).closest(".section").outerHeight();min_w=vid_ratio*(c+20),$j(this).height(c);var d=b/video_width_original,e=(c-header_height)/video_height_original,f=e;d>e&&(f=d),f*video_width_originalf&&(g=e),g*video_width_originalf&&(g=e),g*video_width_original0&&0===$j(".no_animation_on_touch").length&&$j(".q_icon_animation").each(function(){$j(this).appear(function(){$j(this).addClass("q_show_animation")},{accX:0,accY:-100})})}function initCheckSafariBrowser(){"use strict";navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1&&$j("body").addClass("safari_browser")}function initCheckFirefoxMacBrowser(){"use strict";var a=navigator.userAgent.toLowerCase(),b=navigator.appVersion.toLowerCase();a.indexOf("firefox")>-1&&b.indexOf("mac")>-1&&$j("body").addClass("firefox_mac_browser")}function initSearchButton(){$j(".search_button.from_window_top").length&&$j(".search_button.from_window_top").click(function(a){if(a.preventDefault(),$j("html").hasClass("touch"))"0"==$j(".qode_search_form").height()?($j('.qode_search_form input[type="text"]').onfocus=function(){window.scrollTo(0,0),document.body.scrollTop=0},$j('.qode_search_form input[type="text"]').onclick=function(){window.scrollTo(0,0),document.body.scrollTop=0},$j(".header_top_bottom_holder").css("top",search_header_height+"px"),$j(".qode_search_form").css("height",search_header_height+"px"),$j(".content_inner").css("margin-top",search_header_height+"px"),$scroll<34&&$j("header.page_header").css("top","0")):($j(".qode_search_form").css("height","0"),$j(".header_top_bottom_holder").css("top","0"),$j(".content_inner").css("margin-top","0"),$scroll<34&&$j("header.page_header").css("top",-$scroll)),$j(window).scroll(function(){"0"!=$j(".qode_search_form").height()&&$scroll>50&&($j(".qode_search_form").css("height","0"),$j(".header_top_bottom_holder").css("top","0"),$j(".content_inner").css("margin-top","0"))}),$j(".qode_search_close").click(function(a){a.preventDefault(),$j(".qode_search_form").css("height","0"),$j(".header_top_bottom_holder").css("top","0"),$j(".content_inner").css("margin-top","0"),$scroll<34&&$j("header.page_header").css("top",-$scroll)});else{if($j(".title").hasClass("has_fixed_background"))var b=parseInt($j(".title.has_fixed_background").css("backgroundPosition").split(" ")[1]);else var b=0;"0"==$j(".qode_search_form").height()?($j('.qode_search_form input[type="text"]').focus(),$j(".header_top_bottom_holder").stop().animate({top:search_header_height+"px"},150),$j(".qode_search_form").stop().animate({height:search_header_height+"px"},150),$j(".content_inner").stop().animate({marginTop:search_header_height+"px"},150),$scroll<34&&$j("header.page_header").stop().animate({top:0},150),$j(".title.has_fixed_background").animate({"background-position-y":b+50+"px"},150)):($j(".qode_search_form").stop().animate({height:"0"},150),$j(".header_top_bottom_holder").stop().animate({top:"0px"},150),$j(".content_inner").stop().animate({marginTop:"0"},150),$scroll<34&&$j("header.page_header").stop().animate({top:-$scroll},150),$j(".title.has_fixed_background").animate({"background-position-y":b-50+"px"},150)),$j(window).scroll(function(){"0"!=$j(".qode_search_form").height()&&$scroll>50&&($j(".qode_search_form").stop().animate({height:"0"},150),$j(".header_top_bottom_holder").stop().animate({top:"0px"},150),$j(".content_inner").stop().animate({marginTop:"0"},150),$j(".title.has_fixed_background").css("backgroundPosition","center "+b+"px"))}),$j(".qode_search_close").click(function(a){a.preventDefault(),$j(".qode_search_form").stop().animate({height:"0"},150),$j(".content_inner").stop().animate({marginTop:"0"},150),$j(".header_top_bottom_holder").stop().animate({top:"0px"},150),$scroll<34&&$j("header.page_header").stop().animate({top:-$scroll},150),$j(".title.has_fixed_background").animate({"background-position-y":b+"px"},150)})}}),$j(".fullscreen_search").length&&($j(".fullscreen_search").on("click",function(a){a.preventDefault(),$j(".fullscreen_search_holder").hasClass("animate")?($j("body").removeClass("fullscreen_search_opened"),$j(".fullscreen_search_holder").removeClass("animate"),$j("body").removeClass("search_fade_out"),$j("body").removeClass("search_fade_in"),$j("body").hasClass("page-template-full_screen-php")||qodeEnableScroll()):($j("body").addClass("fullscreen_search_opened"),$j("body").removeClass("search_fade_out"),$j("body").addClass("search_fade_in"),$j(".fullscreen_search_holder").addClass("animate"),$j("body").hasClass("page-template-full_screen-php")||qodeDisableScroll())}),$j(".fullscreen_search_close").on("click",function(a){a.preventDefault(),$j("body").removeClass("fullscreen_search_opened"),$j(".fullscreen_search_holder").removeClass("animate"),$j("body").removeClass("search_fade_in"),$j("body").addClass("search_fade_out"),$j("body").hasClass("page-template-full_screen-php")||qodeEnableScroll()}))}function updateShoppingCart(){"use strict";function a(a,b,c){var d=$j(".shopping_cart_header");if(b["div.widget_shopping_cart_content"]){var e=jQuery(b["div.widget_shopping_cart_content"]),f=e.find(".cart_list"),g=e.find(".total").contents(":not(strong)").text();d.find(".shopping_cart_dropdown_inner").html("").append(f),d.find(".total span").html("").append(g)}}$j("body").bind("added_to_cart",a)}function setContentBottomMargin(){$j(".uncover").length&&$j(".content").css("margin-bottom",$j("footer").height())}function footerWidth(){"use strict";$j(".uncover").length&&$j("body").hasClass("vertical_menu_enabled")&&$window_width>1e3?$j(".uncover").width($window_width-$j(".vertical_menu_area").width()):$j(".uncover").css("width","100%")}function setFooterHeight(){"use strict";$window_width>600&&($j(".footer_top > div").innerHeight(),$j(".footer_top .qode_column").css("min-height",0).css("min-height",$j(".footer_top > div").innerHeight()))}function initCoverBoxes(){$j(".cover_boxes").length&&$j(".cover_boxes").each(function(){var a=0,b=1;"undefined"!=typeof $j(this).data("active-element")&&$j(this).data("active-element")!==!1&&(b=parseFloat($j(this).data("active-element")),a=b-1);var c=3;a=b>c?0:a,$j(this).find("li").eq(a).addClass("act");var d=$j(this);$j(this).find("li").each(function(){$j(this).hover(function(){$j(d).find("li").removeClass("act"),$j(this).addClass("act")})})})}function createContentMenu(){"use strict";var a=$j(".content_menu");a.each(function(){if(0===$j(this).find("ul").length){if(""!==$j(this).css("background-color"))var a=$j(this).css("background-color");var b=$j("");b.appendTo($j(this));var c=$j(this).siblings(".in_content_menu");c.length&&c.each(function(){var i,c=$j(this).data("q_id"),d=$j(this).data("q_title"),e=$j(this).data("q_icon"),f=$j("
        • "),g=$j("",{class:e}),h=$j("",{href:c,html:""+d+""});i=""!==a?$j("
          ",{class:"arrow",style:"border-color: "+a+" transparent transparent transparent"}):$j("
          ",{class:"arrow"}),g.prependTo(h),h.appendTo(f),i.appendTo(f),f.appendTo(b)})}})}function createSelectContentMenu(){"use strict";var a=$j(".content_menu");a.each(function(){var a=$j(this),b=$j("
            ");b.appendTo($j(this).find(".nav_select_menu")),$j(this).find("ul.menu li a").each(function(){var a=$j(this).attr("href"),c=$j(this).text(),d=$j(this).find("i").clone();2===$j(this).parents("li").length&&(c="   "+c),3===$j(this).parents("li").length&&(c="      "+c),$j(this).parents("li").length>3&&(c="         "+c);var e=$j("
          • "),f=$j("",{href:a,html:c});d.prependTo(f),f.appendTo(e),e.appendTo(b)}),a.find(".nav_select_button").on("click",function(){return a.find(".nav_select_menu ul").is(":visible")?a.find(".nav_select_menu ul").slideUp():a.find(".nav_select_menu ul").slideDown(),!1}),a.find(".nav_select_menu ul li a").on("click",function(){a.find(".nav_select_menu ul").slideUp();var b=$j(this),c=b.attr("href"),d=$j("div.wpb_row[data-q_id='"+c+"'],section.parallax_section_holder[data-q_id='"+c+"']").offset().top;return $j("html,body").stop().animate({scrollTop:d},500,"swing",function(){$j("nav.content_menu ul li").removeClass("active"),b.parent().addClass("active")}),!1})})}function contentMenuPosition(){"use strict";if($j("nav.content_menu").length){if(content_menu_position>sticky_amount)var a=min_header_height_sticky;else var a=0;content_menu_position-a-content_menu_top_add-$scroll<=0&&($j("header").hasClass("stick")||$j("header").hasClass("stick_with_left_right_menu"))?(content_menu_positionsticky_amount?$j("nav.content_menu").css({position:"fixed",top:min_header_height_sticky+content_menu_top_add}).addClass("fixed"):$j("nav.content_menu").css({position:"fixed",top:0,transition:"none"}).addClass("fixed"):$j("nav.content_menu").css({position:"fixed",top:min_header_height_sticky+content_menu_top_add}).addClass("fixed"),$j("header.sticky").addClass("no_shadow"),$j(".content > .content_inner > .container > .container_inner").css("margin-top",content_line_height),$j(".content > .content_inner > .full_width").css("margin-top",content_line_height)):content_menu_position-content_menu_top-content_menu_top_add-$scroll<=0&&!$j("header").hasClass("stick")?($j("nav.content_menu").css({position:"fixed",top:content_menu_top+content_menu_top_add}).addClass("fixed"),$j(".content > .content_inner > .container > .container_inner").css("margin-top",content_line_height),$j(".content > .content_inner > .full_width").css("margin-top",content_line_height)):($j("nav.content_menu").css({position:"relative",top:"0px"}).removeClass("fixed"),$j("header.sticky").removeClass("no_shadow"),$j(".content > .content_inner > .container > .container_inner").css("margin-top","0px"),$j(".content > .content_inner > .full_width").css("margin-top","0px")),$j(".content .in_content_menu").waypoint(function(a){var b=$j(this),c=b.data("q_id");$j("nav.content_menu.fixed li a").each(function(){var a=$j(this).attr("href");a===c?$j(this).parent().addClass("active"):$j(this).parent().removeClass("active")})},{offset:"150"})}}function contentMenuCheckLastSection(){"use strict";if($j("nav.content_menu").length&&$j(".content .in_content_menu").length){var a=$j(".content .in_content_menu:last").offset().top+$j(".content .in_content_menu:last").height(),b=$j(".content .in_content_menu:first").offset().top-content_menu_top-content_menu_top_add-72;a<$scroll&&$j("nav.content_menu.fixed li").removeClass("active"),b>$scroll&&$j("nav.content_menu li:first, nav.content_menu ul.menu li:first").removeClass("active")}}function contentMenuScrollTo(){"use strict";$j("nav.content_menu").length&&$j("nav.content_menu ul.menu li a").on("click",function(a){a.preventDefault();var b=$j(this);if($j(this).parent().hasClass("active"))return!1;var c=b.attr("href"),d=$j("div.wpb_row[data-q_id='"+c+"'],section.parallax_section_holder[data-q_id='"+c+"']").offset().top-content_line_height-content_menu_top-content_menu_top_add;return $j("html,body").stop().animate({scrollTop:d},500,"swing",function(){$j("nav.content_menu ul li").removeClass("active"),b.parent().addClass("active")}),!1})}function initButtonHover(){"use strict";$j(".qbutton").length&&$j(".qbutton").each(function(){if("undefined"!=typeof $j(this).data("hover-background-color")&&$j(this).data("hover-background-color")!==!1){var a=$j(this).data("hover-background-color"),b=$j(this).css("background-color");$j(this).hover(function(){$j(this).css("background-color",a)},function(){$j(this).css("background-color",b)})}if("undefined"!=typeof $j(this).data("hover-border-color")&&$j(this).data("hover-border-color")!==!1){var c=$j(this).data("hover-border-color"),d=$j(this).css("border-top-color");$j(this).hover(function(){$j(this).css("border-color",c)},function(){$j(this).css("border-color",d)})}if("undefined"!=typeof $j(this).data("hover-color")&&$j(this).data("hover-color")!==!1){var e=$j(this).data("hover-color"),f=$j(this).css("color");$j(this).hover(function(){$j(this).css("color",e)},function(){$j(this).css("color",f)})}})}function initSocialIconHover(){"use strict";$j(".q_social_icon_holder").length&&$j(".q_social_icon_holder").each(function(){var a="",b="";if("undefined"!=typeof $j(this).data("hover-background-color")&&$j(this).data("hover-background-color")!==!1&&0===$j(this).find(".simple_social").length){var c=$j(this).data("hover-background-color");a+="background-color: "+c+"!important;"}if(0===$j(this).find(".simple_social").length){var d=$j(this).find(".fa-stack").css("background-color");b+="background-color: "+d+"!important;"}if("undefined"!=typeof $j(this).data("hover-border-color")&&$j(this).data("hover-border-color")!==!1&&0===$j(this).find(".simple_social").length){var e=$j(this).data("hover-border-color");a+="border-color: "+e+"!important;"}if(0===$j(this).find(".simple_social").length){var f=$j(this).find(".fa-stack").css("border-color");b+="border-color: "+f+"!important;"}if("undefined"!=typeof $j(this).data("hover-color")&&$j(this).data("hover-color")!==!1){var g=$j(this).data("hover-color");a+="color: "+g+"!important;"}var h=$j(this).css("color");$j(this).find(".fa-stack .social_icon").length?h=$j(this).find(".fa-stack").css("color"):$j(this).find(".simple_social").length&&(h=$j(this).find(".simple_social").css("color")),b+="color: "+h+"!important;",""!==a&&($j(this).find(".fa-stack .social_icon").length?$j(this).find(".fa-stack").hover(function(){$j(this).attr("style",function(){return a})},function(){$j(this).attr("style",function(){return b})}):$j(this).find(".simple_social").length&&$j(this).find(".simple_social").hover(function(){$j(this).attr("style",function(){return a})},function(){$j(this).attr("style",function(){return b})}))})}function initIconHover(){"use strict";$j(".q_icon_shortcode").length&&$j(".q_icon_shortcode").each(function(){var a,b,d,e,c="",f="",g="",h="";"undefined"!=typeof $j(this).data("hover-background-color")&&$j(this).data("hover-background-color")!==!1&&$j(this).hasClass("normal")===!1&&(a=$j(this).data("hover-background-color")),$j(this).hasClass("normal")||(d=$j(this).css("background-color")),"undefined"!=typeof $j(this).data("hover-border-color")&&$j(this).data("hover-border-color")!==!1&&$j(this).hasClass("normal")===!1&&(b=$j(this).data("hover-border-color")),$j(this).hasClass("normal")===!1&&(e=$j(this).css("border-color")),"undefined"!=typeof $j(this).data("hover-color")&&$j(this).data("hover-color")!==!1&&(c=$j(this).data("hover-color"),g+="color: "+c+";"),f=$j(this).css("color"),h+="color: "+f+";",""===a&&""===b&&""===c||$j(this).hover(function(){""!==a&&$j(this).css("background-color",a),""!==b&&$j(this).css("border-color",b),""!==c&&$j(this).css("color",c),$j(this).find("a").attr("style",function(){return g})},function(){""!==a&&$j(this).css("background-color",d),""!==b&&$j(this).css("border-color",e),""!==c&&$j(this).css("color",f),$j(this).find("a").attr("style",function(){return h})})})}function initPopupMenu(){"use strict";$j("a.popup_menu").length&&($j(".popup_menu_holder_outer").height($window_height).niceScroll({scrollspeed:30,mousescrollstep:20,cursorwidth:0,cursorborder:0,cursorborderradius:0,cursorcolor:"transparent",autohidemode:!1,horizrailenabled:!1}),$j(window).resize(function(){$j(".popup_menu_holder_outer").height($window_height)}),$j("a.popup_menu").on("click",function(a){a.preventDefault(),$j(this).hasClass("opened")?($j(this).removeClass("opened"),$j("body").removeClass("popup_menu_opened"),$j("body").hasClass("page-template-full_screen-php")||qodeEnableScroll(),setTimeout(function(){$j("nav.popup_menu ul.sub_menu").slideUp(200,function(){$j("nav.popup_menu").getNiceScroll().resize()})},400)):($j(this).addClass("opened"),$j("body").addClass("popup_menu_opened"),$j("body").hasClass("page-template-full_screen-php")||qodeDisableScroll())}),$j(".popup_menu > ul > li.has_sub > a, .popup_menu > ul > li.has_sub > h6").on("tap click",function(a){return a.preventDefault(),$j(this).closest("li.has_sub").find("> ul.sub_menu").is(":visible")?($j(this).closest("li.has_sub").find("> ul.sub_menu").slideUp(200,function(){$j(".popup_menu_holder_outer").getNiceScroll().resize()}),$j(this).closest("li.has_sub").removeClass("open_sub")):($j(this).closest("li.has_sub").addClass("open_sub"),$j(this).closest("li.has_sub").find("> ul.sub_menu").slideDown(200,function(){$j(".popup_menu_holder_outer").getNiceScroll().resize()})),!1}),$j(".popup_menu ul li:not(.has_sub) a").click(function(){return"http://#"!==$j(this).attr("href")&&"#"!==$j(this).attr("href")&&($j("a.popup_menu").removeClass("opened"),$j("body").removeClass("popup_menu_opened").css("overflow","visible"),$j("nav.popup_menu ul.sub_menu").slideUp(200,function(){$j("nav.popup_menu").getNiceScroll().resize()}),qodeEnableScroll(),void 0)}))}function initImageGallerySliderNoSpace(){"use strict";$j(".qode_image_gallery_no_space").length&&($j(".qode_image_gallery_no_space").each(function(){$j(this).animate({opacity:1},1e3),$j(this).find(".qode_image_gallery_holder").lemmonSlider({infinite:!0})}),$j(".qode_image_gallery_no_space").hasClass("link_all")||$j(".qode_image_gallery_no_space").on("click","li:not(.active) a",function(){return!(window.innerWidth>800)}))}function initFullScreenTemplate(){"use strict";if($j(".full_screen_section_slide").length&&$j(".full_screen_section_slide").closest(".full_screen_section").addClass("full_screen_section_slides"),$j(".full_screen_holder").length&&$window_width>600){$j(".full_screen_preloader").css("height",$window_height),$j("#up_fs_button").on("click",function(){return $j.fn.fullpage.moveSectionUp(),!1}),$j("#down_fs_button").on("click",function(){return $j.fn.fullpage.moveSectionDown(),!1});var a=0;$j("header.page_header").length&&(a=$window_width>1400?$j("header.page_header").height()+45:$j("header.page_header").height()+10),$j(".full_screen_navigation_holder.up_arrow").css("top",a);var b=$j(".full_screen_inner > .full_screen_section").length;$j(".full_screen_inner").fullpage({sectionSelector:".full_screen_section",slideSelector:".full_screen_section_slide",scrollOverflow:!0,afterLoad:function(a,c){checkActiveArrowsOnFullScrrenTemplate(b,c)},afterRender:function(){checkActiveArrowsOnFullScrrenTemplate(b,1),$j(".full_screen_holder").find(".full_screen_navigation_holder").css("visibility","visible"),$j(".full_screen_holder").find(".full_screen_inner").css("visibility","visible"),$j(".full_screen_preloader").hide(),$j(".full_screen_holder video.full_screen_sections_video").length&&$j(".full_screen_holder video.full_screen_sections_video").each(function(){$j(this).get(0).play()})}})}}function checkActiveArrowsOnFullScrrenTemplate(a,b){"use strict";"1"==b?($j(".full_screen_navigation_holder.up_arrow").hide(),$j(".full_screen_navigation_holder.down_arrow").hide(),b!=a&&$j(".full_screen_navigation_holder.down_arrow").show()):b==a?($j(".full_screen_navigation_holder.down_arrow").hide(),"2"==a&&$j(".full_screen_navigation_holder.up_arrow").show()):($j(".full_screen_navigation_holder.up_arrow").show(),$j(".full_screen_navigation_holder.down_arrow").show())}function alterWPMLSwitcherHeaderBottom(){"use strict";if($j(".header_bottom li.menu-item-language").length){var a=$j(".header_bottom .menu-item-language").find(".submenu-languages");"undefined"!=typeof a&&(a.parent("li").addClass("narrow"),a.wrap('
            '),a.show())}}function initTwitterShortcode(){"use strict";$j(".qode_twitter_shortcode").length&&$j(".qode_twitter_shortcode").each(function(){$j(this).appear(function(){$j(this).css("visibility","visible")},{accX:0,accY:-100});var a=5e3;"undefined"!=typeof $j(this).data("auto-rotate-slides")&&$j(this).data("auto-rotate-slides")!==!1&&(a=1e3*parseFloat($j(this).data("auto-rotate-slides")));var b=!0;0===a&&(b=!1);var c="fade";"undefined"!=typeof $j(this).data("animation-type")&&$j(this).data("animation-type")!==!1&&(c=$j(this).data("animation-type"));var d=!0;"undefined"!=typeof $j(this).data("show-navigation")&&(d="no"!=$j(this).data("show-navigation"));var e=!0;"undefined"!=typeof $j(this).data("show-arrows")&&(e="no"!=$j(this).data("show-arrows"));var f=600;"undefined"!=typeof $j(this).data("animation-speed")&&$j(this).data("animation-speed")!==!1&&(f=$j(this).data("animation-speed")),$j(this).flexslider({animationLoop:!0,controlNav:d,directionNav:e,prevText:"",nextText:"",useCSS:!1,pauseOnAction:!0,pauseOnHover:!1,slideshow:b,animation:c,itemMargin:25,minItems:1,maxItems:1,animationSpeed:f,slideshowSpeed:a,start:function(a){initParallax()}})})}function stickyInfoPortfolio(a,b,c){"use strict";if($j(".portfolio_single_sticky").length){if($j(".portfolio_single.fixed-left").length)var d=$j(".portfolio_single_sticky").parent().innerWidth();$j("header.page_header").hasClass("regular")||$j(window).width()<=1e3?headerOffset=0:$j("header.page_header").hasClass("fixed_top_header")?headerOffset=$j("header.page_header .top_header").height():($j("header.page_header").hasClass("stick")||$j("header.page_header").hasClass("stick_with_left_right_menu"))&&sticky_amount>b?sticky_amount>=a?(headerOffset=0,"down"==$scroll_direction?$j(".portfolio_single_sticky").removeClass("portfolio_single_sticky_animate_top"):setTimeout(function(){$j(".portfolio_single_sticky").removeClass("portfolio_single_sticky_animate_top")},330)):(headerOffset=$j("header.page_header").height(),$j(".portfolio_single_sticky").addClass("portfolio_single_sticky_animate_top")):headerOffset=$j("header.page_header").height();var e=parseInt($j(".content .container .container_inner.default_template_holder").css("padding-top"));if(a>=b-headerOffset-e){var f=headerOffset+e;$j(".portfolio_single_sticky").addClass("stick"),$j(".portfolio_single_sticky.stick").css("top",f+"px"),$j(".portfolio_single.fixed-left").length&&$j(".portfolio_single.fixed-left .column2").css("padding-left",d+"px");var g=0,h=0;$j(".uncover").length&&($j(".no-touch").length&&$j(window).width()>1e3||$j(".touch").length&&$j(window).width()>1300)?(h=parseInt($j(".content").css("margin-bottom")),g=$j(document).height()-$window_height-h):g=$j("footer").offset().top-$window_height;var i=$window_height-(c+f+130);a-g>i?$j(".portfolio_single_sticky.stick").css("margin-top",-(a-g-i)):$j(".portfolio_single_sticky.stick").css("margin-top",0)}else $j(".portfolio_single_sticky").removeClass("stick"),$j(".portfolio_single_sticky").css("top","0"),$j(".portfolio_single.fixed-left").length&&$j(".portfolio_single.fixed-left .column2").css("padding-left","0"),$j(".portfolio_single_sticky").css("margin-top",0)}}function stickyInfoPortfolioWidth(){"use strict";if($j(".portfolio_single_sticky").length){var a=$j(".portfolio_single_sticky").parent().width();$j(".portfolio_single_sticky").css("width",a+"px")}}function removeStickyInfoPortfolioClass(){"use strict";$j(".portfolio_single_sticky").length&&$j(window).width()<=600&&$j(".portfolio_single_sticky").hasClass("stick")&&($j(".portfolio_single_sticky").removeClass("stick portfolio_single_sticky_animate_top"), $j(".portfolio_single_sticky").css("width","auto"),$j(".portfolio_single_sticky").css("top","auto"),$j(".portfolio_single_sticky").css("margin-top",0),$j(".portfolio_single.fixed-left").length&&$j(".portfolio_single.fixed-left .column2").css("padding-left","0"))}function preventDefaultValue(a){"use strict";a=a||window.event,a.preventDefault&&a.preventDefault(),a.returnValue=!1}function disableKeydown(a){"use strict";for(var b=keys.length;b--;)if(a.keyCode===keys[b])return void preventDefaultValue(a)}function disableWheel(a){"use strict";preventDefaultValue(a)}function qodeDisableScroll(){"use strict";window.addEventListener&&window.addEventListener("DOMMouseScroll",disableWheel,!1),window.onmousewheel=document.onmousewheel=disableWheel,document.onkeydown=disableKeydown,$j("body").hasClass("smooth_scroll")&&(window.removeEventListener("mousedown",mousedown,!1),window.removeEventListener("mousewheel",wheel,!1))}function qodeEnableScroll(){"use strict";window.removeEventListener&&window.removeEventListener("DOMMouseScroll",disableWheel,!1),window.onmousewheel=document.onmousewheel=document.onkeydown=null,$j("body").hasClass("smooth_scroll")&&(window.addEventListener("mousedown",mousedown,!1),window.addEventListener("mousewheel",wheel,!1))}var $j=jQuery.noConflict(),$scroll=0,$scrollEnd=0,$scroll_direction,$window_width=$j(window).width(),$window_height=$j(window).height(),logo_height,menu_dropdown_height_set=!1,sticky_amount=0,content_menu_position,content_menu_top,content_menu_top_add=0,src,next_image,prev_image,$top_header_height;if("undefined"==typeof paspartu_width_init)var paspartu_width_init=.02;var paspartu_width,min_w=1500,video_width_original=1280,video_height_original=720,vid_ratio=1280/720,skrollr_slider;if($j(".portfolio_single_sticky").length)var stickyInfoTopOffset,stickyInfoHeight;$j(document).ready(function(){"use strict";if($j(".content").css("min-height",$j(window).height()-$j("header.page_header").height()-$j("footer").height()),$j("header").hasClass("regular")&&(content_menu_top=0),$j("header").hasClass("fixed")&&(content_menu_top=min_header_height_scroll),($j("header").hasClass("stick")||$j("header").hasClass("stick_with_left_right_menu"))&&(content_menu_top=0),!$j("header.page_header").hasClass("scroll_top")&&$j("header.page_header").hasClass("has_top")&&$j("header.page_header").hasClass("fixed")&&(content_menu_top_add=33),$j("body").hasClass("vertical_menu_enabled")){content_menu_top=0,content_menu_top_add=0}paspartu_width=$window_width<1024?.02:paspartu_width_init,contentMinHeightWithPaspartu(),setDropDownMenuPosition(),initDropDownMenu(),initVerticalMenuToggle(),initVerticalMobileMenu(),initQodeSlider(),initSideMenu(),initPopupMenu(),initMessageHeight(),initToCounter(),initCounter(),initCountdown(),initProgressBars(),initListAnimation(),initPieChart(),initPieChartWithIcon(),initParallaxTitle(),initSideAreaScroll(),initVerticalAreaMenuScroll(),loadMore(),qodefPortfolioFullScreenSlider().init(),prettyPhoto(),initMobileMenu(),initFlexSlider(),fitVideo(),fitAudio(),initAccordion(),initAccordionContentLink(),initMessages(),initProgressBarsIcon(),initMoreFacts(),placeholderReplace(),backButtonShowHide(),backToTop(),initProgressBarsVertical(),initElementsAnimation(),updateShoppingCart(),initHashClick(),initImageHover(),initIconWithTextAnimation(),initVideoBackground(),initCheckSafariBrowser(),initCheckFirefoxMacBrowser(),initSearchButton(),initCoverBoxes(),createContentMenu(),contentMenuScrollTo(),createSelectContentMenu(),initButtonHover(),initSocialIconHover(),initIconHover(),alterWPMLSwitcherHeaderBottom(),intPortfolioOWLSlider(),intCarouselOWLSlider(),$j(".widget #searchform").mousedown(function(){$j(this).addClass("form_focus")}).focusout(function(){$j(this).removeClass("form_focus")}),$scroll=$j(window).scrollTop(),checkTitleToShowOrHide(),checkVerticalMenuTransparency(),$j(window).width()>1e3?headerSize($scroll):logoSizeOnSmallScreens(),$j("header:not(.stick_with_left_right_menu) .q_logo a").css("visibility","visible"),$j(window).width()>768&&contentMenuPosition(),contentMenuCheckLastSection(),initFullScreenTemplate()}),$j(window).load(function(){"use strict";$j(".touch .main_menu li:has(div.second)").doubleTapToGo(),setDropDownMenuPosition(),initDropDownMenu(),initPortfolio(),initPortfolioZIndex(),initPortfolioSingleInfo(),initTestimonials(),initTwitterShortcode(),initVideoBackgroundSize(),initBlog(),initBlogMasonryFullWidth(),initBlogChequered(),initPortfolioMasonry(),initPortfolioSingleMasonry(),initTabs(),animatedTextIconHeight(),countAnimatedTextIconPerRow(),initTitleAreaAnimation(),setContentBottomMargin(),footerWidth(),initPortfolioJustifiedGallery(),$j("nav.content_menu").length>0&&(content_menu_position=$j("nav.content_menu").offset().top,contentMenuPosition()),contentMenuCheckLastSection(),initQodeCarousel(),initPortfolioSlider(),setFooterHeight(),stickyInfoPortfolioWidth(),$j(".portfolio_single_sticky").length&&(stickyInfoTopOffset=$j(".portfolio_single_sticky").offset().top,stickyInfoHeight=$j(".portfolio_single_sticky").height()),$j(window).width()>600&&stickyInfoPortfolio($scroll,stickyInfoTopOffset,stickyInfoHeight),removeStickyInfoPortfolioClass(),$j("header.stick_with_left_right_menu .q_logo a").css("visibility","visible"),$j(".portfolio_justified_gallery").length&&$j(".portfolio_justified_gallery").css("opacity","1"),setMargingsForLeftAndRightMenu(),initImageGallerySliderNoSpace(),initParallax(),setTimeout(function(){checkAnchorOnScroll(),checkAnchorOnLoad()},700)}),$j(window).scroll(function(){"use strict";$scroll=$j(window).scrollTop(),$scroll_direction=$scroll>$scrollEnd?"down":"up",$scrollEnd=$scroll,$j(window).width()>1e3&&headerSize($scroll),$j(window).width()>768&&contentMenuPosition(),contentMenuCheckLastSection(),checkVerticalMenuTransparency(),$j(window).width()>600&&stickyInfoPortfolio($scroll,stickyInfoTopOffset,stickyInfoHeight),$j(".touch .drop_down > ul > li").mouseleave(),$j(".touch .drop_down > ul > li").blur()}),$j(window).resize(function(){"use strict";$window_width=$j(window).width(),$window_height=$j(window).height(),paspartu_width=$window_width<1024?.02:paspartu_width_init,$j(window).width()>1e3?headerSize($scroll):logoSizeOnSmallScreens(),stickyInfoPortfolioWidth(),$j(window).width()>600&&(stickyInfoHeight=$j(".portfolio_single_sticky").height(),stickyInfoPortfolio($scroll,stickyInfoTopOffset,stickyInfoHeight)),removeStickyInfoPortfolioClass(),intCarouselOWLSlider(),initMessageHeight(),initTestimonials(),initTwitterShortcode(),fitAudio(),initBlog(),initBlogMasonryFullWidth(),initPortfolioSingleMasonry(),initBlogChequered(),animatedTextIconHeight(),countAnimatedTextIconPerRow(),initVideoBackgroundSize(),setContentBottomMargin(),footerWidth(),setFooterHeight(),calculateHeights()});var sticky_animate,default_header_style,current_scroll;!function(a){"use strict";a.fn.countTo=function(b){b=a.extend({},a.fn.countTo.defaults,b||{});var c=Math.ceil(b.speed/b.refreshInterval),d=(b.to-b.from)/c;return a(this).each(function(){function i(){g+=d,f++,a(e).html(g.toFixed(b.decimals)),"function"==typeof b.onUpdate&&b.onUpdate.call(e,g),f>=c&&(clearInterval(h),g=b.to,"function"==typeof b.onComplete&&b.onComplete.call(e,g))}var e=this,f=0,g=b.from,h=setInterval(i,b.refreshInterval)})},a.fn.countTo.defaults={from:0,to:100,speed:1e3,refreshInterval:100,decimals:0,onUpdate:null,onComplete:null}}(jQuery);var portfolio_width;!function(a){"use strict";var b=a(window);a.fn.masonryParallax=function(c,d,e){function l(){j+k<$scroll||j>$scroll+$window_height||f.css("transform","translate3d(0px, "+Math.round((h-k-$scroll)*c+i)+"px, 0px)")}var g,h,f=a(this),i=0;h=f.offset().top,g=d?function(a){return a.outerHeight(!0)}:function(a){return a.height()},0!=e&&(i=e),(arguments.length<1||null===c)&&(c=.1),(arguments.length<2||null===d)&&(d=!0);var j=f.offset().top,k=g(f);b.bind("scroll",l).resize(l),l()}}(jQuery),function(a){var b=a(window),c=b.height();b.resize(function(){c=b.height()}),a.fn.parallax=function(d,e,f){function k(){var f=b.scrollTop();g.each(function(){var b=a(this),j=b.offset().top,k=h(b);j+kf+c||g.css("backgroundPosition",d+" "+Math.round((i-f)*e)+"px")})}var h,i,g=a(this);g.each(function(){i=g.offset().top}),h=f?function(a){return a.outerHeight(!0)}:function(a){return a.height()},(arguments.length<1||null===d)&&(d="50%"),(arguments.length<2||null===e)&&(e=.1),(arguments.length<3||null===f)&&(f=!0),b.bind("scroll",k).resize(k),k()}}(jQuery);var $scrollHeight,qodefPortfolioFullScreenSlider=function(){var a=$j(".qodef-full-screen-slider-holder"),b=$j(".wrapper .content"),c=$j(".qodef-portfolio-full-screen-slider"),d=function(){if(a.length){var d=(parseInt(b.css("margin-top")),$j(".page_header").height()),e=$j("body").hasClass("paspartu_enabled")?$window_width*paspartu_width*2:0;$window_width>1e3?$j("header").hasClass("regular")?a.css("height",$window_height-d-e):a.css("height",$window_height-e):a.css("height",$window_height-d-e)}},e=function(){a.length&&c.each(function(){var a=$j(this);a.owlCarousel({items:1,center:!0,loop:!0,margin:0,animateOut:"fadeOut",animateIn:"fadeIn",dots:!1,nav:!0,video:!0,navText:["",""]}).animate({opacity:1},600)})},f=function(){if(a.length){var b=$j(".qodef-portfolio-slider-content"),c=$j(".qodef-control.qodef-close"),d=$j(".qodef-description"),e=$j(".qodef-portfolio-slider-content-info");b.on("click",function(a){b.hasClass("opened")||(a.preventDefault(),d.fadeOut(400,function(){b.addClass("opened"),setTimeout(function(){e.fadeIn(400)},400),setTimeout(function(){$j(".qodef-portfolio-slider-content-info").niceScroll({scrollspeed:60,mousescrollstep:40,cursorwidth:0,cursorborder:0,cursorborderradius:0,cursorcolor:"transparent",autohidemode:!1,horizrailenabled:!1})},800)}))}),c.on("click",function(a){a.preventDefault(),a.stopPropagation(),e.fadeOut(400,function(){b.removeClass("opened"),setTimeout(function(){d.fadeIn(400)},400)})})}};return{init:function(){d(),e(),f(),$j(window).resize(function(){d()})}}},timeOuts=[],headerOffset=0,keys=[37,38,39,40]; var $j=jQuery.noConflict(); $j(document).ready(function(){ "use strict"; }); var addComment={moveForm:function(e,t,n,o){var r,i,d,m=this,l=m.I(e),a=m.I(n),c=m.I("cancel-comment-reply-link"),s=m.I("comment_parent"),e=m.I("comment_post_ID"),p=a.getElementsByTagName("form")[0];if(l&&a&&c&&s&&p){m.respondId=n,o=o||!1,m.I("wp-temp-form-div")||((m=document.createElement("div")).id="wp-temp-form-div",m.style.display="none",a.parentNode.insertBefore(m,a)),l.parentNode.insertBefore(a,l.nextSibling),e&&o&&(e.value=o),s.value=t,c.style.display="",c.onclick=function(){var e=addComment,t=e.I("wp-temp-form-div"),n=e.I(e.respondId);if(t&&n)return e.I("comment_parent").value="0",t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t),this.style.display="none",this.onclick=null,!1};try{for(var f=0;f=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)):(index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length,index=jQuery(this).parent().hasClass("wpb_next_slide")?length<=index+1?0:index+1:index-1<0?length-1:index-1,$tabs.tabs("option","active",index))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}});!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).on("click",function(e){e&&e.preventDefault&&e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var carousel_li,fluid_ul,$this=jQuery(this);!0!==$this.data("carousel_enabled")&&$this.is(":visible")&&($this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(carousel_li=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":carousel_li.css("margin-left"),"margin-left":0}),(fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(fluid_ul.width()+300),jQuery(window).on("resize",function(){screen_size!=(screen_size=getSizeName())&&window.setTimeout(function(){location.reload()},20)}))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,sliderTimeout,this_element=jQuery(this);this_element.hasClass("wpb_slider_nivo")?(0===(sliderTimeout=1e3*this_element.attr("data-interval"))&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})):this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1
          • ')}),vc_initVideoBackgrounds(),callSkrollInit=!1,window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSize,skrollrStart,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),($parallaxElement=$("
            ").addClass("vc_parallax-inner").appendTo($(this))).height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),(youtubeId=vcExtractYoutubeId(parallaxImage))?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrStart=-(skrollrSize-100),$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: 0%;")}),callSkrollInit&&window.skrollr&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();function getSizeName(){var screen_w=jQuery(window).width();return 1170
            ').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px"):(iframeH=(iframeW=containerW)*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px"),iframeW+="px",iframeH+="px",$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.on("click",function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.on("mouseleave",function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),perspective=4*$this.width()+"px";$this.css("perspective",perspective)})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=backHeight