Changed all the attr('data-... to data('...

Instead of accessing the `data-..` attributes with the `.attr()` everywhere changed to use the `.data()`