jQuery(document).ready(function(){
if(jQuery('#content.page').length==0)
{
fixThumbs();
}
else if(jQuery('#content.page').length==1)
{
fixPage();
}
function fixThumbs() {

var allImages = jQuery('#contentin .post img');
allImages.each(function () { 

	jQuery(this).error(function () {

	//alert(jQuery(this).attr('src'));
	jQuery(this).attr('src', '/design/no-thumb.jpg'); 
	});


});
if (jQuery('.ngg-gallery-thumbnail-box').length>0)
{
	var gallImages = jQuery('.ngg-galleryoverview img');
	gallImages.each(function() {

		jQuery(this).error(function () {

		jQuery(this).attr('src', '/design/no-thumb.jpg').hide('fast');
		});
	});
}
//alert('works');
}
function fixPage() { 

if (jQuery('.post p img').length>0)
{
var postImages = jQuery('.post p img');
postImages.each(function() {

	jQuery(this).error(function () {

	jQuery(this).attr('src', '/design/no-image.jpg'); 
	});
});
}

if (jQuery('#ngg-gallery img').length>0)
{

var allImages = jQuery('#ngg-gallery img');
allImages.each(function () { 

	jQuery(this).error(function () {
	
	jQuery(this).hide();//attr('src', 'design/no-thumb.jpg'); 
	
	});


});

}


}
 });

