/*
function initHeight(){

	var _width = 1000;
/*	
	$(".menu ul>li").mouseover(function() {
	    $('.drop.dropdown-active').slideUp();
		$(this).siblings('li').removeClass('current-menu-item');

		$(this).addClass('current-menu-item');
		$(this).find('.drop').not('.dropdown-active').slideDown().addClass('dropdown-active');
		
		if (window.innerHeight) {
			_width = window.innerWidth;
		}
		else {
			_width = document.documentElement.clientWidth;
		};
		
		if( _width > 1000 ){
			$(this).find('.drop').css('width', _width );
			$(this).find('.drop').css('left', -((_width - 1000)/2)-76);
		}		
		
	  }
	);	
// -------- separated 
                var fixDropSize = function($el)
                {
                        _width = $(window).width();

                        if( _width > 1000 ){
                                $el.css({ 
                                    'width': _width,
                                    'left': - $('.menu').offset().left+'px'
                            });
                        }
                };
                
                var cleanup = function()
                {
                    $('.drop.dropdown-active:not(:visible)').hide();
                }
                
	$('.menu>ul>li').bind('mouseenter' , function(evnt){
//		$('.drop.dropdown-active').slideUp();
                                var $me = $(this)
                                $me.addClass('current-menu-item');
                                var sibl = $me.siblings('li').removeClass('current-menu-item').find('.drop.dropdown-active');
                                if(sibl.size())
                                {
                                    sibl.slideUp('normal', function(){
                                        $(this).removeClass('dropdown-active')
                                        $me.find('.drop').addClass('dropdown-active').slideDown();
                                    });
                                }
                                else
                                {
                                    $me.find('.drop').slideDown().addClass('dropdown-active');
                                }
                                
                                fixDropSize($me.find('.drop'));
	});
	$('.menu>ul').bind('mouseleave' , function(evnt){
                                $('li', this).removeClass('current-menu-item');
                                $('li .drop.dropdown-active:not(:animated)',this).slideUp().removeClass('dropdown-active');
	});

	
	$('.menu .btn-close').click(function(e){
                    $('.menu').find('.drop.dropdown-active').slideUp();
                    $('.menu').find('li.current-menu-item').removeClass('current-menu-item');
                    e.preventDefault();
	});
	
	$(window).resize(function(){ fixDropSize($('.drop')); });
};
*/

function initHeight(){

	var _width = 1000;

	$('.menu>ul>li>a').click(function(event){

		event.preventDefault();
		
		if ($(this).parent().hasClass('active')) {
		
			$(this).parent().removeClass('active');
			$(this).parent().find('.drop').slideUp();
		}
		else {
			
			$('.menu').find('.drop').slideUp();
			$('.menu').find('.active').removeClass('active');
			
			$(this).parent().addClass('active');
			$(this).parent().find('.drop').slideDown();
			
			if (window.innerHeight) {
				_width = window.innerWidth;
			}
			else {
				_width = document.documentElement.clientWidth;
				
				//_width = $(document).width();
			};
			
			if( _width > 1000 ){
				$(this).parent().find('.drop').css('width', _width );
				$(this).parent().find('.drop').css('left', -((_width - 1000)/2)-53);
			}
		}
		
		return false
	});
	$('.menu .btn-close').click(function(){
		$('.menu').find('.drop').slideUp();
		$('.menu').find('li.active').removeClass('active');
		return false
	});
	
	$(window).resize(function(){
		if (window.innerHeight) {
			_width = window.innerWidth;
			}
		else {
			_width = document.documentElement.clientWidth;
		}
		if( _width > 1000 ){
			$('.drop').css('width', _width );
			$('.drop').css('left', -((_width - 1000)/2)-53);
		}
	});
	
	
};

	
$(document).ready(function(){
	initHeight();
  $('#ppmainmenu-3').appendTo('#menu-item-1138 .pp_desc');
  $('#ppmainmenu-4').appendTo('#menu-item-1143 .pp_desc');
  $('#ppmainmenu-5').appendTo('#menu-item-1159 .pp_desc');
  $('#ppmainmenu-6').appendTo('#menu-item-1164 .pp_desc');
  $('#ppmainmenu-7').appendTo('#menu-item-1169 .pp_desc');
  $('#ppmainmenu-8').appendTo('#menu-item-1174 .pp_desc');
});

function isValidEmailAddress(emailAddress) {
var pattern = new RegExp(/^(("[\w-+\s]+")|([\w-+]+(?:\.[\w-+]+)*)|("[\w-+\s]+")([\w-+]+(?:\.[\w-+]+)*))(@((?:[\w-+]+\.)*\w[\w-+]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
return pattern.test(emailAddress);
};


