+ var initialElem = $('.play', $root).first();
+ var initialTime = 0;
+ if (Modernizr.localstorage) {
+ audiobooks = JSON.parse(localStorage["audiobook-history"]);
+ last = audiobooks[$root.attr("data-book-id")]
+ if (last) {
+ initialElem = $('[data-media-id="' + last[1] + '"] .play', $root).first();
+ initialTime = last[2];
+ }
+ }
+ setMedia(initialElem, initialTime);
+ },