
// CK add hspace and align attributes for padding
// this js gets CK editors image attributes and corrects it with CSS

// aligned left -> add margin right
jQuery.fn.MCMSimageLeft = function() {
	var myMargin = $(this).attr('hspace');
	var myCss = 'margin-right:' + myMargin + 'px;';
	$(this).attr('style', myCss);
}
//aligned right -> add margin left
jQuery.fn.MCMSimageRight = function() {
	var myMargin = $(this).attr('hspace');
	var myCss = 'margin-left:' + myMargin + 'px;';
	$(this).attr('style', myCss);
}



$(document).ready(function(){
	$('#content img[align=left]').MCMSimageLeft();
	$('#content img[align=right]').MCMSimageRight();
	
});
