jQuery(document).ready(function($){ 
      
      jQuery("div.ngg-gallery-thumbnail").each(function(i) {
        jQuery(this).addClass("bullet" + i);
      }); 
    
      jQuery
        ("div.ngg-gallery-thumbnail img").before("<span></span>");
      
      jQuery.each(jQuery.browser, function(i) {
        if($.browser.msie){
          jQuery(function(){
            jQuery(".ngg-gallery-thumbnail a span")		
    		    .mouseover(function(){
              $(this).stop().animate({opacity: "0"}, 400)             
            })
            .mouseout(function(){
              
            }) 	
          });                    
        }else{
          jQuery(function(){
            jQuery(".ngg-gallery-thumbnail a span")		
    		    .mouseover(function(){
              $(this).stop().animate({opacity: "0"}, 500)              
            })
            .mouseout(function(){
              $(this).stop().animate({opacity: "1.0"}, 300)
            }) 	
          });
         }
      });        
      
      jQuery.fn.safe_mail = function(username, domain_name, domain_ext, link_text) {
      	if(link_text) {
      		link_txt = link_text;
      	} else {
      		link_txt = "link"	
      	}
      	
      	// If no link text(link_txt) is specified, or if the user explicitally sets link_txt to "link"
      	if(link_txt == "link") {
      		// Use the link its self as the link text
      		mail_link = "<a " + "href" + "=" + "'mail" + "to" + ":" + username + "@" + domain_name + "." + domain_ext +"'>" + username + "@" + domain_name + "." + domain_ext +"</a>";
      	} else {
      		// Otherwise use the user provided link text
      		mail_link = "<a " + "href" + "=" + "'mail" + "to" + ":" + username + "@" + domain_name + "." + domain_ext +"'>" + link_txt +"</a>";
      	}
      	
      	$(this).append(mail_link);
      };
      
      $('#emailLink').safe_mail("ashlea", "revolverphotography", "com");

           
    });       