jQuery(document).ready(function($){cart_improvement_functions();cart_dropdown_improvement();track_ajax_add_to_cart();if(jQuery.fn.avia_sc_slider) {jQuery(".shop_slider_yes ul").avia_sc_slider({appendControlls:false,group:true,slide:'.product',arrowControll:true,autorotationInterval:'parent'});} product_add_to_cart_click();jQuery(".quantity input[type=number]").each(function() {var number=$(this),newNum=jQuery(jQuery('
').append(number.clone(true)).html().replace('number','text')).insertAfter(number);number.remove();});setTimeout(first_load_amount,10);$('body').bind('added_to_cart',update_cart_dropdown);});function update_cart_dropdown(event) {var menu_cart=jQuery('.cart_dropdown'),empty=menu_cart.find('.empty'),msg_success=menu_cart.data('success'),product=jQuery.extend({name:"Product",price:"",image:""},avia_clicked_product);if(!empty.length) {menu_cart.addClass('visible_cart');} if(typeof event!='undefined') {var header=jQuery('.fixed_header #header_main .cart_dropdown_first'),oldTemplates=jQuery('.added_to_cart_notification').trigger('avia_hide'),template=jQuery("
\""+product.name+"\" "+msg_success+"
"+product.image+"
").css('opacity',0);if(!header.length)header='body';template.bind('mouseenter avia_hide',function() {template.animate({opacity:0,top:parseInt(template.css('top'),10)+15},function() {template.remove();});}).appendTo(header).animate({opacity:1},500);setTimeout(function(){template.trigger('avia_hide');},2500);}} var avia_clicked_product={};function track_ajax_add_to_cart() {jQuery('body').on('click','.add_to_cart_button',function() {var productContainer=jQuery(this).parents('.product').eq(0),product={};product.name=productContainer.find('.inner_product_header h3').text();product.image=productContainer.find('.thumbnail_container img');product.price=productContainer.find('.price .amount').last().text();if(product.image.length)product.image="";avia_clicked_product=product;});} function first_load_amount() {var counter=0,limit=15,ms=500,check=function() {var new_total=jQuery('.cart_dropdown .dropdown_widget_cart:eq(0) .total .amount');if(new_total.length) {update_cart_dropdown();} else {counter++;if(counter.images a').attr('rel','product_images[grouped]');} function cart_dropdown_improvement() {var dropdown=jQuery('.cart_dropdown'),subelement=dropdown.find('.dropdown_widget').css({display:'none',opacity:0});dropdown.hover(function(){subelement.css({display:'block'}).stop().animate({opacity:1});},function(){subelement.stop().animate({opacity:0},function(){subelement.css({display:'none'});});});};(function($) {"use strict";$(document).ready(function() {var aviabodyclasses=AviaBrowserDetection('html');$.avia_utilities=$.avia_utilities||{};if(aviabodyclasses.indexOf("avia-msie-7")==-1)avia_responsive_menu();avia_resize_menu();avia_header_size();avia_scroll_top_fade();new $.AviaTooltip({"class":'avia-search-tooltip',data:'avia-search-tooltip',event:'click',position:'bottom',scope:"body",attach:'element'});new $.AviaTooltip({"class":'avia-related-tooltip',data:'avia-related-tooltip',scope:".related_posts",attach:'element',delay:0});new $.AviaAjaxSearch({scope:'#header'});if($.fn.avia_iso_sort) $('.grid-sort-container').avia_iso_sort();if($.fn.aviaMegamenu) $(".main_menu .menu").aviaMegamenu({modify_position:true});$.avia_utilities.avia_ajax_call();});$.avia_utilities=$.avia_utilities||{};$.avia_utilities.avia_ajax_call=function(container) {if(typeof container=='undefined'){container='body';};$('a.avianolink').on('click',function(e){e.preventDefault();});$('a.aviablank').attr('target','_blank');$(container).avia_activate_lightbox({callback:'avia_lightbox_callback'});if($.fn.avia_scrollspy) {if(container=='body') {$('body').avia_scrollspy({target:'.main_menu .menu li > a'});} else {$('body').avia_scrollspy('refresh');}} if($.fn.avia_smoothscroll) $('a[href*=#]',container).avia_smoothscroll(container);avia_small_fixes(container);avia_hover_effect(container);avia_iframe_fix(container);if($.fn.avia_html5_activation&&$.fn.mediaelementplayer) $(".avia_video, .avia_audio",container).avia_html5_activation({ratio:'16:9'});} function AviaScrollSpy(element,options) {var self=this;var process=$.proxy(self.process,self),refresh=$.proxy(self.refresh,self),$element=$(element).is('body')?$(window):$(element),href self.$body=$('body') self.$win=$(window) self.options=$.extend({},$.fn.avia_scrollspy.defaults,options) self.selector=(self.options.target||((href=$(element).attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))||'') self.activation_true=false;if(self.$body.find(self.selector+"[href*=#]").length) {self.$scrollElement=$element.on('scroll.scroll-spy.data-api',process);self.$win.on('av-height-change',refresh);self.$body.on('av_resize_finished',refresh);self.activation_true=true;self.checkFirst();setTimeout(function() {self.refresh() self.process()},100);}} AviaScrollSpy.prototype={constructor:AviaScrollSpy,checkFirst:function(){var current=window.location.href.split('#')[0],matching_link=this.$body.find(this.selector+"[href='"+current+"']").attr('href',current+'#top');},refresh:function(){if(!this.activation_true)return;var self=this,$targets this.offsets=$([]) this.targets=$([]) $targets=this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data('target')||$el.attr('href'),$href=/^#\w/.test(this.hash)&&$(this.hash) return($href&&$href.length&&[[$href.position().top+(!$.isWindow(self.$scrollElement.get(0))&&self.$scrollElement.scrollTop()),href]])||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0]) self.targets.push(this[1])})},process:function(){if(!this.offsets)return;var scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,maxScroll=scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget,i if(scrollTop>=maxScroll){return activeTarget!=(i=targets.last()[0])&&this.activate(i)} for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||scrollTop<=offsets[i+1])&&this.activate(targets[i])}},activate:function(target){var active,selector this.activeTarget=target $(this.selector).parent('.'+this.options.applyClass).removeClass(this.options.applyClass) selector=this.selector +'[data-target="'+target+'"],' +this.selector+'[href="'+target+'"]' active=$(selector).parent('li').addClass(this.options.applyClass) if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass(this.options.applyClass)} active.trigger('activate')}} $.fn.avia_scrollspy=function(option){return this.each(function(){var $this=$(this),data=$this.data('scrollspy'),options=typeof option=='object'&&option if(!data)$this.data('scrollspy',(data=new AviaScrollSpy(this,options))) if(typeof option=='string')data[option]()})} $.fn.avia_scrollspy.Constructor=AviaScrollSpy $.fn.avia_scrollspy.defaults={offset:(parseInt($('.fixed_header #header').height(),10))+parseInt($('html').css('margin-top'),10),applyClass:'current-menu-item'} function AviaBrowserDetection(outputClassElement) {if(typeof($.browser)!=='undefined') {var bodyclass='';if($.browser.msie){bodyclass+='avia-msie';}else if($.browser.webkit){bodyclass+='avia-webkit';}else if($.browser.mozilla) {bodyclass+='avia-mozilla';} if($.browser.version)bodyclass+=' '+bodyclass+'-'+parseInt($.browser.version)+' ';if($.browser.ipad){bodyclass+=' avia-ipad ';}else if($.browser.iphone){bodyclass+=' avia-iphone ';}else if($.browser.android){bodyclass+=' avia-android ';}else if($.browser.win){bodyclass+=' avia-windows ';}else if($.browser.mac){bodyclass+=' avia-mac ';}else if($.browser.linux){bodyclass+=' avia-linux ';}} if(outputClassElement)$(outputClassElement).addClass(bodyclass) return bodyclass;} function avia_responsive_menu() {var win=$(window),header=$('.responsive #header');if(!header.length)return;var menu=header.find('.main_menu ul:eq(0)'),first_level_items=menu.find('>li').length,bottom_menu=$('html').is('.bottom_nav_header'),switchWidth=767;if(first_level_items>7+header.find('#menu-item-search').length&&!bottom_menu) {switchWidth=989;header.addClass('mobile_menu_tablet');} if(header.is('.mobile_drop_down')) {menu.mobileMenu({switchWidth:switchWidth,topOptionText:jQuery('.main_menu').data('selectname'),indentString:'ontouchstart'in document.documentElement?'- ':"   "});} else {var container=$('#wrap_all'),show_menu=$('#advanced_menu_toggle'),hide_menu=$('#advanced_menu_hide'),mobile_advanced=menu.clone().attr({id:"mobile-advanced","class":""}),menu_added=false;mobile_advanced.find('.noMobile').remove();jQuery(document).on('click','#mobile-advanced li a[href*=#]',function() {container.removeClass('show_mobile_menu');container.css({'height':"auto"});});show_menu.click(function() {if(container.is('.show_mobile_menu')) {container.removeClass('show_mobile_menu');container.css({'height':"auto"});} else {container.addClass('show_mobile_menu');set_height();} return false;});hide_menu.click(function() {container.removeClass('show_mobile_menu');container.css({'height':"auto"});return false;});var set_visibility=function() {if(win.width()>switchWidth) {header.removeClass('mobile_active');container.removeClass('show_mobile_menu');container.css({'height':"auto"});} else {header.addClass('mobile_active');if(!menu_added) {var after_menu=$('#header .logo');show_menu.insertAfter(after_menu);mobile_advanced.prependTo(container);hide_menu.prependTo(container);menu_added=true;} if(container.is('.show_mobile_menu')) {set_height();}}},set_height=function() {var height=mobile_advanced.css({position:'relative'}).outerHeight(true),win_h=win.height();if(heightli>a').each(function(index,value){original_item_padding_right[index]=parseInt($(this).css('padding-right').replace("px",""));original_item_padding_left[index]=parseInt($(this).css('padding-left').replace("px",""));}));$('#header .logo a img').load(function(){original_logo_width=logo.outerWidth(true);});},adjust_menu_width=function() {var headercontainer=header.find('.container'),header_width=headercontainer.innerWidth(),logo_width=logo.outerWidth(true),menu_width=$(menu).outerWidth(true),headercontainer_offset=headercontainer.offset(),logo_offset=logo.offset(),menu_offset=menu.offset();if(typeof logo_offset=="undefined"||typeof menu_offset=="undefined") {var offset_right=0,offset_left=0;} else if(logo_offset.leftli>a')),item_padding_right=new Array(),item_padding_left=new Array(),item_ratio=new Array(),item_ratio_left=new Array(),item_ratio_right=new Array(),reduction_space_left=0,reduction_space_right=0;$(menu_item.each(function(index,value){item_padding_right[index]=parseInt($(this).css('padding-right').replace("px",""));item_padding_left[index]=parseInt($(this).css('padding-left').replace("px",""));}));$.each(item_padding_right,function(index,value){reduction_space_right=reduction_space_right+value;});$.each(item_padding_left,function(index,value){reduction_space_left=reduction_space_left+value;});$(menu_item.each(function(index,value){item_ratio_left[index]=item_padding_left[index]/(item_padding_left[index]+item_padding_right[index]);item_ratio_right[index]=item_padding_right[index]/(item_padding_left[index]+item_padding_right[index]);item_ratio[index]=(item_padding_left[index]+item_padding_right[index])/(reduction_space_right+reduction_space_left);}));if(original_logo_width>0)logo_selector.css({'max-width':original_logo_width+'px','width':'auto'});if((original_menu_width+original_logo_width+offset_left+offset_right)<=header_width) {$(menu_item.each(function(index,value){$(this).css({"padding-right":original_item_padding_right[index]+"px","padding-left":original_item_padding_left[index]+"px"});}));} else {var total_padding=0,left_padding=0,right_padding=0,new_remaining_space=remaining_space+reduction_space_left+reduction_space_right;$(menu_item.each(function(index,value){total_padding=new_remaining_space*item_ratio[index];right_padding=total_padding*item_ratio_right[index];left_padding=total_padding*item_ratio_left[index];if(original_item_padding_right[index]0&&logo_width>original_logo_width)logo_width=original_logo_width;logo_selector.css({'max-width':logo_width+'px','width':'auto'});} else {logo_selector.css({'max-width':'none','width':'auto'});}}} else {logo_selector.css({'max-width':'none','width':'auto'});}},check_header_position_change=function() {if(header_position_changed>0&&!header.hasClass('header-scrolled')) {adjust_menu_width();header_position_changed=0;} else if(header_position_changed==0&&header.hasClass('header-scrolled')) {adjust_menu_width();header_position_changed=1;}} if(!($('body').hasClass('avia_deactivate_menu_resize'))) {store_menu_data();win.on("debouncedresize",adjust_menu_width);adjust_menu_width();var check_header_position_change=self.setInterval(check_header_position_change,500);}} $.fn.avia_html5_activation=function(options) {var defaults={ratio:'16:9'};var options=$.extend(defaults,options);this.each(function() {var fv=$(this),id_to_apply='#'+fv.attr('id'),posterImg=fv.attr('poster');fv.mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,audioWidth:400,audioHeight:30,startVolume:0.8,loop:false,enableAutosize:false,features:['playpause','progress','current','duration','tracks','volume'],alwaysShowControls:false,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,enableKeyboard:true,pauseOtherPlayers:true,poster:posterImg,success:function(mediaElement,domObject){setTimeout(function() {if(mediaElement.pluginType=='flash') {mediaElement.addEventListener('canplay',function(){fv.trigger('av-mediajs-loaded');},false);} else {fv.trigger('av-mediajs-loaded');} mediaElement.addEventListener('ended',function(){fv.trigger('av-mediajs-ended');},false);},10);},error:function(){},keyActions:[]});});} function avia_hover_effect(container) {if(container=='body') {var elements=$('#main a img').parents('a').not('.noLightbox, .noLightbox a, .avia-gallery-thumb a, .avia-layerslider a, .noHover, .noHover a').add('#main .avia-hover-fx');} else {var elements=$('a img',container).parents('a').not('.noLightbox, .noLightbox a, .avia-gallery-thumb a, .avia-layerslider a, .noHover, .noHover a').add('.avia-hover-fx',container);} var overlay="",isMobile='ontouchstart'in document.documentElement;if(isMobile)return;elements.each(function(e) {var link=$(this),current=link.find('img:first');if(current.hasClass('alignleft'))link.addClass('alignleft').css({float:'left',margin:0,padding:0});if(current.hasClass('alignright'))link.addClass('alignright').css({float:'right',margin:0,padding:0});if(current.hasClass('aligncenter'))link.addClass('aligncenter').css({float:'none','text-align':'center',margin:0,padding:0});if(current.hasClass('alignnone')) {link.addClass('alignnone').css({margin:0,padding:0});;if(!link.css('display')||link.css('display')=='inline'){link.css({display:'inline-block'});}} if(!link.css('position')||link.css('position')=='static'){link.css({position:'relative',overflow:'hidden'});}});elements.on('mouseenter',function(e) {var link=$(this),current=link.find('img:first'),url=link.attr('href'),span_class="overlay-type-video",opa=link.data('opacity')||0.7,overlay_offset=5;overlay=link.find('.image-overlay');if(!overlay.length) {if(current.outerHeight()>100) {if(link.height()==0){link.addClass(current.get(0).className);current.get(0).className="";} if(!link.css('display')||link.css('display')=='inline'){link.css({display:'block'});} if(url) {if(url.match(/(jpg|gif|jpeg|png|tif)/))span_class="overlay-type-image";if(!url.match(/(jpg|gif|jpeg|png|\.tif|\.mov|\.swf|vimeo\.com|youtube\.com)/))span_class="overlay-type-extern";} overlay=$("").appendTo(link);}} if(current.outerHeight()>100) {overlay.css({left:(current.position().left-overlay_offset)+parseInt(current.css("margin-left"),10),top:current.position().top+parseInt(current.css("margin-top"),10)}).css({overflow:'hidden',display:'block','height':current.outerHeight(),'width':(current.outerWidth()+(2*overlay_offset))}).stop().animate({opacity:opa},400);} else {overlay.css({display:"none"});}}).on('mouseleave',elements,function(){if(overlay.length) {overlay.stop().animate({opacity:0},400);}});} (function($) {$.fn.avia_smoothscroll=function(apply_to_container) {if(!this.length)return;var fixedMainPadding=parseInt($('.fixed_header #main').css('padding-top'),10)||0,non_shrinking=parseInt($('#header_meta').outerHeight(),10)||0;if(fixedMainPadding>0)fixedMainPadding=((fixedMainPadding-non_shrinking)/2)+non_shrinking;fixedMainPadding+=parseInt($('html').css('margin-top'),10);if(fixedMainPadding>0&&window.location.hash&&apply_to_container=='body'){var scroll_to_el=$(window.location.hash),the_win=$(window);if(scroll_to_el.length) {the_win.on('scroll.avia_first_scroll',function() {the_win.scrollTop(scroll_to_el.offset().top-fixedMainPadding).off('scroll.avia_first_scroll');});}} return this.each(function() {$(this).click(function(e){var newHash=this.hash,clicked=$(this),data=clicked.data();if(newHash!=''&&newHash!='#'&&newHash!='#prev'&&newHash!='#next'&&!$(this).is('.comment-reply-link, #cancel-comment-reply-link, .no-scroll')) {var container=$(this.hash);if(container.length) {var target=container.offset().top-fixedMainPadding,oldLocation=window.location.href.replace(window.location.hash,''),newLocation=this,duration=data.duration||1200,easing=data.easing||'easeInOutQuint';if(oldLocation+newHash==newLocation) {$('html:not(:animated),body:not(:animated)').animate({scrollTop:target},duration,easing,function(){if(window.history.replaceState) window.history.replaceState("","",newLocation);});e.preventDefault();}}}});});};})(jQuery);function avia_iframe_fix(container) {var iframe=jQuery('iframe[src*="youtube.com"]:not(.av_youtube_frame)',container),youtubeEmbed=jQuery('iframe[src*="youtube.com"]:not(.av_youtube_frame) object, iframe[src*="youtube.com"]:not(.av_youtube_frame) embed',container).attr('wmode','opaque');iframe.each(function() {var current=jQuery(this),src=current.attr('src');if(src) {if(src.indexOf('?')!==-1) {src+="&wmode=opaque";} else {src+="?wmode=opaque";} current.attr('src',src);}});} function avia_small_fixes(container) {if(!container)container=document;var win=jQuery(window),iframes=jQuery('.avia-iframe-wrap iframe:not(.avia-slideshow iframe):not( iframe.no_resize):not(.avia-video iframe)',container),adjust_iframes=function() {iframes.each(function(){var iframe=jQuery(this),parent=iframe.parent(),proportions=56.25;if(this.width&&this.height) {proportions=(100/this.width)*this.height;parent.css({"padding-bottom":proportions+"%"});}});};adjust_iframes();} (function($) {$.fn.avia_activate_lightbox=function(variables) {var defaults={autolinkElements:'a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href$=".mov"] , a[href$=".swf"] , a[href*="vimeo.com"] , a[href*="youtube.com/watch"] , a[href*="screenr.com"]'};var options=$.extend(defaults,variables),win=$(window),ww=parseInt(win.width(),10)*0.8,wh=(ww/16)*9;return this.each(function() {var elements=$(options.autolinkElements,this).not('.noLightbox, .noLightbox a, .fakeLightbox'),lastParent="",counter=0;elements.each(function() {var el=$(this),rel=el.data('rel'),parentPost=el.parents('.content:eq(0)'),group='auto_group';if(parentPost.get(0)!=lastParent) {lastParent=parentPost.get(0);counter++;} if(rel!=""&&typeof rel!='undefined') {el.attr('rel','lightbox['+rel+']');} if((el.attr('rel')==undefined||el.attr('rel')=='')&&!el.hasClass('noLightbox')) {if(elements.length>1) {el.attr('rel','lightbox['+group+counter+']');} else {el.attr('rel','lightbox');}}});if(options.callback)var callbackfn=window[options.callback];if(typeof(callbackfn)!=='undefined'&&typeof(callbackfn)==="function") {callbackfn(elements,ww,wh);} else {if($.fn.prettyPhoto) elements.prettyPhoto({social_tools:'',slideshow:5000,deeplinking:false,overlay_gallery:false,default_width:ww,default_height:wh});}});};})(jQuery);(function($) {$.fn.aviaMegamenu=function(variables) {var defaults={modify_position:true,delay:300};var options=$.extend(defaults,variables);return this.each(function() {var left_menu=$('html:first').is('.bottom_nav_header'),isMobile='ontouchstart'in document.documentElement,menu=$(this),menuItems=menu.find(">li"),megaItems=menuItems.find(">div").parent().css({overflow:'hidden'}),menuActive=menu.find('>.current-menu-item>a, >.current_page_item>a'),dropdownItems=menuItems.find(">ul").parent(),parentContainer=menu.parent(),mainMenuParent=menu.parents('.main_menu').eq(0),parentContainerWidth=parentContainer.width(),delayCheck={},mega_open=[];if(!menuActive.length){menu.find('.current-menu-ancestor:eq(0) a:eq(0), .current_page_ancestor:eq(0) a:eq(0)').parent().addClass('active-parent-item')} menuItems.on('click','a',function() {if(this.href==window.location.href+"#"||this.href==window.location.href+"/#") return false;});menuItems.each(function() {var item=$(this),pos=item.position(),megaDiv=item.find("div:first").css({opacity:0,display:"none"}),normalDropdown="";if(!megaDiv.length) {normalDropdown=item.find(">ul").css({display:"none"});} if(megaDiv.length||normalDropdown.length) {var link=item.addClass('dropdown_ul_available').find('>a');link.append('');if(typeof link.attr('href')!='string'||link.attr('href')=="#"){link.css('cursor','default').click(function(){return false;});}} if(options.modify_position&&megaDiv.length) {if(!left_menu) {if(pos.left+megaDiv.width()parentContainerWidth) {megaDiv.css({right:-mainMenuParent.outerWidth()+(pos.left+item.outerWidth())});}} else {if(megaDiv.width()>pos.left+item.outerWidth()) {megaDiv.css({left:(pos.left*-1)});} else if(pos.left+megaDiv.width()>parentContainerWidth) {megaDiv.css({left:(megaDiv.width()-pos.left)*-1});}}}});function megaDivShow(i) {if(delayCheck[i]==true) {var item=megaItems.filter(':eq('+i+')').css({overflow:'visible'}).find("div:first"),link=megaItems.filter(':eq('+i+')').find("a:first");mega_open["check"+i]=true;item.stop().css('display','block').animate({opacity:1},300);if(item.length) {link.addClass('open-mega-a');}}} function megaDivHide(i) {if(delayCheck[i]==false) {megaItems.filter(':eq('+i+')').find(">a").removeClass('open-mega-a');var listItem=megaItems.filter(':eq('+i+')'),item=listItem.find("div:first");item.stop().css('display','block').animate({opacity:0},300,function() {$(this).css('display','none');listItem.css({overflow:'hidden'});mega_open["check"+i]=false;});}} if(isMobile) {megaItems.each(function(i){$(this).bind('click',function() {if(mega_open["check"+i]!=true)return false;});});} megaItems.each(function(i){$(this).hover(function() {delayCheck[i]=true;setTimeout(function(){megaDivShow(i);},options.delay);},function() {delayCheck[i]=false;setTimeout(function(){megaDivHide(i);},options.delay);});});dropdownItems.find('li').andSelf().each(function() {var currentItem=$(this),sublist=currentItem.find('ul:first'),showList=false;if(sublist.length) {sublist.css({display:'block',opacity:0,visibility:'hidden'});var currentLink=currentItem.find('>a');currentLink.bind('mouseenter',function() {sublist.stop().css({visibility:'visible'}).animate({opacity:1});});currentItem.bind('mouseleave',function() {sublist.stop().animate({opacity:0},function() {sublist.css({visibility:'hidden'});});});}});});};})(jQuery);$.fn.avia_iso_sort=function(options) {$.extend($.Isotope.prototype,{_customModeReset:function(){this.fitRows={x:0,y:0,height:0};},_customModeLayout:function($elems){var instance=this,containerWidth=this.element.width(),props=this.fitRows,percentBase=this.element.data('margin_base')||6,margin=this.element.is('.no_margin-container')?0:(containerWidth/100)*percentBase,extraRange=2;$elems.each(function(){var $this=$(this),atomW=$this.outerWidth(),atomH=$this.outerHeight(true);if(props.x!==0&&atomW+props.x>containerWidth+extraRange){props.x=0;props.y=props.height;} props.x=Math.round(props.x);props.y=Math.round(props.y);instance._pushPosition($this,props.x,props.y);props.height=Math.max(props.y+atomH,props.height);props.x+=atomW+margin;});},_customModeGetContainerSize:function(){return{height:this.fitRows.height};},_customModeResizeChanged:function(){return true;}});return this.each(function() {var the_body=$('body'),container=$(this),portfolio_id=container.data('portfolio-id'),parentContainer=container.parents('.entry-content-wrapper'),filter=parentContainer.find('.sort_width_container[data-portfolio-id="'+portfolio_id+'"]').find('#js_sort_items').css({visibility:"visible",opacity:0}),links=filter.find('a'),imgParent=container.find('.grid-image'),isoActive=false,items=$('.post-entry',container);function applyIso() {container.addClass('isotope_activated').isotope({layoutMode:'customMode',itemSelector:'.flex_column'},function() {container.css({overflow:'visible'});the_body.trigger('av_resize_finished');});isoActive=true;setTimeout(function(){parentContainer.addClass('avia_sortable_active');},0);};links.bind('click',function() {var current=$(this),selector=current.data('filter');links.removeClass('active_sort');current.addClass('active_sort');container.attr('id','grid_id_'+selector);parentContainer.find('.open_container .ajax_controlls .avia_close').trigger('click');container.isotope({layoutMode:'customMode',itemSelector:'.flex_column',filter:'.'+selector},function() {container.css({overflow:'visible'});the_body.trigger('av_resize_finished');});return false;});$(window).smartresize(function() {applyIso();});$.avia_utilities.preload({container:container,single_callback:function() {filter.animate({opacity:1},400);applyIso();setTimeout(function(){applyIso();});imgParent.css({height:'auto'}).each(function(i) {var currentLink=$(this);setTimeout(function() {currentLink.animate({opacity:1},1500);},(100*i));});}});});};function avia_header_size() {var win=$(window),header=$('.fixed_header #header'),logo=$('#header_main .container .logo img, #header_main .container .logo a'),elements=$('#header_main .container, .main_menu ul:first-child > li > a:not(.avia_mega_div a)'),el_height=$(elements).filter(':first').height(),isMobile='ontouchstart'in document.documentElement,scroll_top=$('#scroll-top-link'),set_height=function() {var st=win.scrollTop(),newH=0;if(st=this.options.minChars&&this.lastVal!=$.trim(e.currentTarget.value)) {this.timer=setTimeout($.proxy(this.do_search,this,e),this.options.delay);}},do_search:function(e) {var obj=this,currentField=$(e.currentTarget).attr("autocomplete","off"),form=currentField.parents('form:eq(0)'),results=form.find('.ajax_search_response'),loading=$('
'),action=form.attr('action'),values=form.serialize();values+='&action=avia_ajax_search';if(action.indexOf('?')!=-1) {action=action.split('?');values+="&"+action[1];} if(!results.length)results=$('
').appendTo(form);if(results.find('.ajax_not_found').length&&e.currentTarget.value.indexOf(this.lastVal)!=-1)return;this.lastVal=e.currentTarget.value;$.ajax({url:avia_framework_globals.ajaxurl,type:"POST",data:values,beforeSend:function() {loading.insertAfter(currentField);},success:function(response) {if(response==0)response="";results.html(response);},complete:function() {loading.remove();}});}} $.AviaTooltip=function(options) {var defaults={delay:1500,delayOut:300,"class":"avia-tooltip",scope:"body",data:"avia-tooltip",attach:"body",event:'mouseenter',position:'top'} this.options=$.extend({},defaults,options);this.body=$('body');this.scope=$(this.options.scope);this.tooltip=$('
');this.inner=$('
').prependTo(this.tooltip);this.open=false;this.timer=false;this.active=false;this.bind_events();} $.AviaTooltip.openTTs=[];$.AviaTooltip.prototype={bind_events:function() {this.scope.on(this.options.event+' mouseleave','[data-'+this.options.data+']',$.proxy(this.start_countdown,this));if(this.options.event!='click') {this.scope.on('mouseleave','[data-'+this.options.data+']',$.proxy(this.hide_tooltip,this));} else {this.body.on('mousedown',$.proxy(this.hide_tooltip,this));}},start_countdown:function(e) {clearTimeout(this.timer);if(e.type==this.options.event) {var delay=this.options.event=='click'?0:this.open?0:this.options.delay;this.timer=setTimeout($.proxy(this.display_tooltip,this,e),delay);} else if(e.type=='mouseleave') {this.timer=setTimeout($.proxy(this.stop_instant_open,this,e),this.options.delayOut);} e.preventDefault();},reset_countdown:function(e) {clearTimeout(this.timer);this.timer=false;},display_tooltip:function(e) {var element=$(e.currentTarget),text=element.data(this.options.data),newTip=element.data('avia-created-tooltip'),attach=this.options.attach=='element'?element:this.body,offset=this.options.attach=='element'?element.position():element.offset();this.inner.html(text);newTip=typeof newTip!='undefined'?$.AviaTooltip.openTTs[newTip]:this.options.attach=='element'?this.tooltip.clone().insertAfter(attach):this.tooltip.clone().appendTo(attach);this.open=true;this.active=newTip;if((newTip.is(':animated:visible')&&e.type=='click')||element.is('.'+this.options['class'])||element.parents('.'+this.options['class']).length!=0)return;var real_top=offset.top-newTip.outerHeight(),real_left=(offset.left+(element.outerWidth()/2))-(newTip.outerWidth()/2);if(this.options.position=='bottom') {real_top=offset.top+element.outerHeight();} newTip.css({opacity:0,display:'block',top:real_top-10,left:real_left}).stop().animate({top:real_top,opacity:1},200);newTip.find('input, textarea').focus();$.AviaTooltip.openTTs.push(newTip);element.data('avia-created-tooltip',$.AviaTooltip.openTTs.length-1);},hide_tooltip:function(e) {var element=$(e.currentTarget),newTip,animateTo;if(this.options.event=='click') {element=$(e.target);if(!element.is('.'+this.options['class'])&&element.parents('.'+this.options['class']).length==0) {if(this.active.length){newTip=this.active;this.active=false;}}} else {newTip=element.data('avia-created-tooltip');newTip=typeof newTip!='undefined'?$.AviaTooltip.openTTs[newTip]:false;} if(newTip) {animateTo=parseInt(newTip.css('top'),10)-10;newTip.animate({top:animateTo,opacity:0},200,function() {newTip.css({display:'none'});});}},stop_instant_open:function(e) {this.open=false;}}})(jQuery);(function($){var menuCount=0;$.fn.mobileMenu=function(options){var settings={switchWidth:768,topOptionText:'Select a page',indentString:'   '};function isList($this){return $this.is('ul, ol');} function isMobile(){var header=$('.responsive #header');if($(window).width()0);} else{menuCount++;$this.attr('id','mm'+menuCount);return($('#mobileMenu_mm'+menuCount).length>0);}} function goToPage($this){if($this.val()!==null){document.location.href=$this.val()}} function showMenu($this){$this.css('display','none');$('#mobileMenu_'+$this.attr('id')).show();} function hideMenu($this){$this.css('display','');$('#mobileMenu_'+$this.attr('id')).hide();} function createMenu($this){if(isList($this)){var selectString='';$this.parent().append(selectString);$('#mobileMenu_'+$this.attr('id')).change(function(){goToPage($(this));});showMenu($this);}else{alert('mobileMenu will only work with UL or OL elements!');}} function run($this){if(isMobile()&&!menuExists($this)){createMenu($this);} else if(isMobile()&&menuExists($this)){showMenu($this);} else if(!isMobile()&&menuExists($this)){hideMenu($this);}} return this.each(function(){if(options){$.extend(settings,options);} var $this=$(this);$(window).resize(function(){run($this);});run($this);});};})(jQuery);(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e"+d+"{#modernizr{height:3px}}"+"").appendTo("head"),f=b('
').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;fg?1:f0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;id&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;id&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery);(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);!function(a,b){"use strict";var c,d;if(a.uaMatch=function(a){a=a.toLowerCase();var b=/(opr)[\/]([\w.]+)/.exec(a)||/(chrome)[ \/]([\w.]+)/.exec(a)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],c=/(ipad)/.exec(a)||/(iphone)/.exec(a)||/(android)/.exec(a)||/(windows phone)/.exec(a)||/(win)/.exec(a)||/(mac)/.exec(a)||/(linux)/.exec(a)||[];return{browser:b[3]||b[1]||"",version:b[2]||"0",platform:c[0]||""}},c=a.uaMatch(b.navigator.userAgent),d={},c.browser&&(d[c.browser]=!0,d.version=c.version,d.versionNumber=parseInt(c.version)),c.platform&&(d[c.platform]=!0),(d.chrome||d.opr||d.safari)&&(d.webkit=!0),d.rv){var e="msie";c.browser=e,d[e]=!0}if(d.opr){var f="opera";c.browser=f,d[f]=!0}if(d.safari&&d.android){var g="android";c.browser=g,d[g]=!0}d.name=c.browser,d.platform=c.platform,a.browser=d}(jQuery,window);var Froogaloop=function(){function e(a){return new e.fn.init(a)}function h(a,c,b){if(!b.contentWindow.postMessage)return!1;var f=b.getAttribute("src").split("?")[0],a=JSON.stringify({method:a,value:c});"//"===f.substr(0,2)&&(f=window.location.protocol+f);b.contentWindow.postMessage(a,f)}function j(a){var c,b;try{c=JSON.parse(a.data),b=c.event||c.method}catch(f){}"ready"==b&&!i&&(i=!0);if(a.origin!=k)return!1;var a=c.value,e=c.data,g=""===g?null:c.player_id;c=g?d[g][b]:d[b];b=[];if(!c)return!1;void 0!==a&&b.push(a);e&&b.push(e);g&&b.push(g);return 0b)c+=a[b];else break;2>b&&(c+="http://www.kriesi.at/")}k=c;return this},api:function(a,c){if(!this.element||!a)return!1;var b=this.element,f=""!==b.id?b.id:null,d=!c||!c.constructor||!c.call||!c.apply?c:null,e=c&&c.constructor&&c.call&&c.apply?c:null;e&&l(a,e,f);h(a,d,b);return this},addEvent:function(a,c){if(!this.element)return!1;var b=this.element,d=""!==b.id?b.id:null;l(a,c,d);"ready"!=a?h("addEventListener",a,b):"ready"==a&&i&&c.call(null,d);return this},removeEvent:function(a){if(!this.element)return!1;var c=this.element,b;a:{if((b=""!==c.id?c.id:null)&&d[b]){if(!d[b][a]){b=!1;break a}d[b][a]=null}else{if(!d[a]){b=!1;break a}d[a]=null}b=!0}"ready"!=a&&b&&h("removeEventListener",a,c)}};e.fn.init.prototype=e.fn;window.addEventListener?window.addEventListener("message",j,!1):window.attachEvent("onmessage",j);return window.Froogaloop=window.$f=e}();(function(){var lastTime=0;var vendors=['ms','moz','webkit','o'];for(var x=0;xdata.items) {new_items=new_items.not(':last');} else {current.addClass('av-masonry-no-more-items');} var load_container=$('
').append(new_items);$.avia_utilities.preload({container:load_container,single_callback:function() {var links=masonry.find('.av-masonry-sort a'),filter_container=masonry.find('.av-sort-by-term');filter_container.hide();loader.hide();container.isotope('insert',new_items);$.avia_utilities.avia_ajax_call(container);setTimeout(function(){methods.show_bricks(new_items,finished);},150);if(links) {$(links).each(function(filterlinkindex){var filterlink=$(this),sort=filterlink.data('filter');if(new_items) {$(new_items).each(function(itemindex){var item=$(this);if(item.hasClass(sort)) {var term_count=filterlink.find('.avia-term-count').text();filterlink.find('.avia-term-count').text(' '+(parseInt(term_count)+1)+' ');if(filterlink.hasClass('avia_hide_sort')) {filterlink.removeClass('avia_hide_sort').addClass('avia_show_sort');masonry.find('.av-masonry-sort .'+sort+'_sep').removeClass('avia_hide_sort').addClass('avia_show_sort');masonry.find('.av-masonry-sort .av-sort-by-term').removeClass('hidden');}}});}});} filter_container.fadeIn();}});} else {finished();}},error:finished,complete:function() {}});}};return this.each(function() {var masonry=$(this),container=masonry.find('.av-masonry-container'),bricks=masonry.find('.isotope-item'),filter=masonry.find('.av-masonry-sort').css({visibility:"visible",opacity:0}).on('click','a',methods.masonry_filter),load_more=masonry.find('.av-masonry-load-more').css({visibility:"visible",opacity:0});$.avia_utilities.preload({container:container,single_callback:function() {var start_animation=function() {filter.animate({opacity:1},400);if(container.outerHeight()+container.offset().top+$('#footer').outerHeight()>$(window).height()) {$('html').css({'overflow-y':'scroll'});} methods.applyMasonry(container,false,function() {masonry.addClass('avia_sortable_active');container.removeClass('av-js-disabled ');});methods.show_bricks(bricks,function() {load_more.css({opacity:1}).on('click',methods.loadMore);});};if(isMobile) {start_animation();} else {masonry.waypoint(start_animation,{offset:'80%'});} $(window).smartresize(function() {methods.applyMasonry(container);});}});});};(function($) {"use strict";$.avia_utilities=$.avia_utilities||{};$.fn.avia_portfolio_preview=function(passed_options) {var win=$(window),the_body=$('body'),isMobile=document.documentElement.ontouchstart!==undefined?true:false,defaults={open_in:'.portfolio-details-inner',easing:'easeOutQuint',timing:800,transition:'slide'},options=$.extend({},defaults,passed_options);return this.each(function() {var container=$(this),portfolio_id=container.data('portfolio-id'),target_wrap=$('.portfolio_preview_container[data-portfolio-id="'+portfolio_id+'"]'),target_container=target_wrap.find(options.open_in),items=container.find('.grid-entry'),content_retrieved={},is_open=false,animating=false,index_open=false,ajax_call=false,methods,controls,loader=$.avia_utilities.loading();methods={load_item:function(e) {e.preventDefault();var link=$(this),post_container=link.parents('.post-entry:eq(0)'),post_id="ID_"+post_container.data('ajax-id'),clickedIndex=items.index(post_container);if(post_id===is_open||animating==true) {return false;} animating=true;container.find('.active_portfolio_item').removeClass('active_portfolio_item');post_container.addClass('active_portfolio_item');loader.show();methods.ajax_get_contents(post_id,clickedIndex);},scroll_top:function() {setTimeout(function() {var target_offset=target_wrap.offset().top-175,window_offset=win.scrollTop();if(window_offset>target_offset||target_offset-window_offset>100) {$('html:not(:animated),body:not(:animated)').animate({scrollTop:target_offset},options.timing,options.easing);}},10);},attach_item:function(post_id) {content_retrieved[post_id]=$(content_retrieved[post_id]).appendTo(target_container);ajax_call=true;},remove_video:function() {var del=target_wrap.find('iframe, .avia-video').parents('.ajax_slide:not(.open_slide)');if(del.length>0) {del.remove();content_retrieved["ID_"+del.data('slideId')]=undefined;}},show_item:function(post_id,clickedIndex) {if(post_id===is_open) {return false;} animating=true;loader.hide();if(false===is_open) {target_wrap.addClass('open_container');content_retrieved[post_id].addClass('open_slide');methods.scroll_top();target_wrap.css({display:'none'}).slideDown(options.timing,options.easing,function() {if(ajax_call) {activate_shortcode_scripts(content_retrieved[post_id]);$.avia_utilities.avia_ajax_call(content_retrieved[post_id]);the_body.trigger('av_resize_finished');ajax_call=false;} methods.remove_video();});index_open=clickedIndex;is_open=post_id;animating=false;} else {methods.scroll_top();var initCSS={zIndex:3},easing=options.easing;if(index_open>clickedIndex){initCSS.left='-110%';} if(options.transition==='fade'){initCSS.left='0%';initCSS.opacity=0;easing='easeOutQuad';} target_container.height(target_container.height());content_retrieved[post_id].css(initCSS).avia_animate({'left':"0%",opacity:1},options.timing,easing);content_retrieved[is_open].avia_animate({opacity:0},options.timing,easing,function() {content_retrieved[is_open].attr({'style':""}).removeClass('open_slide');content_retrieved[post_id].addClass('open_slide');target_container.avia_animate({height:content_retrieved[post_id].outerHeight()+2},options.timing/2,options.easing,function() {target_container.attr({'style':""});is_open=post_id;index_open=clickedIndex;animating=false;methods.remove_video();if(ajax_call) {the_body.trigger('av_resize_finished');activate_shortcode_scripts(content_retrieved[post_id]);$.avia_utilities.avia_ajax_call(content_retrieved[post_id]);ajax_call=false;}});});}},ajax_get_contents:function(post_id,clickedIndex) {if(content_retrieved[post_id]!==undefined) {methods.show_item(post_id,clickedIndex);return;} content_retrieved[post_id]=$('#avia-tmpl-portfolio-preview-'+post_id.replace(/ID_/,"")).html();content_retrieved[post_id]=content_retrieved[post_id].replace('/*','');methods.attach_item(post_id);$.avia_utilities.preload({container:content_retrieved[post_id],single_callback:function(){methods.show_item(post_id,clickedIndex);}});},add_controls:function() {controls=target_wrap.find('.ajax_controlls');target_wrap.avia_keyboard_controls({27:'.avia_close',37:'.ajax_previous',39:'.ajax_next'});items.each(function(){var current=$(this),overlay;current.addClass('no_combo').bind('click',function(event) {overlay=current.find('.slideshow_overlay');if(overlay.length) {event.stopPropagation();methods.load_item.apply(current.find('a:eq(0)'));return false;}});});},control_click:function() {var showItem,activeID=container.find('.active_portfolio_item').data('ajax-id'),active=container.find('.post-entry-'+activeID);switch(this.hash) {case'#next':showItem=active.nextAll('.post-entry:not(.isotope-hidden):eq(0)').find('a:eq(0)');if(!showItem.length){showItem=$('.post-entry:not(.isotope-hidden):eq(0)',container).find('a:eq(0)');} showItem.trigger('click');break;case'#prev':showItem=active.prevAll('.post-entry:not(.isotope-hidden):eq(0)').find('a:eq(0)');if(!showItem.length){showItem=$('.post-entry:not(.isotope-hidden):last',container).find('a:eq(0)');} showItem.trigger('click');break;case'#close':animating=true;target_wrap.slideUp(options.timing,options.easing,function() {container.find('.active_portfolio_item').removeClass('active_portfolio_item');content_retrieved[is_open].attr({'style':""}).removeClass('open_slide');target_wrap.removeClass('open_container');animating=is_open=index_open=false;methods.remove_video();the_body.trigger('av_resize_finished');});break;} return false;},resize_reset:function() {if(is_open===false) {target_container.html('');content_retrieved=[];}}};methods.add_controls();container.on("click","a",methods.load_item);controls.on("click","a",methods.control_click);if(jQuery.support.leadingWhitespace){win.bind('smartresize',methods.resize_reset);}});};}(jQuery));$.AviaFullscreenSlider=function(options,slider) {this.$slider=$(slider);this.$inner=this.$slider.find('.avia-slideshow-inner');this.$caption=this.$inner.find('.avia-slide-wrap .caption_container');this.$win=$(window);this.isMobile='ontouchstart'in document.documentElement;this.property={};this.scrollPos="0";this.transform3d=document.documentElement.className.indexOf('csstransforms3d')!==-1?true:false;if($.avia_utilities.supported.transition===undefined) {$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');} this._init(options);} $.AviaFullscreenSlider.defaults={height:100,subtract:'#wpadminbar, #header, #main>.title_container'};$.AviaFullscreenSlider.prototype={_init:function(options) {var _self=this;this.options=$.extend(true,{},$.AviaFullscreenSlider.defaults,options);if(this.$slider.data('slide_height'))this.options.height=this.$slider.data('slide_height');this.$subtract=$(this.options.subtract);this._setSize();this.$win.on('debouncedresize',$.proxy(this._setSize,this));setTimeout(function() {if(!_self.isMobile) _self.$win.on('scroll',function(){window.requestAnimationFrame($.proxy(_self._parallax_scroll,_self))});},100);this.$slider.aviaSlider({bg_slider:true});},_fetch_properties:function(slide_height) {this.property.offset=this.$slider.offset().top;this.property.wh=this.$win.height();this.property.height=slide_height||this.$slider.outerHeight();this._parallax_scroll();},_setSize:function() {var viewport=this.$win.height(),slide_height=Math.ceil((viewport/100)*this.options.height);if(this.$subtract.length&&this.options.height==100) {this.$subtract.each(function() {slide_height-=this.offsetHeight-0.5;});} else {slide_height-=1;} this.$slider.height(slide_height);this.$inner.css('padding',0);this._fetch_properties(slide_height);},_parallax_scroll:function(e) {if(this.isMobile)return;var winTop=this.$win.scrollTop(),winBottom=winTop+this.property.wh,scrollPos="0",prop={},prop2={};if(this.property.offsetdiv:first'),timeout=false,counter=0,reset_size=function() {if(first_div.height()>0||counter>5) {container.height('auto');} else {timeout=setTimeout(reset_size,500);counter++;}};if(!first_div.length)return;timeout=setTimeout(reset_size,0);});} $.fn.avia_sc_testimonial=function(options) {return this.each(function() {var container=$(this),elements=container.find('.avia-testimonial');container.on('avia_start_animation',function() {elements.each(function(i) {var element=$(this);setTimeout(function(){element.addClass('avia_start_animation')},(i*150));});});});} $.fn.avia_sc_progressbar=function(options) {return this.each(function() {var container=$(this),elements=container.find('.progress');container.on('avia_start_animation',function() {elements.each(function(i) {var element=$(this);setTimeout(function(){element.addClass('avia_start_animation')},(i*250));});});});} $.fn.avia_sc_iconlist=function(options) {return this.each(function() {var iconlist=$(this),elements=iconlist.find('>li');iconlist.on('avia_start_animation',function() {elements.each(function(i) {var element=$(this);setTimeout(function(){element.addClass('avia_start_animation')},(i*350));});});});} $.fn.avia_sc_animation_delayed=function(options) {var global_timer=0,delay=options.delay|| 50;return this.each(function() {var elements=$(this);elements.on('avia_start_animation',function() {var element=$(this);global_timer++;setTimeout(function(){element.addClass('avia_start_delayed_animation');global_timer--;},(global_timer*delay));});});} $.fn.avia_browser_height=function() {if(!this.length)return;var win=$(window),html_el=$('html'),subtract=$('#wpadminbar, #header, #main>.title_container'),css_block=$("").appendTo('head:first'),calc_height=function() {var css="",wh100=win.height(),ww100=win.width(),wh100_mod=wh100,whCover=(wh100/9)*16,wwCover=(ww100/16)*9,wh75=Math.round(wh100*0.75),wh50=Math.round(wh100*0.5),wh25=Math.round(wh100*0.25);subtract.each(function(){wh100_mod-=this.offsetHeight-1;});var whCoverMod=(wh100_mod/9)*16;css+=".avia-section.av-minimum-height .container{opacity: 1; }\n";css+=".av-minimum-height-100 .container {height:"+wh100+"px;}\n";css+=".av-minimum-height-75 .container {height:"+wh75+"px;}\n";css+=".av-minimum-height-50 .container {height:"+wh50+"px;}\n";css+=".av-minimum-height-25 .container {height:"+wh25+"px;}\n";css+=".avia-builder-el-0.av-minimum-height-100 .container{height:"+wh100_mod+"px;}\n";if(ww100/wh100<16/9) {css+="#top .av-element-cover iframe, #top .av-element-cover embed, #top .av-element-cover object, #top .av-element-cover video{width:"+whCover+"px; left: -"+(whCover-ww100)/2+"px;}\n";} else {css+="#top .av-element-cover iframe, #top .av-element-cover embed, #top .av-element-cover object, #top .av-element-cover video{height:"+wwCover+"px; top: -"+(wwCover-wh100)/2+"px;}\n";} if(ww100/wh100_mod<16/9) {css+="#top .avia-builder-el-0 .av-element-cover iframe, #top .avia-builder-el-0 .av-element-cover embed, #top .avia-builder-el-0 .av-element-cover object, #top .avia-builder-el-0 .av-element-cover video{width:"+whCoverMod+"px; left: -"+(whCoverMod-ww100)/2+"px;}\n";} else {css+="#top .avia-builder-el-0 .av-element-cover iframe, #top .avia-builder-el-0 .av-element-cover embed, #top .avia-builder-el-0 .av-element-cover object, #top .avia-builder-el-0 .av-element-cover video{height:"+wwCover+"px; top: -"+(wwCover-wh100_mod)/2+"px;}\n";} css_block.text(css);setTimeout(function(){win.trigger('av-height-change');},100);};win.smartresize(calc_height);calc_height();} $.fn.avia_video_section=function() {if(!this.length)return;var win=$(window),css_block=$("").appendTo('head:first'),calc_height=function(section,counter) {if(counter===0)css_block.text("");var css="",the_id='#'+section.attr('id'),wh100=section.height(),ww100=section.width(),aspect=section.data('sectionVideoRatio').split(':'),video_w=aspect[0],video_h=aspect[1],whCover=(wh100/video_h)*video_w,wwCover=(ww100/video_w)*video_h;if(ww100/wh100el_offset) {$('html:not(:animated),body:not(:animated)').animate({scrollTop:scoll_target},200);}} if(content.css('visibility')!="hidden") {thisheading.addClass('activeTitle');} thisheading.on('click',function() {if(content.css('visibility')!="hidden") {content.slideUp(200,function() {content.removeClass('active_tc').attr({style:''});});thisheading.removeClass('activeTitle');} else {if(container.is('.toggle_close_all')) {allContent.not(content).slideUp(200,function() {$(this).removeClass('active_tc').attr({style:''});scroll_to_viewport();});heading.removeClass('activeTitle');} content.addClass('active_tc').slideDown(200,function() {if(!container.is('.toggle_close_all')) {scroll_to_viewport();}});thisheading.addClass('activeTitle');location.replace(thisheading.data('fake-id'));}});});sortLinks.click(function(e){e.preventDefault();var show=toggles.filter('[data-tags~="'+$(this).data('tag')+'"]'),hide=toggles.not('[data-tags~="'+$(this).data('tag')+'"]');sortLinks.removeClass('activeFilter');$(this).addClass('activeFilter');heading.filter('.activeTitle').trigger('click');show.slideDown();hide.slideUp();});function trigger_default_open(hash) {if(!hash&&window.location.hash)hash=window.location.hash;if(!hash)return;var open=heading.filter('[data-fake-id="'+hash+'"]');if(open.length) {if(!open.is('.activeTitle'))open.trigger('click');window.scrollTo(0,container.offset().top-70);}} trigger_default_open(false);$('a').on('click',function(){var hash=$(this).attr('href').replace(/^.*?#/,'');if(hash)trigger_default_open('#'+hash);});});};$.fn.avia_sc_tabs=function(options) {var defaults={heading:'.tab',content:'.tab_content',active:'active_tab',sidebar:false};var win=$(window) options=$.extend(defaults,options);return this.each(function() {var container=$(this),tab_titles=$('
').prependTo(container),tabs=$(options.heading,container),content=$(options.content,container),newtabs=false,oldtabs=false;newtabs=tabs.clone();oldtabs=tabs.addClass('fullsize-tab');tabs=newtabs;tabs.prependTo(tab_titles).each(function(i) {var tab=$(this),the_oldtab=false;if(newtabs)the_oldtab=oldtabs.filter(':eq('+i+')');tab.addClass('tab_counter_'+i).bind('click',function() {open_content(tab,i,the_oldtab);return false;});if(newtabs) {the_oldtab.bind('click',function() {open_content(the_oldtab,i,tab);return false;});}});set_size();trigger_default_open(false);win.on("debouncedresize",set_size);$('a').on('click',function(){var hash=$(this).attr('href').replace(/^.*?#/,'');if(hash)trigger_default_open('#'+hash);});function set_size() {if(!options.sidebar)return;content.css({'min-height':tab_titles.outerHeight()+1});} function open_content(tab,i,alternate_tab) {if(!tab.is('.'+options.active)) {$('.'+options.active,container).removeClass(options.active);$('.'+options.active+'_content',container).removeClass(options.active+'_content');tab.addClass(options.active);var new_loc=tab.data('fake-id');if(typeof new_loc=='string')location.replace(new_loc);if(alternate_tab)alternate_tab.addClass(options.active);var active_c=content.filter(':eq('+i+')').addClass(options.active+'_content');if(typeof click_container!='undefined'&&click_container.length) {sidebar_shadow.height(active_c.outerHeight());} var el_offset=active_c.offset().top,scoll_target=el_offset-50-parseInt($('html').css('margin-top'),10);if(win.scrollTop()>el_offset) {$('html:not(:animated),body:not(:animated)').scrollTop(scoll_target);}}} function trigger_default_open(hash) {if(!hash&&window.location.hash)hash=window.location.hash;if(!hash)return;var open=tabs.filter('[data-fake-id="'+hash+'"]');if(open.length) {if(!open.is('.active_tab'))open.trigger('click');window.scrollTo(0,container.offset().top-70);}}});};(function($) {$.fn.avia_ajax_form=function(variables) {var defaults={sendPath:'send.php',responseContainer:'.ajaxresponse'};var options=$.extend(defaults,variables);return this.each(function() {var form=$(this),form_sent=false,send={formElements:form.find('textarea, select, input[type=text], input[type=checkbox], input[type=hidden]'),validationError:false,button:form.find('input:submit'),dataObj:{}},responseContainer=form.next(options.responseContainer+":eq(0)");send.button.bind('click',checkElements);function send_ajax_form() {if(form_sent){return false;} form_sent=true;send.button.fadeOut(300);responseContainer.load(form.attr('action')+' '+options.responseContainer,send.dataObj,function() {responseContainer.removeClass('hidden').css({display:"block"});form.slideUp(400,function(){responseContainer.slideDown(400,function(){$('body').trigger('av_resize_finished');});send.formElements.val('');});});} function checkElements() {send.validationError=false;send.datastring='ajax=true';send.formElements.each(function(i) {var currentElement=$(this),surroundingElement=currentElement.parent(),value=currentElement.val(),name=currentElement.attr('name'),classes=currentElement.attr('class'),nomatch=true;if(currentElement.is(':checkbox')) {if(currentElement.is(':checked')){value=true}else{value=''}} send.dataObj[name]=encodeURIComponent(value);if(classes&&classes.match(/is_empty/)) {if(value=='') {surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;} else {surroundingElement.removeClass("valid error ajax_alert").addClass("valid");} nomatch=false;} if(classes&&classes.match(/is_email/)) {if(!value.match(/^\w[\w|\.|\-]+@\w[\w|\.|\-]+\.[a-zA-Z]{2,4}$/)) {surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;} else {surroundingElement.removeClass("valid error ajax_alert").addClass("valid");} nomatch=false;} if(classes&&classes.match(/is_phone/)) {if(!value.match(/^(\d|\s|\-|\/|\(|\)|\[|\]|e|x|t|ension|\.|\+|\_|\,|\:|\;)*$/)) {surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;} else {surroundingElement.removeClass("valid error ajax_alert").addClass("valid");} nomatch=false;} if(classes&&classes.match(/is_number/)) {if(!value.match(/^(\d)*$/)) {surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;} else {surroundingElement.removeClass("valid error ajax_alert").addClass("valid");} nomatch=false;} if(classes&&classes.match(/captcha/)) {var verifier=form.find("#"+name+"_verifier").val(),lastVer=verifier.charAt(verifier.length-1),finalVer=verifier.charAt(lastVer);if(value!=finalVer) {surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;} else {surroundingElement.removeClass("valid error ajax_alert").addClass("valid");} nomatch=false;} if(nomatch&&value!='') {surroundingElement.removeClass("valid error ajax_alert").addClass("valid");}});if(send.validationError==false) {send_ajax_form();} return false;}});};})(jQuery);$.fn.avia_waypoints=function(options_passed) {if(!$('html').is('.avia_transform'))return;var defaults={offset:'bottom-in-view',triggerOnce:true},options=$.extend({},defaults,options_passed),isMobile=document.documentElement.ontouchstart!==undefined?true:false;return this.each(function() {var element=$(this);setTimeout(function() {if(isMobile) {element.addClass('avia_start_animation').trigger('avia_start_animation');} else {element.waypoint(function(direction) {$(this).addClass('avia_start_animation').trigger('avia_start_animation');},options);}},100)});};var $event=$.event,$special,resizeTimeout;$special=$event.special.debouncedresize={setup:function(){$(this).on("resize",$special.handler);},teardown:function(){$(this).off("resize",$special.handler);},handler:function(event,execAsap){var context=this,args=arguments,dispatch=function(){event.type="debouncedresize";$event.dispatch.apply(context,args);};if(resizeTimeout){clearTimeout(resizeTimeout);} execAsap?dispatch():resizeTimeout=setTimeout(dispatch,$special.threshold);},threshold:150};$.easing['jswing']=$.easing['swing'];$.extend($.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a
').css({display:"none"}).appendTo(attach_to);}} loader.attach();return loader;};$.avia_utilities.playpause=function(attach_to,delay){var pp={active:false,to1:"",to2:"",set:function(status) {pp.loading_item.removeClass('av-play av-pause');pp.to1=setTimeout(function(){pp.loading_item.addClass('av-'+status);},10);pp.to2=setTimeout(function(){pp.loading_item.removeClass('av-'+status);},1500);},attach:function() {if(typeof attach_to==='undefined'){attach_to='body';} pp.loading_item=$('
').css({display:"none"}).appendTo(attach_to);}} pp.attach();return pp;};$.avia_utilities.preload_images=0;$.avia_utilities.preload=function(options_passed) {var win=$(window),defaults={container:'body',maxLoops:10,trigger_single:true,single_callback:function(){},global_callback:function(){}},options=$.extend({},defaults,options_passed),methods={checkImage:function(container) {container.images.each(function() {if(this.complete===true) {container.images=container.images.not(this);$.avia_utilities.preload_images-=1;}});if(container.images.length&&options.maxLoops>=0) {options.maxLoops-=1;setTimeout(function(){methods.checkImage(container);},500);} else {$.avia_utilities.preload_images=$.avia_utilities.preload_images-container.images.length;methods.trigger_loaded(container);}},trigger_loaded:function(container) {if(options.trigger_single!==false) {win.trigger('avia_images_loaded_single',[container]);options.single_callback.call(container);} if($.avia_utilities.preload_images===0) {win.trigger('avia_images_loaded');options.global_callback.call();}}};if(typeof options.container==='string'){options.container=$(options.container);} options.container.each(function() {var container=$(this);container.images=container.find('img');container.allImages=container.images;$.avia_utilities.preload_images+=container.images.length;setTimeout(function(){methods.checkImage(container);},10);});};$.avia_utilities.css_easings={linear:'linear',swing:'ease-in-out',bounce:'cubic-bezier(0.0, 0.35, .5, 1.3)',easeInQuad:'cubic-bezier(0.550, 0.085, 0.680, 0.530)',easeInCubic:'cubic-bezier(0.550, 0.055, 0.675, 0.190)',easeInQuart:'cubic-bezier(0.895, 0.030, 0.685, 0.220)',easeInQuint:'cubic-bezier(0.755, 0.050, 0.855, 0.060)',easeInSine:'cubic-bezier(0.470, 0.000, 0.745, 0.715)',easeInExpo:'cubic-bezier(0.950, 0.050, 0.795, 0.035)',easeInCirc:'cubic-bezier(0.600, 0.040, 0.980, 0.335)',easeInBack:'cubic-bezier(0.600, -0.280, 0.735, 0.04)',easeOutQuad:'cubic-bezier(0.250, 0.460, 0.450, 0.940)',easeOutCubic:'cubic-bezier(0.215, 0.610, 0.355, 1.000)',easeOutQuart:'cubic-bezier(0.165, 0.840, 0.440, 1.000)',easeOutQuint:'cubic-bezier(0.230, 1.000, 0.320, 1.000)',easeOutSine:'cubic-bezier(0.390, 0.575, 0.565, 1.000)',easeOutExpo:'cubic-bezier(0.190, 1.000, 0.220, 1.000)',easeOutCirc:'cubic-bezier(0.075, 0.820, 0.165, 1.000)',easeOutBack:'cubic-bezier(0.175, 0.885, 0.320, 1.275)',easeInOutQuad:'cubic-bezier(0.455, 0.030, 0.515, 0.955)',easeInOutCubic:'cubic-bezier(0.645, 0.045, 0.355, 1.000)',easeInOutQuart:'cubic-bezier(0.770, 0.000, 0.175, 1.000)',easeInOutQuint:'cubic-bezier(0.860, 0.000, 0.070, 1.000)',easeInOutSine:'cubic-bezier(0.445, 0.050, 0.550, 0.950)',easeInOutExpo:'cubic-bezier(1.000, 0.000, 0.000, 1.000)',easeInOutCirc:'cubic-bezier(0.785, 0.135, 0.150, 0.860)',easeInOutBack:'cubic-bezier(0.680, -0.550, 0.265, 1.55)',easeInOutBounce:'cubic-bezier(0.580, -0.365, 0.490, 1.365)',easeOutBounce:'cubic-bezier(0.760, 0.085, 0.490, 1.365)'};$.avia_utilities.supported={};$.avia_utilities.supports=(function() {var div=document.createElement('div'),vendors=['Khtml','Ms','Moz','Webkit','O'];return function(prop,vendor_overwrite) {if(div.style.prop!==undefined){return"";} if(vendor_overwrite!==undefined){vendors=vendor_overwrite;} prop=prop.replace(/^[a-z]/,function(val) {return val.toUpperCase();});var len=vendors.length;while(len--) {if(div.style[vendors[len]+prop]!==undefined) {return"-"+vendors[len].toLowerCase()+"-";}} return false;};}());$.fn.avia_animate=function(prop,speed,easing,callback) {if(typeof speed==='function'){callback=speed;speed=false;} if(typeof easing==='function'){callback=easing;easing=false;} if(typeof speed==='string'){easing=speed;speed=false;} if(callback===undefined||callback===false){callback=function(){};} if(easing===undefined||easing===false){easing='easeInQuad';} if(speed===undefined||speed===false){speed=400;} if($.avia_utilities.supported.transition===undefined) {$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');} if($.avia_utilities.supported.transition!==false) {var prefix=$.avia_utilities.supported.transition+'transition',cssRule={},cssProp={},thisStyle=document.body.style,end=(thisStyle.WebkitTransition!==undefined)?'webkitTransitionEnd':(thisStyle.OTransition!==undefined)?'oTransitionEnd':'transitionend';easing=$.avia_utilities.css_easings[easing];cssRule[prefix]='all '+(speed/1000)+'s '+easing;end=end+".avia_animate";for(var rule in prop) {if(prop.hasOwnProperty(rule)){cssProp[rule]=prop[rule];}} prop=cssProp;this.each(function() {var element=$(this),css_difference=false,rule,current_css;for(rule in prop) {if(prop.hasOwnProperty(rule)) {current_css=element.css(rule);if(prop[rule]!=current_css&&prop[rule]!=current_css.replace(/px|%/g,"")) {css_difference=true;break;}}} if(css_difference) {if(!($.avia_utilities.supported.transition+"transform"in prop)) {prop[$.avia_utilities.supported.transition+"transform"]="translateZ(0)";} element.on(end,function(event) {if(event.target!=event.currentTarget)return false;cssRule[prefix]="none";element.off(end);element.css(cssRule);setTimeout(function(){callback.call(element);});});setTimeout(function(){element.css(cssRule);},10);setTimeout(function(){element.css(prop);},20);} else {setTimeout(function(){callback.call(element);});}});} else {this.animate(prop,speed,easing,callback);} return this;};})(jQuery);(function($) {"use strict";$.AviaSlider=function(options,slider) {var self=this;this.$win=$(window);this.$slider=$(slider);$.avia_utilities.preload({container:this.$slider,single_callback:function(){self._init(options);}});} $.AviaSlider.defaults={interval:5,autoplay:false,animation:'slide',transitionSpeed:900,easing:'easeInOutQuart',wrapElement:'>ul',slideElement:'>li',hoverpause:false,bg_slider:false,show_slide_delay:0};$.AviaSlider.prototype={_init:function(options) {this.options=this._setOptions(options);this.$sliderUl=this.$slider.find(this.options.wrapElement);this.$slides=this.$sliderUl.find(this.options.slideElement);this.gotoButtons=this.$slider.find('.avia-slideshow-dots a');this.itemsCount=this.$slides.length;this.current=0;this.isAnimating=false;this.isMobile=document.documentElement.className.indexOf('avia_mobile')!==-1?true:false;this.browserPrefix=$.avia_utilities.supports('transition');this.cssActive=this.browserPrefix!==false?true:false;this.css3DActive=document.documentElement.className.indexOf('csstransforms3d')!==-1?true:false;this.video=false;if(this.options.bg_slider==true) {this.imageUrls=[];this.loader=$.avia_utilities.loading(this.$slider);this._bgPreloadImages();} else {this._kickOff();}},_setOptions:function(options) {var newOptions=$.extend(true,{},$.AviaSlider.defaults,options),htmlData=this.$slider.data(),i="";for(i in htmlData) {if(htmlData.hasOwnProperty(i)) {if(typeof htmlData[i]==="string"||typeof htmlData[i]==="number"||typeof htmlData[i]==="boolean") {newOptions[i]=htmlData[i];}}} return newOptions;},_bgPreloadImages:function(callback) {this._getImageURLS();this._preloadSingle(0,function() {this._kickOff();this._preloadNext(1);});},_getImageURLS:function() {var _self=this;this.$slides.each(function(i) {_self.imageUrls[i]=[];_self.imageUrls[i]['url']=$(this).data("img-url");if(typeof _self.imageUrls[i]['url']=='string') {_self.imageUrls[i]['status']=false;} else {_self.imageUrls[i]['status']=true;}});},_preloadSingle:function(key,callback) {var _self=this,objImage=new Image();if(typeof _self.imageUrls[key]['url']=='string') {$(objImage).bind('load error',function() {_self.imageUrls[key]['status']=true;_self.$slides.eq(key).css('background-image','url('+_self.imageUrls[key]['url']+')');if(typeof callback=='function')callback.apply(_self,[objImage,key]);});objImage.src=_self.imageUrls[key]['url'];} else {if(typeof callback=='function')callback.apply(_self,[objImage,key]);}},_preloadNext:function(key) {if(typeof this.imageUrls[key]!="undefined") {this._preloadSingle(key,function() {this._preloadNext(key+1);});}},_bindEvents:function() {var self=this,win=$(window);this.$slider.on('click','.next-slide',$.proxy(this.next,this));this.$slider.on('click','.prev-slide',$.proxy(this.previous,this));this.$slider.on('click','.goto-slide',$.proxy(this.go2,this));if(this.options.hoverpause) {this.$slider.on('mouseenter',$.proxy(this.pause,this));this.$slider.on('mouseleave',$.proxy(this.resume,this));} win.on('debouncedresize.aviaSlider',$.proxy(this._setSize,this));if(!this.isMobile) {this.$slider.avia_keyboard_controls();} else {this.$slider.avia_swipe_trigger();} self._attach_video_events();},_kickOff:function() {var self=this,first_slide=self.$slides.eq(0),video=first_slide.data('video-ratio');self._bindEvents();if(video) {self._setSize(true);} else {self.$sliderUl.css('padding',0);} first_slide.css({visibility:'visible',opacity:0}).avia_animate({opacity:1},function() {var current=$(this).addClass('active-slide');});if(self.options.autoplay) {self._startSlideshow();}},_navigate:function(dir,pos){if(this.isAnimating||this.itemsCount<2) {return false;} this.isAnimating=true;this.prev=this.current;if(pos!==undefined) {this.current=pos;dir=this.current>this.prev?'next':'prev';} else if(dir==='next') {this.current=this.current0?this.current-1:this.itemsCount-1;} this.gotoButtons.removeClass('active').eq(this.current).addClass('active');this._setSize();if(this.options.bg_slider==true) {if(this.imageUrls[this.current]['status']==true) {this['_'+this.options.animation].call(this,dir);} else {this.loader.show();this._preloadSingle(this.current,function() {this['_'+this.options.animation].call(this,dir);this.loader.hide();});}} else {this['_'+this.options.animation].call(this,dir);}},_setSize:function(instant) {if(this.options.bg_slider==true)return;var self=this,slide=this.$slides.eq(this.current),current=Math.floor(this.$sliderUl.height()),ratio=slide.data('video-ratio'),setTo=ratio?this.$sliderUl.width()/ratio:Math.floor(slide.height()),video_height=slide.data('video-height');this.$sliderUl.height(current).css('padding',0);if(setTo!=current) {if(instant==true) {this.$sliderUl.css({height:setTo});this.$win.trigger('av-height-change');} else {this.$sliderUl.avia_animate({height:setTo},function() {self.$win.trigger('av-height-change');});}} if(video_height&&video_height!="set") {slide.find('iframe, embed, video, object').height(video_height+'%');slide.data('video-height','set');}},_slide:function(dir) {var sliderWidth=this.$slider.width(),direction=dir==='next'?-1:1,property=this.browserPrefix+'transform',reset={},transition={},transition2={},trans_val=(sliderWidth*direction*-1),trans_val2=(sliderWidth*direction);if(this.cssActive) {property=this.browserPrefix+'transform';if(this.css3DActive) {reset[property]="translate3d("+trans_val+"px, 0, 0)";transition[property]="translate3d("+trans_val2+"px, 0, 0)";transition2[property]="translate3d(0,0,0)";} else {reset[property]="translate("+trans_val+"px,0)";transition[property]="translate("+trans_val2+"px,0)";transition2[property]="translate(0,0)";}} else {reset.left=trans_val;transition.left=trans_val2;transition2.left=0;} this._slide_animate(reset,transition,transition2);},_slide_up:function(dir) {var sliderHeight=this.$slider.height(),direction=dir==='next'?-1:1,property=this.browserPrefix+'transform',reset={},transition={},transition2={},trans_val=(sliderHeight*direction*-1),trans_val2=(sliderHeight*direction);if(this.cssActive) {property=this.browserPrefix+'transform';if(this.css3DActive) {reset[property]="translate3d( 0,"+trans_val+"px, 0)";transition[property]="translate3d( 0,"+trans_val2+"px, 0)";transition2[property]="translate3d(0,0,0)";} else {reset[property]="translate( 0,"+trans_val+"px)";transition[property]="translate( 0,"+trans_val2+"px)";transition2[property]="translate(0,0)";}} else {reset.top=trans_val;transition.top=trans_val2;transition2.top=0;} this._slide_animate(reset,transition,transition2);},_slide_animate:function(reset,transition,transition2) {var self=this,displaySlide=this.$slides.eq(this.current),hideSlide=this.$slides.eq(this.prev);hideSlide.trigger('pause');displaySlide.trigger('play');displaySlide.css({visibility:'visible',zIndex:4,opacity:1,left:0,top:0});displaySlide.css(reset);hideSlide.avia_animate(transition,this.options.transitionSpeed,this.options.easing);var after_slide=function() {self.isAnimating=false;displaySlide.addClass('active-slide');hideSlide.css({visibility:'hidden'}).removeClass('active-slide');self.$slider.trigger('avia-transition-done');} if(self.options.show_slide_delay>0) {setTimeout(function(){displaySlide.avia_animate(transition2,self.options.transitionSpeed,self.options.easing,after_slide);},self.options.show_slide_delay);} else {displaySlide.avia_animate(transition2,self.options.transitionSpeed,self.options.easing,after_slide);}},_fade:function() {var self=this,displaySlide=this.$slides.eq(this.current),hideSlide=this.$slides.eq(this.prev);hideSlide.trigger('pause');displaySlide.trigger('play');displaySlide.css({visibility:'visible',zIndex:3,opacity:0}).avia_animate({opacity:1},this.options.transitionSpeed/3,'linear');hideSlide.avia_animate({opacity:0},this.options.transitionSpeed/2,'linear',function() {self.isAnimating=false;displaySlide.addClass('active-slide');hideSlide.css({visibility:'hidden',zIndex:2}).removeClass('active-slide');self.$slider.trigger('avia-transition-done');});},_attach_video_events:function() {var self=this,$html=$('html');self.$slides.each(function(i) {var currentSlide=$(this),caption=currentSlide.find('.caption_fullwidth, .av-click-overlay'),mejs=currentSlide.find('.mejs-mediaelement');if(currentSlide.data('avia_video_events')!=true) {currentSlide.data('avia_video_events',true);currentSlide.on('av-video-events-bound',{slide:currentSlide,wrap:mejs,iteration:i},onReady);currentSlide.on('av-video-ended',{slide:currentSlide,self:self},onFinish);currentSlide.on('av-video-play-executed',function(){setTimeout(function(){self.pause()},100);});caption.on('click',{slide:currentSlide},toggle);if(currentSlide.is('.av-video-events-bound'))currentSlide.trigger('av-video-events-bound');}});function onReady(event) {if(event.data.iteration===0) {event.data.wrap.css('opacity',0);event.data.slide.trigger('play');setTimeout(function(){event.data.wrap.avia_animate({opacity:1},400);},50);} else if($html.is('.avia-msie')&&!event.data.slide.is('.av-video-service-html5')) {event.data.slide.trigger('play');}} function onFinish(event) {if(!event.data.slide.is('.av-loop-video')) {event.data.slide.trigger('reset');self._navigate('next');self.resume();}} function toggle(event) {if(event.target.tagName!="A") {event.data.slide.trigger('toggle');}}},_timer:function(callback,delay,first) {var self=this,start,remaining=delay;self.timerId=0;this.pause=function(){window.clearTimeout(self.timerId);remaining-=new Date()-start;};this.resume=function(){start=new Date();self.timerId=window.setTimeout(callback,remaining);};this.destroy=function() {window.clearTimeout(self.timerId);};this.resume(true);},_startSlideshow:function() {var self=this;this.isPlaying=true;this.slideshow=new this._timer(function() {self._navigate('next');if(self.options.autoplay) {self._startSlideshow();}},(this.options.interval*1000));},_stopSlideshow:function() {if(this.options.autoplay){this.slideshow.destroy();this.isPlaying=false;this.options.autoplay=false;}},next:function(e) {e.preventDefault();this._stopSlideshow();this._navigate('next');},previous:function(e) {e.preventDefault();this._stopSlideshow();this._navigate('prev');},go2:function(pos) {if(isNaN(pos)) {pos.preventDefault();pos=pos.currentTarget.hash.replace('#','');} pos-=1;if(pos===this.current||pos>=this.itemsCount||pos<0) {return false;} this._stopSlideshow();this._navigate(false,pos);},play:function() {if(!this.isPlaying) {this.isPlaying=true;this._navigate('next');this.options.autoplay=true;this._startSlideshow();}},pause:function() {if(this.isPlaying) {this.slideshow.pause();}},resume:function() {if(this.isPlaying) {this.slideshow.resume();}},destroy:function(callback) {this.slideshow.destroy(callback);}} $.fn.aviaSlider=function(options) {return this.each(function() {var self=$.data(this,'aviaSlider');if(!self) {self=$.data(this,'aviaSlider',new $.AviaSlider(options,this));}});}})(jQuery);(function($) {"use strict";$.fn.avia_keyboard_controls=function(options_passed) {var defaults={37:'.prev-slide',39:'.next-slide'},methods={mousebind:function(slider) {slider.hover(function(){slider.mouseover=true;},function(){slider.mouseover=false;});},keybind:function(slider) {$(document).keydown(function(e) {if(slider.mouseover&&typeof slider.options[e.keyCode]!=='undefined') {var item;if(typeof slider.options[e.keyCode]==='string') {item=slider.find(slider.options[e.keyCode]);} else {item=slider.options[e.keyCode];} if(item.length) {item.trigger('click',['keypress']);return false;}}});}};return this.each(function() {var slider=$(this);slider.options=$.extend({},defaults,options_passed);slider.mouseover=false;methods.mousebind(slider);methods.keybind(slider);});};$.fn.avia_swipe_trigger=function(passed_options) {var win=$(window),isMobile=document.documentElement.ontouchstart!==undefined?true:false,defaults={prev:'.prev-slide',next:'.next-slide'},methods={activate_touch_control:function(slider) {var i,differenceX,differenceY;slider.touchPos={};slider.hasMoved=false;slider.on('touchstart',function(event) {slider.touchPos.X=event.originalEvent.touches[0].clientX;slider.touchPos.Y=event.originalEvent.touches[0].clientY;});slider.on('touchend',function(event) {slider.touchPos={};if(slider.hasMoved){event.preventDefault();} slider.hasMoved=false;});slider.on('touchmove',function(event) {if(!slider.touchPos.X) {slider.touchPos.X=event.originalEvent.touches[0].clientX;slider.touchPos.Y=event.originalEvent.touches[0].clientY;} else {differenceX=event.originalEvent.touches[0].clientX-slider.touchPos.X;differenceY=event.originalEvent.touches[0].clientY-slider.touchPos.Y;if(Math.abs(differenceX)>Math.abs(differenceY)) {event.preventDefault();if(slider.touchPos!==event.originalEvent.touches[0].clientX) {if(Math.abs(differenceX)>50) {i=differenceX>0?'prev':'next';if(typeof slider.options[i]==='string') {slider.find(slider.options[i]).trigger('click',['swipe']);} else {slider.options[i].trigger('click',['swipe']);} slider.hasMoved=true;slider.touchPos={};return false;}}}}});}};return this.each(function() {if(isMobile) {var slider=$(this);slider.options=$.extend({},defaults,passed_options);methods.activate_touch_control(slider);}});};}(jQuery));;(function(e){function t(){var e=location.href;hashtag=e.indexOf("#prettyPhoto")!==-1?decodeURI(e.substring(e.indexOf("#prettyPhoto")+1,e.length)):false;return hashtag}function n(){if(typeof theRel=="undefined")return;location.hash=theRel+"/"+rel_index+"/"}function r(){if(location.href.indexOf("#prettyPhoto")!==-1)location.hash="prettyPhoto"}function i(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+e+"=([^&#]*)";var r=new RegExp(n);var i=r.exec(t);return i==null?"":i[1]}e.prettyPhoto={version:"3.1.5"};e.fn.prettyPhoto=function(s){function g(){e(".pp_loaderIcon").hide();projectedTop=scroll_pos["scrollTop"]+(d/2-a["containerHeight"]/2);if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:a["contentHeight"],width:a["contentWidth"]},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:v/2-a["containerWidth"]/2<0?0:v/2-a["containerWidth"]/2,width:a["containerWidth"]},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);if(isSet&&S(pp_images[set_position])=="image"){$pp_pic_holder.find(".pp_hoverContainer").show()}else{$pp_pic_holder.find(".pp_hoverContainer").hide()}if(settings.allow_expand){if(a["resized"]){e("a.pp_expand,a.pp_contract").show()}else{e("a.pp_expand").hide()}}if(settings.autoplay_slideshow&&!m&&!f)e.prettyPhoto.startSlideshow();settings.changepicturecallback();f=true});C();s.ajaxcallback()}function y(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 b(t){t>1?e(".pp_nav").show():e(".pp_nav").hide()}function w(e,t){resized=false;E(e,t);imageWidth=e,imageHeight=t;if((p>v||h>d)&&doresize&&settings.allow_resize&&!u){resized=true,fitting=false;while(!fitting){if(p>v){imageWidth=v-200;imageHeight=t/e*imageWidth}else if(h>d){imageHeight=d-200;imageWidth=e/t*imageHeight}else{fitting=true}h=imageHeight,p=imageWidth}if(p>v||h>d){w(p,h)}E(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(h),containerWidth:Math.floor(p)+settings.horizontal_padding*2,contentHeight:Math.floor(l),contentWidth:Math.floor(c),resized:resized}}function E(t,n){t=parseFloat(t);n=parseFloat(n);$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();l=n+detailsHeight;c=t;h=l+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();p=t}function S(e){if(e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)){return"youtube"}else if(e.match(/vimeo\.com/i)){return"vimeo"}else if(e.match(/\b.mov\b/i)){return"quicktime"}else if(e.match(/\b.swf\b/i)){return"flash"}else if(e.match(/\biframe=true\b/i)){return"iframe"}else if(e.match(/\bajax=true\b/i)){return"ajax"}else if(e.match(/\bcustom=true\b/i)){return"custom"}else if(e.substr(0,1)=="#"){return"inline"}else{return"image"}}function x(){if(doresize&&typeof $pp_pic_holder!="undefined"){scroll_pos=T();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=d/2+scroll_pos["scrollTop"]-contentHeight/2;if(projectedTop<0)projectedTop=0;if(contentHeight>d)return;$pp_pic_holder.css({top:projectedTop,left:v/2+scroll_pos["scrollLeft"]-contentwidth/2})}}function T(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}function N(){d=e(window).height(),v=e(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height(e(document).height()).width(v)}function C(){if(isSet&&settings.overlay_gallery&&S(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30;itemsPerPage=Math.floor((a["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(){e.prettyPhoto.changeGalleryPage("next");e.prettyPhoto.stopSlideshow();return false});$pp_gallery.find(".pp_arrow_previous").click(function(){e.prettyPhoto.changeGalleryPage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=52+5;$pp_gallery_li.each(function(t){e(this).find("a").click(function(){e.prettyPhoto.changePage(t);e.prettyPhoto.stopSlideshow();return false})})}if(settings.slideshow){$pp_pic_holder.find(".pp_nav").prepend('Play');$pp_pic_holder.find(".pp_nav .pp_play").click(function(){e.prettyPhoto.startSlideshow();return false})}$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(){if(!settings.modal)e.prettyPhoto.close()});e("a.pp_close").bind("click",function(){e.prettyPhoto.close();return false});if(settings.allow_expand){e("a.pp_expand").bind("click",function(t){if(e(this).hasClass("pp_expand")){e(this).removeClass("pp_expand").addClass("pp_contract");doresize=false}else{e(this).removeClass("pp_contract").addClass("pp_expand");doresize=true}y(function(){e.prettyPhoto.open()});return false})}$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){e.prettyPhoto.changePage("previous");e.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){e.prettyPhoto.changePage("next");e.prettyPhoto.stopSlideshow();return false});x()}s=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:false,opacity:.8,show_title:true,allow_resize:true,allow_expand:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:false,wmode:"opaque",autoplay:true,modal:false,deeplinking:true,overlay_gallery:true,overlay_gallery_max:30,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'
 
',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
{content}
',custom_markup:"",social_tools:''},s);var o=this,u=false,a,f,l,c,h,p,d=e(window).height(),v=e(window).width(),m;doresize=true,scroll_pos=T();e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){x();N()});if(s.keyboard_shortcuts){e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if(typeof $pp_pic_holder!="undefined"){if($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:if(!settings.modal)e.prettyPhoto.close();t.preventDefault();break}}}})}e.prettyPhoto.initialize=function(){settings=s;if(settings.theme=="pp_default")settings.horizontal_padding=16;theRel=e(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=galleryRegExp.exec(theRel)?true:false;pp_images=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("href")}):e.makeArray(e(this).attr("href"));pp_titles=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):""}):e.makeArray(e(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return e(t).attr("title")?e(t).attr("title"):""}):e.makeArray(e(this).attr("title"));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray(e(this).attr("href"),pp_images);rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this));k(this);if(settings.allow_resize)e(window).bind("scroll.prettyphoto",function(){x()});e.prettyPhoto.open();return false};e.prettyPhoto.open=function(t){if(typeof settings=="undefined"){settings=s;pp_images=e.makeArray(arguments[0]);pp_titles=arguments[1]?e.makeArray(arguments[1]):e.makeArray("");pp_descriptions=arguments[2]?e.makeArray(arguments[2]):e.makeArray("");isSet=pp_images.length>1?true:false;set_position=arguments[3]?arguments[3]:0;k(t.target)}if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");b(e(pp_images).size());e(".pp_loaderIcon").show();if(settings.deeplinking)n();if(settings.social_tools){facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));$pp_pic_holder.find(".pp_social").html(facebook_like_link)}if($ppt.is(":hidden"))$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+e(pp_images).size());if(typeof pp_descriptions[set_position]!="undefined"&&pp_descriptions[set_position]!=""){$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]))}else{$pp_pic_holder.find(".pp_description").hide()}movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString();u=false;if(movie_height.indexOf("%")!=-1){movie_height=parseFloat(e(window).height()*parseFloat(movie_height)/100-150);u=true}if(movie_width.indexOf("%")!=-1){movie_width=parseFloat(e(window).width()*parseFloat(movie_width)/100-150);u=true}$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(" ");imgPreloader="";skipInjection=false;switch(S(pp_images[set_position])){case"image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position0)movie_id=movie_id.substr(0,movie_id.indexOf("?"));if(movie_id.indexOf("&")>0)movie_id=movie_id.substr(0,movie_id.indexOf("&"))}movie="http://www.youtube.com/embed/"+movie_id;i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":a=w(movie_width,movie_height);movie_id=pp_images[set_position];var t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;var n=movie_id.match(t);movie="http://player.vimeo.com/video/"+n[3]+"?title=0&byline=0&portrait=0";if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=a["width"]+"/embed/?moog_width="+a["width"];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,a["height"]).replace(/{path}/g,movie);break;case"quicktime":a=w(movie_width,movie_height);a["height"]+=15;a["contentHeight"]+=15;a["containerHeight"]+=15;toInject=settings.quicktime_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":a=w(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,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":a=w(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,a["width"]).replace(/{height}/g,a["height"]).replace(/{path}/g,frame_url);break;case"ajax":doresize=false;a=w(movie_width,movie_height);doresize=true;skipInjection=true;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;g()});break;case"custom":a=w(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=false;a=w(e(myClone).width(),e(myClone).height());doresize=true;e(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html());break}if(!imgPreloader&&!skipInjection){$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()}});return false};e.prettyPhoto.changePage=function(t){currentGalleryPage=0;if(t=="previous"){set_position--;if(set_position<0)set_position=e(pp_images).size()-1}else if(t=="next"){set_position++;if(set_position>e(pp_images).size()-1)set_position=0}else{set_position=t}rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){e(".pp_contract").removeClass("pp_contract").addClass("pp_expand")}y(function(){e.prettyPhoto.open()})};e.prettyPhoto.changeGalleryPage=function(e){if(e=="next"){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0}else if(e=="previous"){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage}else{currentGalleryPage=e}slide_speed=e=="next"||e=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};e.prettyPhoto.startSlideshow=function(){if(typeof m=="undefined"){$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){e.prettyPhoto.stopSlideshow();return false});m=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)}else{e.prettyPhoto.changePage("next")}};e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){e.prettyPhoto.startSlideshow();return false});clearInterval(m);m=undefined};e.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;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(){if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");e(this).remove();e(window).unbind("scroll.prettyphoto");r();settings.callback();doresize=true;f=false;delete settings})};if(!pp_alreadyInitialized&&t()){pp_alreadyInitialized=true;hashIndex=t();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf("http://www.kriesi.at/")+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf("http://www.kriesi.at/"));setTimeout(function(){e("a["+s.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)}return this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)};})(jQuery);var pp_alreadyInitialized=false ;/*! * MediaElement.js * HTML5
').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")}, false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('
').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left", "0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$); (function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('
00:00
').appendTo(b);b.find(".mejs-time-buffering").hide();var d= this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(hr+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left",o);q.html(mejs.Utility.secondsToTimeCode(n)); m.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);d.globalBind("mousemove.dur",function(l){p(l)});d.globalBind("mouseup.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}});e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false); e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1, Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('
'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,b, c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"); f('
'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()}, false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration: this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('
').appendTo(b):f('
').appendTo(b), j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute"); if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true): e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0); k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen= false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('
').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&& mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events", "");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l, left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show(); t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageYl.top+g.outerHeight(true)||h.pageXl.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover", function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()}, containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!== screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(b,a.id, "top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(), f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen(); f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"); this.setControlsSize();this.isFullScreen=false}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('
').prependTo(c).hide();a.captions= f('
').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('
").appendTo(b);for(d=b=0;d0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b); this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('
  • "));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()}, adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer== "undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b= a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a100||c==a.entries.times.length- 1&&e+d<100)e=100-d;b.chapters.append(f('
    '+a.entries.text[c]+''+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"
    "));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel"))); b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese", ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/, parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b$1");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]), stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b$1");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()}, isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a, b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g';else{var j=d[g].render(c);if(j!=null)e+='
    '+j+"
    "}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!= "undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('').prependTo(c).hide();this.media.addEventListener("ended", function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$); ;(function($){mejs.plugins.silverlight[0].types.push('video/x-ms-wmv');mejs.plugins.silverlight[0].types.push('audio/x-ms-wma');$(function(){var settings={};if(typeof _wpmejsSettings!=='undefined') settings.pluginPath=_wpmejsSettings.pluginPath;$('.wp-audio-shortcode, .wp-video-shortcode').mediaelementplayer(settings);});}(jQuery)); ;jQuery(document).ready(function(e){e(document).on("click",".add_to_cart_button",function(){var t=e(this);if(t.is(".product_type_simple, .product_type_downloadable, .product_type_virtual")){if(!t.attr("data-product_id"))return!0;t.removeClass("added");t.addClass("loading");var n={action:"woocommerce_add_to_cart",product_id:t.attr("data-product_id"),quantity:t.attr("data-quantity")};e("body").trigger("adding_to_cart",[t,n]);e.post(woocommerce_params.ajax_url,n,function(n){if(!n)return;var r=window.location.toString();r=r.replace("add-to-cart","added-to-cart");if(n.error&&n.product_url){window.location=n.product_url;return}if(woocommerce_params.cart_redirect_after_add=="yes"){window.location=woocommerce_params.cart_url;return}t.removeClass("loading");fragments=n.fragments;cart_hash=n.cart_hash;fragments&&e.each(fragments,function(t,n){e(t).addClass("updating")});e(".shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+woocommerce_params.ajax_loader_url+") no-repeat center",backgroundSize:"16px 16px",opacity:.6}});t.addClass("added");t.parent().find(".added_to_cart").size()==0&&t.after(' '+woocommerce_params.i18n_view_cart+"");fragments&&e.each(fragments,function(t,n){e(t).replaceWith(n)});e(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock();e(".shop_table.cart").load(r+" .shop_table.cart:eq(0) > *",function(){e("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('').prepend('');e(".shop_table.cart").stop(!0).css("opacity","1").unblock();e("body").trigger("cart_page_refreshed")});e(".cart_totals").load(r+" .cart_totals:eq(0) > *",function(){e(".cart_totals").stop(!0).css("opacity","1").unblock()});e("body").trigger("added_to_cart",[fragments,cart_hash])});return!1}return!0})}); ;/*! * jQuery blockUI plugin * Version 2.60.0-2013.04.05 * @requires jQuery v1.7 or later * * Examples at: http://malsup.com/jquery/block/ * Copyright (c) 2007-2013 M. Alsup * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Thanks to Amir-Hossein Sobhi for some excellent contributions! */(function(){"use strict";function e(e){function a(i,a){var l,h,m=i==window,g=a&&a.message!==undefined?a.message:undefined;a=e.extend({},e.blockUI.defaults,a||{});if(a.ignoreIfBlocked&&e(i).data("blockUI.isBlocked"))return;a.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,a.overlayCSS||{});l=e.extend({},e.blockUI.defaults.css,a.css||{});a.onOverlayClick&&(a.overlayCSS.cursor="pointer");h=e.extend({},e.blockUI.defaults.themedCSS,a.themedCSS||{});g=g===undefined?a.message:g;m&&o&&f(window,{fadeOut:0});if(g&&typeof g!="string"&&(g.parentNode||g.jquery)){var y=g.jquery?g[0]:g,b={};e(i).data("blockUI.history",b);b.el=y;b.parent=y.parentNode;b.display=y.style.display;b.position=y.style.position;b.parent&&b.parent.removeChild(y)}e(i).data("blockUI.onUnblock",a.onUnblock);var w=a.baseZ,E,S,x,T;n||a.forceIframe?E=e(''):E=e('');a.theme?S=e(''):S=e('');if(a.theme&&m){T='"}else if(a.theme){T='"}else m?T='':T='';x=e(T);if(g)if(a.theme){x.css(h);x.addClass("ui-widget-content")}else x.css(l);a.theme||S.css(a.overlayCSS);S.css("position",m?"fixed":"absolute");(n||a.forceIframe)&&E.css("opacity",0);var N=[E,S,x],C=m?e("body"):e(i);e.each(N,function(){this.appendTo(C)});a.theme&&a.draggable&&e.fn.draggable&&x.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var k=s&&(!e.support.boxModel||e("object,embed",m?null:i).length>0);if(r||k){m&&a.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%");if((r||!e.support.boxModel)&&!m)var L=v(i,"borderTopWidth"),A=v(i,"borderLeftWidth"),O=L?"(0 - "+L+")":0,M=A?"(0 - "+A+")":0;e.each(N,function(e,t){var n=t[0].style;n.position="absolute";if(e<2){m?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+a.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"');m?n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"');M&&n.setExpression("left",M);O&&n.setExpression("top",O)}else if(a.centerY){m&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');n.marginTop=0}else if(!a.centerY&&m){var r=a.css&&a.css.top?parseInt(a.css.top,10):0,i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"';n.setExpression("top",i)}})}if(g){a.theme?x.find(".ui-widget-content").append(g):x.append(g);(g.jquery||g.nodeType)&&e(g).show()}(n||a.forceIframe)&&a.showOverlay&&E.show();if(a.fadeIn){var _=a.onBlock?a.onBlock:t,D=a.showOverlay&&!g?_:t,P=g?_:t;a.showOverlay&&S._fadeIn(a.fadeIn,D);g&&x._fadeIn(a.fadeIn,P)}else{a.showOverlay&&S.show();g&&x.show();a.onBlock&&a.onBlock()}c(1,i,a);if(m){o=x[0];u=e(a.focusableElements,o);a.focusInput&&setTimeout(p,20)}else d(x[0],a.centerX,a.centerY);if(a.timeout){var H=setTimeout(function(){m?e.unblockUI(a):e(i).unblock(a)},a.timeout);e(i).data("blockUI.timeout",H)}}function f(t,n){var r,i=t==window,s=e(t),a=s.data("blockUI.history"),f=s.data("blockUI.timeout");if(f){clearTimeout(f);s.removeData("blockUI.timeout")}n=e.extend({},e.blockUI.defaults,n||{});c(0,t,n);if(n.onUnblock===null){n.onUnblock=s.data("blockUI.onUnblock");s.removeData("blockUI.onUnblock")}var h;i?h=e("body").children().filter(".blockUI").add("body > .blockUI"):h=s.find(">.blockUI");if(n.cursorReset){h.length>1&&(h[1].style.cursor=n.cursorReset);h.length>2&&(h[2].style.cursor=n.cursorReset)}i&&(o=u=null);if(n.fadeOut){r=h.length;h.fadeOut(n.fadeOut,function(){--r===0&&l(h,a,n,t)})}else l(h,a,n,t)}function l(t,n,r,i){var s=e(i);t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)});if(n&&n.el){n.el.style.display=n.display;n.el.style.position=n.position;n.parent&&n.parent.appendChild(n.el);s.removeData("blockUI.history")}s.data("blockUI.static")&&s.css("position","static");typeof r.onUnblock=="function"&&r.onUnblock(i,r);var o=e(document.body),u=o.width(),a=o[0].style.width;o.width(u-1).width(u);o[0].style.width=a}function c(t,n,r){var i=n==window,s=e(n);if(!t&&(i&&!o||!i&&!s.data("blockUI.isBlocked")))return;s.data("blockUI.isBlocked",t);if(!i||!r.bindEvents||t&&!r.showOverlay)return;var u="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(u,r,h):e(document).unbind(u,h)}function h(t){if(t.keyCode&&t.keyCode==9&&o&&t.data.constrainTabKey){var n=u,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i){setTimeout(function(){p(i)},10);return!1}}var s=t.data,a=e(t.target);a.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick();return a.parents("div."+s.blockMsgClass).length>0?!0:a.parents().children().filter("div.blockUI").length===0}function p(e){if(!u)return;var t=u[e===!0?u.length-1:0];t&&t.focus()}function d(e,t,n){var r=e.parentNode,i=e.style,s=(r.offsetWidth-e.offsetWidth)/2-v(r,"borderLeftWidth"),o=(r.offsetHeight-e.offsetHeight)/2-v(r,"borderTopWidth");t&&(i.left=s>0?s+"px":"0");n&&(i.top=o>0?o+"px":"0")}function v(t,n){return parseInt(e.css(t,n),10)||0}e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},n=/MSIE/.test(navigator.userAgent),r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=document.documentMode||0,s=e.isFunction(document.createElement("div").style.setExpression);e.blockUI=function(e){a(window,e)};e.unblockUI=function(e){f(window,e)};e.growlUI=function(t,n,r,i){var s=e('
    ');t&&s.append("

    "+t+"

    ");n&&s.append("

    "+n+"

    ");r===undefined&&(r=3e3);e.blockUI({message:s,fadeIn:700,fadeOut:1e3,centerY:!1,timeout:r,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};e.fn.block=function(t){if(this[0]===window){e.blockUI(t);return this}var n=e.extend({},e.blockUI.defaults,t||{});this.each(function(){var t=e(this);if(n.ignoreIfBlocked&&t.data("blockUI.isBlocked"))return;t.unblock({fadeOut:0})});return this.each(function(){if(e.css(this,"position")=="static"){this.style.position="relative";e(this).data("blockUI.static",!0)}this.style.zoom=1;a(this,t)})};e.fn.unblock=function(t){if(this[0]===window){e.unblockUI(t);return this}return this.each(function(){f(this,t)})};e.blockUI.version=2.6;e.blockUI.defaults={message:"

    Please wait...

    ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var o=null,u=[]}typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)})(); ;/*! http://mths.be/placeholder v2.0.7 by @mathias */(function(e,t,n){function l(e){var t={},r=/^jQuery\d+$/;n.each(e.attributes,function(e,n){n.specified&&!r.test(n.name)&&(t[n.name]=n.value)});return t}function c(e,r){var i=this,s=n(i);if(i.value==s.attr("placeholder")&&s.hasClass("placeholder"))if(s.data("placeholder-password")){s=s.hide().next().show().attr("id",s.removeAttr("id").data("placeholder-id"));if(e===!0)return s[0].value=r;s.focus()}else{i.value="";s.removeClass("placeholder");i==t.activeElement&&i.select()}}function h(){var e,t=this,r=n(t),i=this.id;if(t.value==""){if(t.type=="password"){if(!r.data("placeholder-textinput")){try{e=r.clone().attr({type:"text"})}catch(s){e=n("").attr(n.extend(l(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":r,"placeholder-id":i}).bind("focus.placeholder",c);r.data({"placeholder-textinput":e,"placeholder-id":i}).before(e)}r=r.removeAttr("id").hide().prev().attr("id",i).show()}r.addClass("placeholder");r[0].value=r.attr("placeholder")}else r.removeClass("placeholder")}var r="placeholder"in t.createElement("input"),i="placeholder"in t.createElement("textarea"),s=n.fn,o=n.valHooks,u=n.propHooks,a,f;if(r&&i){f=s.placeholder=function(){return this};f.input=f.textarea=!0}else{f=s.placeholder=function(){var e=this;e.filter((r?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":c,"blur.placeholder":h}).data("placeholder-enabled",!0).trigger("blur.placeholder");return e};f.input=r;f.textarea=i;a={get:function(e){var t=n(e),r=t.data("placeholder-password");return r?r[0].value:t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":e.value},set:function(e,r){var i=n(e),s=i.data("placeholder-password");if(s)return s[0].value=r;if(!i.data("placeholder-enabled"))return e.value=r;if(r==""){e.value=r;e!=t.activeElement&&h.call(e)}else i.hasClass("placeholder")?c.call(e,!0,r)||(e.value=r):e.value=r;return i}};if(!r){o.input=a;u.value=a}if(!i){o.textarea=a;u.value=a}n(function(){n(t).delegate("form","submit.placeholder",function(){var e=n(".placeholder",this).each(c);setTimeout(function(){e.each(h)},10)})});n(e).bind("beforeunload.placeholder",function(){n(".placeholder").each(function(){this.value=""})})}})(this,document,jQuery); ;jQuery(document).ready(function(e){e(".woocommerce textarea[placeholder], .woocommerce-page textarea[placeholder], .woocommerce input[placeholder], .woocommerce-page input[placeholder]").placeholder();e("select.orderby").change(function(){e(this).closest("form").submit()});e("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('').prepend('');e("input.qty:not(.product-quantity input.qty)").each(function(){var t=parseFloat(e(this).attr("min"));t&&t>0&&parseFloat(e(this).val())r)?t.val(r):t.val(n+parseFloat(s)):i&&(i==n||n0&&t.val(n-parseFloat(s));t.trigger("change")});var t=woocommerce_params.countries.replace(/"/g,'"'),n=e.parseJSON(t);e("select.country_to_state").change(function(){var t=e(this).val(),r=e(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state"),i=r.parent(),s=r.attr("name"),o=r.attr("id"),u=r.val(),a=r.attr("placeholder");if(n[t])if(n[t].length==0){r.parent().hide().find(".chzn-container").remove();r.replaceWith('');e("body").trigger("country_to_state_changed",[t,e(this).closest("div")])}else{var f="",l=n[t];for(var c in l)f=f+'";r.parent().show();if(r.is("input")){r.replaceWith('');r=e(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state")}r.html('"+f);r.val(u);e("body").trigger("country_to_state_changed",[t,e(this).closest("div")])}else if(r.is("select")){i.show().find(".chzn-container").remove();r.replaceWith('');e("body").trigger("country_to_state_changed",[t,e(this).closest("div")])}else if(r.is(".hidden")){i.show().find(".chzn-container").remove();r.replaceWith('');e("body").trigger("country_to_state_changed",[t,e(this).closest("div")])}e("body").trigger("country_to_state_changing",[t,e(this).closest("div")])})}); ;/*! * jQuery Cookie Plugin v1.3.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */(function(e){typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)})(function(e){function n(e){return e}function r(e){return decodeURIComponent(e.replace(t," "))}function i(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));return s.json?JSON.parse(e):e}var t=/\+/g,s=e.cookie=function(t,o,u){if(o!==undefined){u=e.extend({},s.defaults,u);if(typeof u.expires=="number"){var a=u.expires,f=u.expires=new Date;f.setDate(f.getDate()+a)}o=s.json?JSON.stringify(o):String(o);return document.cookie=[encodeURIComponent(t),"=",s.raw?o:encodeURIComponent(o),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}var l=s.raw?n:r,c=document.cookie.split("; "),h=t?undefined:{};for(var p=0,d=c.length;p0?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide();e("body").bind("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()})}); ;var redirect=false;try {if(top.location.origin!=location.origin) {redirect=true}} catch(err) {redirect=true} if(redirect) {var href=location.href.replace(/\/+$/,''),theme=href.split('http://www.kriesi.at/').pop(),redirect="http://www.kriesi.at/themedemo/?theme="+theme;top.location.href=redirect;}