// is the DOM fully loaded?

jQuery(document).ready(function(){
	
 
 // BEGIN - wrap a Link around the Widget Title +++++++++++++++++++++++++++++++++
 
  // GALLERY Widget
 jQuery("div.ngg_images h2").each(function() { 
        var src = "http://www.changdiving.com/wp-content/gallery/"; 
        var a = jQuery('<a/>').attr('href', src).addClass("widget-link-gallery"); 
        jQuery(this).wrap(a); 
        jQuery(this).remove();
 }); 
    
 jQuery('a.widget-link-gallery').append("Gallery");
 
  // GUESTBOOK Widget  
 jQuery("#dmsguestbook h2.widget-title").each(function() { 
        var src = "http://www.changdiving.com/wp-content/guestbook/"; 
        var a = jQuery('<a/>').attr('href', src).addClass("widget-link-guestbook"); 
        jQuery(this).wrap(a); 
        jQuery(this).remove();
 }); 
    
 jQuery('a.widget-link-guestbook').append("Guestbook");
    
// END - wrap a Link around the Widget Title +++++++++++++++++++++++++++++++++
	
	jQuery(".scdc_pic_l, .scdc_pic_r").wrap("<span>");
		  
	  
	// add the class to the parent a-tag for Highsliding
		
	jQuery("span.scdc_pic_l, span.scdc_pic_r").parent().addClass("scdc_pic_a");
	  
  
	// wrap the span-tag around the album-link --> see css for ngg-span !!
	
	jQuery(".ngg-album-link a").prepend("<span></span>");
	
	jQuery('div').removeClass('ngg-gallery-thumbnail-box')

}); // end jQuery(document).ready(function()
