I have the following script which checks for varying sizes of an image every time the carousel loads the item and based on its size applies a class. It works for all images but one string within the function.

The string that isn't being read:

```
  if (img.width() == '728' && img.height() == '90' || img.width() == '468' && img.height() == '60') {
      img.addClass('tops');
    }

```

The script:

```
$("#carousel-container-mobile, #carousel-container-desktop").on('slid.bs.carousel', function() {
  var imgs = $('.item');
  $(imgs).each(function() {
    var img = $('img', this);
    if (img.width() == '320' && img.height() == '50' || img.width() == '300' && img.height() == '50') {
      img.addClass('top');
    }
    if (img.width() == '728' && img.height() == '90' || img.width() == '468' && img.height() == '60') {
      img.addClass('tops');
    }
    if (img.width() == '300' && img.height() == '250') // 300 x 250
    {
      img.addClass('mid');
    }
    if (img.width() == '120' && img.height() == '600' || img.width() == '160' && img.height() == '600') // 120 x 600
    {
      img.addClass('right');
    }
  });

});

```

All of other images sizes work, but these? not sure why. The syntax seems to be correct, but I feel as it's the markup of the `if` statements?

Fiddle:
<http://jsfiddle.net/r2wLz6xr/11/>