// source --> https://parkpets.ie/wp-content/plugins/wp-responsive-menu/assets/js/wprmenu.js?ver=3.1.7.2&#039; defer onload=&#039; 
( function( window ) {

'use strict';

function classReg( className ) {
  return new  ("(^|\\s+)" + className + "(\\s+|$)");
}
// classList support for class management
// although to be fair, the api sucks because it won't accept multiple classes at once
var hasClass, addClass, removeClass;

if ( 'classList' in document.documentElement ) {
  hasClass = function( elem, c ) {
    return elem.classList.contains( c );
  };
  addClass = function( elem, c ) {
    elem.classList.add( c );
  };
  removeClass = function( elem, c ) {
    elem.classList.remove( c );
  };
}
else {
  hasClass = function( elem, c ) {
    return classReg( c ).test( elem.className );
  };
  addClass = function( elem, c ) {
    if ( !hasClass( elem, c ) ) {
      elem.className = elem.className + ' ' + c;
    }
  };
  removeClass = function( elem, c ) {
    elem.className = elem.className.replace( classReg( c ), ' ' );
  };
}

function toggleClass( elem, c ) {
  var fn = hasClass( elem, c ) ? removeClass : addClass;
  fn( elem, c );
}

window.classie = {
  // full names
  hasClass: hasClass,
  addClass: addClass,
  removeClass: removeClass,
  toggleClass: toggleClass,
  // short names
  has: hasClass,
  add: addClass,
  remove: removeClass,
  toggle: toggleClass
};

})( window );

