Added conditional width

In early versions of jQuery the $(window).width() could return a 0 value.
This tries every combination of width detection to get a proper width value.
See:
http://bugs.jquery.com/ticket/12618
Merge branch 'patch-1' of https://github.com/TeckniX/prettyphoto
See https://github.com/scaron/prettyphoto/pull/119 for more info