$(document).ready(function() {   
     $(".dropdown").each(function () {
          $(this).parent().eq(0).hover(function () {
               $(".dropdown:eq(0)", this).show();
               $(this).addClass("nav_hover");
          }, function () {
          $(".dropdown:eq(0)", this).hide();
           $(this).removeClass("nav_hover");
           
         });
     });
     
     $('#print-page, .print-page').click(function() {
	     var contentDivs = ['div#scrollercon div#lyr1', 'div.content', 'div#main'];
	     for (i=0; i<contentDivs.length; i++) {
		 if ($(contentDivs[i]).size() > 0) {
		     $(contentDivs[i]).printArea({mode: 'popup', strict: true, popWd: 1000});
		     break;
		 }
	     }
	    //$('div#main').printArea({mode: 'popup', strict: true, popWd: 1000});
     });

     $('#share-page').click(function() {
         var subject = 'Someone wants to share a link with you: ' + document.location;
         var body = "Someone you know thought you'd be interested in receiving this link from Dysport.com. Click on this link to learn more: " + document.location;
         var mailtoUrl = 'mailto:?Subject='+subject + '&Body=' + escape(body);
         document.location = mailtoUrl;
         
     });

     $('a').click(function() {
	     if($(this).attr('href').match(/^http/)) {
		 return confirm('Please be advised that you are leaving www.dysport.com.');
	     } else if ((window.location.href.match(/\/hcp/)==null) && (this.href.match(/\/hcp/) != null)) {
		 return confirm('This site contains information for licensed healthcare professionals in the United States. By entering this website you acknowledge that you are a licensed healthcare professional practicing in the United States.');
	     } else {
		 return true;
	     }
	 });
     
    

    
});