jQuery( document ).ready( function( $ ) {
	
  var	Mgwprm = document.getElementById( 'mg-wprm-wrap' );
	var	wprm_menuDir = document.getElementById( 'wprMenu' );
	body = document.body;

  /**
  ----------------------------------------
  * 
  * Body slide from one side ( left, right or top )
  *
  ----------------------------------------
  **/
  if( jQuery('.wprmenu_bar').hasClass('bodyslide') )
    jQuery('body').addClass('cbp-spmenu-push');

	jQuery('.wprmenu_bar').click( function(e) {
		if( $(e.target).hasClass('bar_logo') )
			return;

		classie.toggle( this, 'active' );
		jQuery(this).find('div.hamburger').toggleClass('is-active');

		if( jQuery(this).hasClass('active') ) {
		  jQuery('html').addClass('wprmenu-body-fixed');

			if( wprmenu.enable_overlay == '1' ) {
			 jQuery('div.wprm-wrapper').find('.wprm-overlay').addClass('active');
			}
		}
		else {
			jQuery('html').removeClass('wprmenu-body-fixed');
			if( wprmenu.enable_overlay == '1' ) {
				jQuery('div.wprm-wrapper').find('.wprm-overlay').removeClass('active');
			}
		}

    /**
    ----------------------------------------
    * 
    * Right side body push
    *
    ----------------------------------------
    **/
		if ( !jQuery(this).hasClass('normalslide') && jQuery(this).hasClass('left')) {
			doc_width = jQuery(document).width() * (wprmenu.menu_width/100);
			push_width = (wprmenu.push_width != '' && wprmenu.push_width < doc_width) ? wprmenu.push_width : doc_width;
			classie.toggle(body, 'cbp-spmenu-push-toright');
			
      if( jQuery('body').hasClass('cbp-spmenu-push-toright') )
				jQuery('body').css('left', push_width + 'px');
			else
				$('body').css('left','0px');
		}

		 /**
    ----------------------------------------
    * 
    * Left side body push
    *
    ----------------------------------------
    **/
		if ( !jQuery(this).hasClass('normalslide') && jQuery(this).hasClass('right')) {
			doc_width = jQuery(document).width() * (wprmenu.menu_width/100);
			push_width = (wprmenu.push_width != '' && wprmenu.push_width < doc_width) ? wprmenu.push_width : doc_width;
			classie.toggle(body, 'cbp-spmenu-push-toleft');
			
      if( jQuery('body').hasClass('cbp-spmenu-push-toleft') )
				jQuery('body').css('left','-'+push_width+'px');
			else
				jQuery('body').css('left','0px');
		}
		classie.toggle(Mgwprm, 'cbp-spmenu-open');

		close_sub_uls();

	});

  /**
  -------------------------------------------------------------
  * 
  * Fix the scaling issue by adding/replacing viewport metatag
  *
  -------------------------------------------------------------
  **/
  var mt = $('meta[name=viewport]');
  mt = mt.length ? mt : $('<meta name="viewport" />').appendTo('head');
  if(wprmenu.zooming == 0) {
    mt.attr('content', 'user-scalable=no, width=device-width, maximum-scale=1, minimum-scale=1');
  } else {
    mt.attr('content', 'user-scalable=yes, width=device-width, initial-scale=1.0, minimum-scale=1');
  }

	/**
  ----------------------------------------
  * 
  * Click on body to remove the menu
  *
  ----------------------------------------
  **/
  $('body').click( function( event ) {
    if ( $( '#wprmenu_bar' ).hasClass( 'active' ) ) {
      $('#wprmenu_bar .wprmenu_icon').addClass('open');
    } 
    else {
      $('#wprmenu_bar .wprmenu_icon').removeClass('open');
    }
  });

	var menu = jQuery('#mg-wprm-wrap');
	var menu_ul = jQuery('#wprmenu_menu_ul'); //the menu ul

	jQuery(document).mouseup(function (e) {
		if ( ($(e.target).hasClass('wprmenu_bar') || $(e.target).parents('.wprmenu_bar').length == 0) && 
			($(e.target).hasClass('cbp-spmenu') || $(e.target).parents('.cbp-spmenu').length == 0)) {
    		if(menu.is(':visible') ) {
				$('.hamburger.is-active').trigger('click');
			}
		}
	});

	//add arrow element to the parent li items and chide its child uls
	menu.find('ul.sub-menu').each(function() {
		var sub_ul = $(this),
		parent_a = sub_ul.prev('a'),
		parent_li = parent_a.parent('li').first();

		parent_a.addClass('wprmenu_parent_item');
		parent_li.addClass('wprmenu_parent_item_li');

		var expand = parent_a.before('<span class="wprmenu_icon wprmenu_icon_par icon_default"></span> ').find('.wprmenu_icon_par');
		sub_ul.hide();
	});


	//expand / collapse action (SUBLEVELS)
	$('.wprmenu_icon_par').on('click',function() {
		var t = $(this),
		child_ul = t.parent('li').find('ul.sub-menu').first();
		child_ul.slideToggle('300');
		t.toggleClass('wprmenu_par_opened');
		t.parent('li').first().toggleClass('wprmenu_no_border_bottom');
	});

	//helper - close all submenus when menu is hiding
	function close_sub_uls() {
		menu.find('ul.sub-menu').each(function() {
			var ul = $(this),
			icon = ul.parent('li').find('.wprmenu_icon_par'),
			li = ul.parent('li');

			if(ul.is(':visible')) ul.slideUp(300);
			icon.removeClass('wprmenu_par_opened');
			li.removeClass('wprmenu_no_border_bottom');
		});
	}

	//submenu opened
	function open_sub_uls() {
		menu.find('ul.sub-menu').each(function() {
			var ul = $(this),
			icon = ul.parent('li').find('.wprmenu_icon_par'),
			li = ul.parent('li');

			ul.slideDown(300);
			icon.removeClass('wprmenu_par_opened');
			icon.addClass('wprmenu_par_opened');
		});
	}

	if( menu.hasClass('cbp-spmenu-top') && $('body').hasClass('cbp-spmenu-push') ){
		$('body').prepend(menu);
		//show / hide the menu
		$('#wprmenu_bar,#custom_menu_icon').on('click', function(e) {
			if( $(e.target).hasClass('bar_logo') )
				return;
			//scroll window top
			$("html, body").animate({ scrollTop: 0 }, 300);

			close_sub_uls();
			menu.stop(true, false).slideToggle(300);
		});
	}
	if( wprmenu.parent_click == 'yes' ) {
		$('a.wprmenu_parent_item').on('click', function(e){
			e.preventDefault();
			$(this).prev('.wprmenu_icon_par').trigger('click');
		});
	}
	$('#wprmenu_menu_ul a').click(function(){
		if( wprmenu.parent_click !='yes' || (wprmenu.parent_click == 'yes' && !$(this).hasClass('wprmenu_parent_item')) )
			$('.hamburger.is-active').trigger('click');
	});


  /**
  ----------------------------------------
  * 
  * Swipe Enable Function
  *
  ----------------------------------------
  **/
	if( wprmenu.swipe == 'yes' ) {
    jQuery('body').swipe({
      excludedElements: "button, input, select, textarea, .noSwipe",
      threshold: 200,
      swipe:function(event, direction, distance, duration, fingerCount, fingerData) {
        menu_el = $('.wprmenu_bar .hamburger, .wprmenu_bar .wpr-custom-menu');
        if( direction =='left' && menu_el.hasClass('is-active') )
          menu_el.trigger('click');
        
        if( direction =='right' && !menu_el.hasClass('is-active') )
          menu_el.trigger('click');
        }
    });
  }

  function toggle_sub_uls($action) {
    $('#mg-wprm-wrap').find('ul.sub-menu').each(function() {
      var ul = $(this),
      icon = ul.parent('li').find('.wprmenu_icon_par'),
      li = ul.parent('li');

      if( $action == 'open' ) {
        ul.slideDown(300);
        icon.removeClass( wprmenu.submenu_open_icon ).addClass( wprmenu.submenu_close_icon );
      }
      else {
        if(ul.is(':visible')) ul.slideUp(300);
        icon.removeClass( wprmenu.submenu_close_icon ).addClass( wprmenu.submenu_open_icon );
        li.removeClass('wprmenu_no_border_bottom');
      }
      
    });
  }

});
// source --> https://parkpets.ie/wp-content/plugins/gravityforms/js/placeholders.jquery.min.js?ver=2.4.24&#039; defer onload=&#039; 
/* Placeholders.js v3.0.2 */
(function(t){"use strict";function e(t,e,r){return t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent?t.attachEvent("on"+e,r):void 0}function r(t,e){var r,n;for(r=0,n=t.length;n>r;r++)if(t[r]===e)return!0;return!1}function n(t,e){var r;t.createTextRange?(r=t.createTextRange(),r.move("character",e),r.select()):t.selectionStart&&(t.focus(),t.setSelectionRange(e,e))}function a(t,e){try{return t.type=e,!0}catch(r){return!1}}t.Placeholders={Utils:{addEventListener:e,inArray:r,moveCaret:n,changeType:a}}})(this),function(t){"use strict";function e(){}function r(){try{return document.activeElement}catch(t){}}function n(t,e){var r,n,a=!!e&&t.value!==e,u=t.value===t.getAttribute(V);return(a||u)&&"true"===t.getAttribute(P)?(t.removeAttribute(P),t.value=t.value.replace(t.getAttribute(V),""),t.className=t.className.replace(R,""),n=t.getAttribute(z),parseInt(n,10)>=0&&(t.setAttribute("maxLength",n),t.removeAttribute(z)),r=t.getAttribute(D),r&&(t.type=r),!0):!1}function a(t){var e,r,n=t.getAttribute(V);return""===t.value&&n?(t.setAttribute(P,"true"),t.value=n,t.className+=" "+I,r=t.getAttribute(z),r||(t.setAttribute(z,t.maxLength),t.removeAttribute("maxLength")),e=t.getAttribute(D),e?t.type="text":"password"===t.type&&K.changeType(t,"text")&&t.setAttribute(D,"password"),!0):!1}function u(t,e){var r,n,a,u,i,l,o;if(t&&t.getAttribute(V))e(t);else for(a=t?t.getElementsByTagName("input"):f,u=t?t.getElementsByTagName("textarea"):h,r=a?a.length:0,n=u?u.length:0,o=0,l=r+n;l>o;o++)i=r>o?a[o]:u[o-r],e(i)}function i(t){u(t,n)}function l(t){u(t,a)}function o(t){return function(){b&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(P)?K.moveCaret(t,0):n(t)}}function c(t){return function(){a(t)}}function s(t){return function(e){return A=t.value,"true"===t.getAttribute(P)&&A===t.getAttribute(V)&&K.inArray(C,e.keyCode)?(e.preventDefault&&e.preventDefault(),!1):void 0}}function d(t){return function(){n(t,A),""===t.value&&(t.blur(),K.moveCaret(t,0))}}function v(t){return function(){t===r()&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(P)&&K.moveCaret(t,0)}}function g(t){return function(){i(t)}}function p(t){t.form&&(T=t.form,"string"==typeof T&&(T=document.getElementById(T)),T.getAttribute(U)||(K.addEventListener(T,"submit",g(T)),T.setAttribute(U,"true"))),K.addEventListener(t,"focus",o(t)),K.addEventListener(t,"blur",c(t)),b&&(K.addEventListener(t,"keydown",s(t)),K.addEventListener(t,"keyup",d(t)),K.addEventListener(t,"click",v(t))),t.setAttribute(j,"true"),t.setAttribute(V,x),(b||t!==r())&&a(t)}var f,h,b,m,A,y,E,x,L,T,S,N,w,B=["text","search","url","tel","email","password","number","textarea"],C=[27,33,34,35,36,37,38,39,40,8,46],k="#ccc",I="placeholdersjs",R=RegExp("(?:^|\\s)"+I+"(?!\\S)"),V="data-placeholder-value",P="data-placeholder-active",D="data-placeholder-type",U="data-placeholder-submit",j="data-placeholder-bound",q="data-placeholder-focus",Q="data-placeholder-live",z="data-placeholder-maxlength",F=document.createElement("input"),G=document.getElementsByTagName("head")[0],H=document.documentElement,J=t.Placeholders,K=J.Utils;if(J.nativeSupport=void 0!==F.placeholder,!J.nativeSupport){for(f=document.getElementsByTagName("input"),h=document.getElementsByTagName("textarea"),b="false"===H.getAttribute(q),m="false"!==H.getAttribute(Q),y=document.createElement("style"),y.type="text/css",E=document.createTextNode("."+I+" { color:"+k+"; }"),y.styleSheet?y.styleSheet.cssText=E.nodeValue:y.appendChild(E),G.insertBefore(y,G.firstChild),w=0,N=f.length+h.length;N>w;w++)S=f.length>w?f[w]:h[w-f.length],x=S.attributes.placeholder,x&&(x=x.nodeValue,x&&K.inArray(B,S.type)&&p(S));L=setInterval(function(){for(w=0,N=f.length+h.length;N>w;w++)S=f.length>w?f[w]:h[w-f.length],x=S.attributes.placeholder,x?(x=x.nodeValue,x&&K.inArray(B,S.type)&&(S.getAttribute(j)||p(S),(x!==S.getAttribute(V)||"password"===S.type&&!S.getAttribute(D))&&("password"===S.type&&!S.getAttribute(D)&&K.changeType(S,"text")&&S.setAttribute(D,"password"),S.value===S.getAttribute(V)&&(S.value=x),S.setAttribute(V,x)))):S.getAttribute(P)&&(n(S),S.removeAttribute(V));m||clearInterval(L)},100)}K.addEventListener(t,"beforeunload",function(){J.disable()}),J.disable=J.nativeSupport?e:i,J.enable=J.nativeSupport?e:l}(this),function(t){"use strict";var e=t.fn.val,r=t.fn.prop;Placeholders.nativeSupport||(t.fn.val=function(t){var r=e.apply(this,arguments),n=this.eq(0).data("placeholder-value");return void 0===t&&this.eq(0).data("placeholder-active")&&r===n?"":r},t.fn.prop=function(t,e){return void 0===e&&this.eq(0).data("placeholder-active")&&"value"===t?"":r.apply(this,arguments)})}(jQuery);
// source --> https://parkpets.ie/wp-content/cache/jch-optimize/js/9e1ccf3c292aa37bab1e6cffc62820a3.js 
try {
!function(t,e,i,o){t.fn.doubleTapToGo=function(o){return"ontouchstart"in e||e.navigator.msPointerEnabled||navigator.userAgent.toLowerCase().match(/windows phone os 7/i)?(this.each(function(){var e=!1;t(this).on("click",function(i){var o=t(this);o[0]!=e[0]&&(i.preventDefault(),e=o)}),t(i).on("click touchstart MSPointerDown",function(i){for(var o=!0,r=t(i.target).parents(),a=0;a<r.length;a++)r[a]==e[0]&&(o=!1);o&&(e=!1)})}),this):!1}}(jQuery,window,document),function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null};if(!document.getElementById("fit-vids-style")){var o=document.head||document.getElementsByTagName("head")[0],r=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",a=document.createElement("div");a.innerHTML='<p>x</p><style id="fit-vids-style">'+r+"</style>",o.appendChild(a.childNodes[1])}return e&&t.extend(i,e),this.each(function(){var e=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];i.customSelector&&e.push(i.customSelector);var o=t(this).find(e.join(","));o=o.not("object object"),o.each(function(){var e=t(this);if(!("embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){var i="object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height(),o=isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10),r=i/o;if(!e.attr("id")){var a="fitvid"+Math.floor(999999*Math.random());e.attr("id",a)}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*r+"%"),e.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto);
} catch (e) {
console.error('Error in file:https://parkpets.ie/wp-content/themes/canvas/includes/js/third-party.min.js?ver=6.5.7&#039; defer onload=&#039;; Error:' + e.message);
};
try {
jQuery(document).ready(function(){jQuery(".widget_video, .panel, .video").fitVids(),window.innerWidth<768&&jQuery(".entry").fitVids(),jQuery("ul.sub-menu, ul.children").parent("li").addClass("parent"),navigator.userAgent.match(/Android/i)&&window.innerWidth>=768&&jQuery(".nav li:has(ul)").doubleTapToGo(),jQuery(".nav-toggle").click(function(e){e.preventDefault(),jQuery("body").toggleClass("show-nav"),jQuery("#navigation").find(".top-navigation").size()||jQuery("#navigation").find(".top-menu").size()||(jQuery("#top .top-menu").clone().appendTo("#navigation .menus"),jQuery("#top .top-navigation").clone().appendTo("#navigation .menus"))}),jQuery(".nav-close").click(function(e){e.preventDefault(),jQuery("body").removeClass("show-nav")});var e=function(e,t){if(e)do{if(e.id===t)return!0;if(9===e.nodeType)break}while(e=e.parentNode);return!1};jQuery(window).width()<767&&(jQuery("body")[0].addEventListener?document.addEventListener("touchstart",function(t){jQuery("body").hasClass("show-nav")&&!e(t.target,"navigation")&&(t.preventDefault(),jQuery("body").removeClass("show-nav"))},!1):jQuery("body")[0].attachEvent&&document.attachEvent("ontouchstart",function(t){jQuery("body").hasClass("show-nav")&&!e(t.target,"navigation")&&(t.preventDefault(),jQuery("body").removeClass("show-nav"))})),jQuery("body").hasClass("has-lightbox")&&!jQuery("body").hasClass("portfolio-component")&&(jQuery('a[href$=".jpg"], a[href$=".jpeg"], a[href$=".gif"], a[href$=".png"]').each(function(){var e="";if(jQuery(this).next().hasClass("wp-caption-text")&&(e=jQuery(this).next().text()),""!==e&&jQuery(this).attr("title",e),jQuery(this).parents(".gallery").length){var t=jQuery(this).parents(".gallery").attr("id");jQuery(this).attr("rel","lightbox["+t+"]")}else jQuery(this).attr("rel","lightbox")}),jQuery('a[rel^="lightbox"]').prettyPhoto({social_tools:!1}))});
} catch (e) {
console.error('Error in file:https://parkpets.ie/wp-content/themes/canvas/includes/js/general.min.js?ver=6.5.7&#039; defer onload=&#039;; Error:' + e.message);
};