Background image support and changes to the order and comparisons of the...

Added background image support
Altered the ifs to reduce jquery data calls.
Added a size undefined in case all options have not been added.