1
2
3
4
5
6
7
$('a').each(function(){
	if(this.href.match(/\.(jpe?g|png|bmp|gif|tiff?)$/i) && ( !$(this).hasClass('primeGalleriesLink')) && ( !$(this).parent().hasClass('ngg-gallery-thumbnail') ) ) {
		if( $(this).attr('rel') != 'prettyPhoto[gallery]' ){	
			$(this).attr('rel', 'prettyPhoto');
		}
	}
})