Al final lo resolvi asi, me parece un poco tosco pero me funciona por el momento! gracias gente!
Código Javascript
:
Ver original<script>
window.onload=function(){
img = document.getElementsByClassName("width-hor")
for(i=0;i<img.length;i++){
widthHor=img[i].width;
countHor = img.length;
totalHor = widthHor * countHor;
}
img = document.getElementsByClassName("width-ver")
for(i=0;i<img.length;i++){
widthVer=img[i].width;
countVer = img.length;
totalVer = widthVer * countVer;
}
totalWidth = totalVer + totalHor;
alert(totalWidth);
$('.content-item').css({width: totalWidth + 'px'})
}
</script>