
jQuery(document).ready(function($){
//show/hide the drop down menu



$("ul#subMenu").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)  
  
    $("li.page-item-17").hover(function() { //When trigger is clicked...  
  
        //Following events are applied to the subnav itself (moving subnav up and down)  
        $(this).parent().find("ul#subMenu").show(); //show the subnav on click  
  
        $(this).parent().hover(function() {  
        }, function(){  
            $(this).parent().find("ul#subMenu").hide(); //When the mouse hovers out of the subnav, hide it 
        });  
  
        //Following events are applied to the trigger (Hover events for the trigger)  
        }).hover(function() {  
            $(this).addClass("subhover"); //On hover over, add class "subhover"  
        }, function(){  //On Hover Out  
            $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
    });  
					
								
$('input[name="emma_member_name_first"]').val('First Name *');
$('input[name="emma_member_name_last"]').val('Last Name *');
$('input[name="emma_member_email"]').val('Email *');
$('input[name="emma_member_city"]').val('City');
$('select[name="emma_member_country"]').val('United States')



$('.e2ma_signup_form_label').remove();




//show and hide social tabs

$("#tabSwitch").hide();
$("#facebook-feed").hide();


$("#facebook-friends-OFF").click(function() {
$("#twitter-feed").hide();
$("#tabDefault").hide();
$("#facebook-feed").show();
$("#tabSwitch").show();
  return false;
});


$("#twitter-feed-OFF").click(function() {
$("#twitter-feed").show();
$("#tabDefault").show();
$("#facebook-feed").hide();
$("#tabSwitch").hide();
  return false;
});


$("#facebook-friends-ON").click(function() {
  return false;
});
$("#twitter-feed-ON").click(function() {
  return false;
});

$("a[rel=external]").attr('target', '_blank');

$('.single article img').each(function(){ //remove image height and width
	$(this).removeAttr('width')
	$(this).removeAttr('height');
});


$('a').each(function() {
   var a = new RegExp('/' + window.location.host + '/');
   if(!a.test(this.href)) {
       $(this).click(function(event) {
           event.preventDefault();
           event.stopPropagation();
           window.open(this.href, '_blank');
       });
   }
});
  
});
