From 45561c41014e989608a3a2032e0f34d6c009a29e Mon Sep 17 00:00:00 2001 From: Buster Neece Date: Mon, 24 Feb 2014 04:01:28 -0600 Subject: [PATCH 1/2] MLPMA development! --- app/common/footer.phtml | 2 +- app/common/mlpma.phtml | 66 +- app/layouts/mlpma.phtml | 29 +- .../PVL/Controller/Action/Mlpma.php | 6 +- app/library_local/PVL/MusicManager.php | 4 +- app/models/Entity/ArchiveArtist.php | 0 app/models/Entity/ArchiveGenre.php | 11 +- .../mlpma/controllers/IndexController.php | 9 +- .../mlpma/views/scripts/artist/index.phtml | 2 +- .../mlpma/views/scripts/index/index.phtml | 48 +- .../mlpma/views/scripts/index/index2.phtml | 33 + .../mlpma/views/scripts/index/test.phtml | 49 - app/modules/mlpma/views/scripts/songs.phtml | 8 +- web/static/common/bootstrap2_r2/layout.js | 3 +- web/static/crossdomain.xml | 4 + ...jquery.fullwidthAudioPlayer-responsive.css | 156 ++ .../fap/css/jquery.fullwidthAudioPlayer.css | 360 ++++ web/static/fap/html/popup.html | 94 + web/static/fap/images/black/next.png | Bin 0 -> 1208 bytes web/static/fap/images/black/pause.png | Bin 0 -> 1038 bytes web/static/fap/images/black/play.png | Bin 0 -> 1217 bytes web/static/fap/images/black/playlist.png | Bin 0 -> 962 bytes web/static/fap/images/black/previous.png | Bin 0 -> 1200 bytes web/static/fap/images/black/sc_logo_dark.png | Bin 0 -> 3354 bytes web/static/fap/images/black/shuffle.png | Bin 0 -> 1217 bytes web/static/fap/images/black/volume.png | Bin 0 -> 1200 bytes web/static/fap/images/fwap/next.png | Bin 0 -> 1208 bytes web/static/fap/images/fwap/pause.png | Bin 0 -> 1038 bytes web/static/fap/images/fwap/play.png | Bin 0 -> 1217 bytes web/static/fap/images/fwap/playlist.png | Bin 0 -> 962 bytes web/static/fap/images/fwap/previous.png | Bin 0 -> 1200 bytes web/static/fap/images/fwap/sc_logo_dark.png | Bin 0 -> 3354 bytes web/static/fap/images/fwap/shuffle.png | Bin 0 -> 1217 bytes web/static/fap/images/fwap/volume.png | Bin 0 -> 1200 bytes web/static/fap/images/white/next.png | Bin 0 -> 1091 bytes web/static/fap/images/white/pause.png | Bin 0 -> 940 bytes web/static/fap/images/white/play.png | Bin 0 -> 1054 bytes web/static/fap/images/white/playlist.png | Bin 0 -> 1024 bytes web/static/fap/images/white/previous.png | Bin 0 -> 1089 bytes web/static/fap/images/white/sc_logo_dark.png | Bin 0 -> 1952 bytes web/static/fap/images/white/shuffle.png | Bin 0 -> 1231 bytes web/static/fap/images/white/volume.png | Bin 0 -> 1236 bytes web/static/fap/js/amplify.min.js | 10 + web/static/fap/js/jquery-ui.js | 6 + .../fap/js/jquery.fullwidthAudioPlayer.js | 1851 +++++++++++++++++ .../fap/js/jquery.fullwidthAudioPlayer.min.js | 9 + web/static/fap/js/jquery.min.js | 4 + .../fap/js/soundmanager2-nodebug-jsmin.js | 81 + web/static/fap/swf/soundmanager2_flash9.swf | Bin 0 -> 8678 bytes web/static/fap/xml/playlist.xml | 16 + web/static/jplayer/clean/Jplayer.swf | Bin 0 -> 14085 bytes web/static/jplayer/clean/jplayer.cleanskin.js | 172 ++ web/static/jplayer/clean/jquery.jplayer.js | 95 + web/static/jplayer/clean/player.css | 83 + web/static/jplayer/clean/playerUI.light.png | Bin 0 -> 2744 bytes web/static/jplayer/clean/playerUI.png | Bin 0 -> 2709 bytes web/static/jplayer/clean/preimg.light.png | Bin 0 -> 3266 bytes web/static/jplayer/clean/preimg.png | Bin 0 -> 11780 bytes .../midnight.black/jplayer.midnight.black.css | 322 +-- .../jplayer.midnight.black.interface.png | Bin .../jplayer.midnight.black.playlist.png | Bin .../midnight.black/jplayer.midnight.black.png | Bin .../jplayer.midnight.black.seeking.gif | Bin .../jplayer.midnight.black.video.play.png | Bin .../morning.light/jplayer.morning.light.css | 705 +++++++ .../jplayer.morning.light.interface.png | Bin 0 -> 324 bytes .../jplayer.morning.light.playlist.png | Bin 0 -> 823 bytes .../morning.light/jplayer.morning.light.png | Bin 0 -> 34773 bytes .../jplayer.morning.light.seeking.gif | Bin 0 -> 3284 bytes .../jplayer.morning.light.video.play.png | Bin 0 -> 19197 bytes .../jplayer/premium-pixels/premium-pixels.css | 56 +- web/static/mlpma/custom.js | 66 + web/static/mlpma/jquery.ajaxify.js | 180 ++ web/static/mlpma/jquery.history.min.js | 1 + web/static/mlpma/jquery.scrollto.min.js | 7 + web/static/mlpma/mlpma_logo.png | Bin 50683 -> 50237 bytes 76 files changed, 4191 insertions(+), 357 deletions(-) create mode 100644 app/models/Entity/ArchiveArtist.php create mode 100644 app/modules/mlpma/views/scripts/index/index2.phtml delete mode 100644 app/modules/mlpma/views/scripts/index/test.phtml create mode 100644 web/static/crossdomain.xml create mode 100644 web/static/fap/css/jquery.fullwidthAudioPlayer-responsive.css create mode 100644 web/static/fap/css/jquery.fullwidthAudioPlayer.css create mode 100644 web/static/fap/html/popup.html create mode 100644 web/static/fap/images/black/next.png create mode 100644 web/static/fap/images/black/pause.png create mode 100644 web/static/fap/images/black/play.png create mode 100644 web/static/fap/images/black/playlist.png create mode 100644 web/static/fap/images/black/previous.png create mode 100644 web/static/fap/images/black/sc_logo_dark.png create mode 100644 web/static/fap/images/black/shuffle.png create mode 100644 web/static/fap/images/black/volume.png create mode 100644 web/static/fap/images/fwap/next.png create mode 100644 web/static/fap/images/fwap/pause.png create mode 100644 web/static/fap/images/fwap/play.png create mode 100644 web/static/fap/images/fwap/playlist.png create mode 100644 web/static/fap/images/fwap/previous.png create mode 100644 web/static/fap/images/fwap/sc_logo_dark.png create mode 100644 web/static/fap/images/fwap/shuffle.png create mode 100644 web/static/fap/images/fwap/volume.png create mode 100644 web/static/fap/images/white/next.png create mode 100644 web/static/fap/images/white/pause.png create mode 100644 web/static/fap/images/white/play.png create mode 100644 web/static/fap/images/white/playlist.png create mode 100644 web/static/fap/images/white/previous.png create mode 100644 web/static/fap/images/white/sc_logo_dark.png create mode 100644 web/static/fap/images/white/shuffle.png create mode 100644 web/static/fap/images/white/volume.png create mode 100644 web/static/fap/js/amplify.min.js create mode 100644 web/static/fap/js/jquery-ui.js create mode 100644 web/static/fap/js/jquery.fullwidthAudioPlayer.js create mode 100644 web/static/fap/js/jquery.fullwidthAudioPlayer.min.js create mode 100644 web/static/fap/js/jquery.min.js create mode 100644 web/static/fap/js/soundmanager2-nodebug-jsmin.js create mode 100644 web/static/fap/swf/soundmanager2_flash9.swf create mode 100644 web/static/fap/xml/playlist.xml create mode 100644 web/static/jplayer/clean/Jplayer.swf create mode 100644 web/static/jplayer/clean/jplayer.cleanskin.js create mode 100644 web/static/jplayer/clean/jquery.jplayer.js create mode 100644 web/static/jplayer/clean/player.css create mode 100644 web/static/jplayer/clean/playerUI.light.png create mode 100644 web/static/jplayer/clean/playerUI.png create mode 100644 web/static/jplayer/clean/preimg.light.png create mode 100644 web/static/jplayer/clean/preimg.png mode change 100755 => 100644 web/static/jplayer/midnight.black/jplayer.midnight.black.css mode change 100755 => 100644 web/static/jplayer/midnight.black/jplayer.midnight.black.interface.png mode change 100755 => 100644 web/static/jplayer/midnight.black/jplayer.midnight.black.playlist.png mode change 100755 => 100644 web/static/jplayer/midnight.black/jplayer.midnight.black.png mode change 100755 => 100644 web/static/jplayer/midnight.black/jplayer.midnight.black.seeking.gif mode change 100755 => 100644 web/static/jplayer/midnight.black/jplayer.midnight.black.video.play.png create mode 100644 web/static/jplayer/morning.light/jplayer.morning.light.css create mode 100644 web/static/jplayer/morning.light/jplayer.morning.light.interface.png create mode 100644 web/static/jplayer/morning.light/jplayer.morning.light.playlist.png create mode 100644 web/static/jplayer/morning.light/jplayer.morning.light.png create mode 100644 web/static/jplayer/morning.light/jplayer.morning.light.seeking.gif create mode 100644 web/static/jplayer/morning.light/jplayer.morning.light.video.play.png create mode 100644 web/static/mlpma/custom.js create mode 100644 web/static/mlpma/jquery.ajaxify.js create mode 100644 web/static/mlpma/jquery.history.min.js create mode 100644 web/static/mlpma/jquery.scrollto.min.js diff --git a/app/common/footer.phtml b/app/common/footer.phtml index a65ce30ca..4909939bf 100644 --- a/app/common/footer.phtml +++ b/app/common/footer.phtml @@ -19,7 +19,7 @@ $affiliates = array( 'name' => 'PonyMC', 'description' => 'A Ponyville Live! Minecraft Partner', 'url' => 'http://ponymc.com/', - 'image' => \DF\Url::content('affiliates/ponymc.png'), + 'image' => '//ponymc.com/img/logos/random_logo.php?width=150&height=150', // \DF\Url::content('affiliates/ponymc.png'), ), array( diff --git a/app/common/mlpma.phtml b/app/common/mlpma.phtml index c5e42287e..1de121b16 100644 --- a/app/common/mlpma.phtml +++ b/app/common/mlpma.phtml @@ -1,58 +1,40 @@ -
- -
- + + +
-
The MLP Music Archive, a Ponyville Live! Project
+
The MLP Music Archive, a Ponyville Live! Project
@@ -139,11 +150,13 @@ ga('send', 'pageview'); renderCommon('mlpma') ?>
- layout()->hide_title): ?> -

- +
+ layout()->hide_title): ?> +

+ - layout()->content; ?> + layout()->content; ?> +
diff --git a/app/library_local/PVL/Controller/Action/Mlpma.php b/app/library_local/PVL/Controller/Action/Mlpma.php index ebc7b4627..b4a1dab7d 100644 --- a/app/library_local/PVL/Controller/Action/Mlpma.php +++ b/app/library_local/PVL/Controller/Action/Mlpma.php @@ -1,6 +1,9 @@ enableLayout(); + + $this->view->top_genres = ArchiveGenre::getTop(5); } } \ No newline at end of file diff --git a/app/library_local/PVL/MusicManager.php b/app/library_local/PVL/MusicManager.php index 9bc8ebe56..ddcbb7e46 100644 --- a/app/library_local/PVL/MusicManager.php +++ b/app/library_local/PVL/MusicManager.php @@ -12,8 +12,8 @@ class MusicManager const MUSIC_DIR = '/www/mlpmusicarchive.com/music'; const ART_DIR = '/www/mlpmusicarchive.com/art'; - const MUSIC_URL = 'http://www.mlpmusicarchive.com/music'; - const ART_URL = 'http://www.mlpmusicarchive.com/art'; + const MUSIC_URL = '//static.ponyvillelive.com/mlpmusicarchive/music'; + const ART_URL = '//static.ponyvillelive.com/mlpmusicarchive/art'; public static function checkPendingFolder() { diff --git a/app/models/Entity/ArchiveArtist.php b/app/models/Entity/ArchiveArtist.php new file mode 100644 index 000000000..e69de29bb diff --git a/app/models/Entity/ArchiveGenre.php b/app/models/Entity/ArchiveGenre.php index 1460cc8e5..87e10ad14 100644 --- a/app/models/Entity/ArchiveGenre.php +++ b/app/models/Entity/ArchiveGenre.php @@ -53,15 +53,18 @@ class ArchiveGenre extends \DF\Doctrine\Entity return $totals; } - public static function getTop($offset_num = 5) + public static function getTop($num_to_show = 5) { - $totals = self::getTotals(); + $all_totals = self::getTotals(); + + $totals = array_filter($all_totals, function($var) { + return ($var['total'] > 2); + }); uasort($totals, function($a, $b) { return $b['total'] - $a['total']; }); - $totals = array_slice($totals, 0, $offset_num, TRUE); - return $totals; + return array_slice($totals, 0, $num_to_show); } } \ No newline at end of file diff --git a/app/modules/mlpma/controllers/IndexController.php b/app/modules/mlpma/controllers/IndexController.php index eb2db3cea..9b16769c5 100644 --- a/app/modules/mlpma/controllers/IndexController.php +++ b/app/modules/mlpma/controllers/IndexController.php @@ -10,14 +10,7 @@ class Mlpma_IndexController extends \PVL\Controller\Action\Mlpma ->setMaxResults(10) ->execute(); - $this->view->genres = ArchiveGenre::getTotals(); - - $this->render('test'); - } - - public function testAction() - { - + $this->view->genres = ArchiveGenre::getTop(25); } public function downloadAction() diff --git a/app/modules/mlpma/views/scripts/artist/index.phtml b/app/modules/mlpma/views/scripts/artist/index.phtml index 027b25a98..156a52cda 100644 --- a/app/modules/mlpma/views/scripts/artist/index.phtml +++ b/app/modules/mlpma/views/scripts/artist/index.phtml @@ -5,7 +5,7 @@ $this->headTitle('Artist: '.$this->artist_name);

Albums

albums as $album_name => $songs): ?> -

+

songs = $songs; echo $this->renderHere('songs', true); diff --git a/app/modules/mlpma/views/scripts/index/index.phtml b/app/modules/mlpma/views/scripts/index/index.phtml index 6a92d7ea9..2761141ef 100644 --- a/app/modules/mlpma/views/scripts/index/index.phtml +++ b/app/modules/mlpma/views/scripts/index/index.phtml @@ -1,33 +1,29 @@ headTitle('The MLP Music Archive'); +$this->headTitle('Welcome to the MLP Music Archive'); $this->layout()->manual = true; +$this->layout()->hide_title = true; ?> - - +

Welcome to the MLP Music Archive!

+

The MLP Music Archive project is now a proud member of the Ponyville Live! family. We are working hard to bring you a brand spankin' new and improved version of the archive, with the latest and greatest in pony hits included, plus tons of new features.

-
-
-
-

Your Favorite Pony Songs,
All In One Place.

-

The MLP Music Archive project is now a proud member of the Ponyville Live! family. We are working hard to bring you a brand spankin' new and improved version of the archive, with the latest and greatest in pony hits included, plus tons of new features.

- -

You can download the existing MLP Music Archive using the link below.
This version of the archive was created on November 27, 2012.

- - Download v14 (Torrent) - View on Google Drive -
+
+
+

Newly Added Songs

+ songs = $this->newest_songs; + $this->compact_view = true; + echo $this->renderHere('songs', TRUE); + ?> +
+
+

Explore By Genre

+
+ +
\ No newline at end of file diff --git a/app/modules/mlpma/views/scripts/index/index2.phtml b/app/modules/mlpma/views/scripts/index/index2.phtml new file mode 100644 index 000000000..6a92d7ea9 --- /dev/null +++ b/app/modules/mlpma/views/scripts/index/index2.phtml @@ -0,0 +1,33 @@ +headTitle('The MLP Music Archive'); +$this->layout()->manual = true; +?> + + + + +
+
+
+

Your Favorite Pony Songs,
All In One Place.

+

The MLP Music Archive project is now a proud member of the Ponyville Live! family. We are working hard to bring you a brand spankin' new and improved version of the archive, with the latest and greatest in pony hits included, plus tons of new features.

+ +

You can download the existing MLP Music Archive using the link below.
This version of the archive was created on November 27, 2012.

+ + Download v14 (Torrent) + View on Google Drive +
+
+
\ No newline at end of file diff --git a/app/modules/mlpma/views/scripts/index/test.phtml b/app/modules/mlpma/views/scripts/index/test.phtml deleted file mode 100644 index cd68e1d8a..000000000 --- a/app/modules/mlpma/views/scripts/index/test.phtml +++ /dev/null @@ -1,49 +0,0 @@ -headTitle('Welcome to the MLP Music Archive'); -$this->layout()->manual = true; -?> - -

Welcome to the MLP Music Archive!

-

The MLP Music Archive project is now a proud member of the Ponyville Live! family. We are working hard to bring you a brand spankin' new and improved version of the archive, with the latest and greatest in pony hits included, plus tons of new features.

- -
- -
-
-
-

Newly Added Songs

-
-
-
-
-
- songs = $this->newest_songs; - $this->compact_view = true; - echo $this->renderHere('songs', TRUE); - ?> -
-
-
-
-
-
-
-
-

Explore By Genre

-
-
-
-
-
-
    - genres as $genre_id => $genre): ?> -
  • - -
-
-
-
-
-
-
\ No newline at end of file diff --git a/app/modules/mlpma/views/scripts/songs.phtml b/app/modules/mlpma/views/scripts/songs.phtml index a93b4d3cd..765a5c2a7 100644 --- a/app/modules/mlpma/views/scripts/songs.phtml +++ b/app/modules/mlpma/views/scripts/songs.phtml @@ -1,4 +1,4 @@ - +
compact_view): ?> @@ -28,7 +28,7 @@ compact_view): ?> - + - + diff --git a/web/static/common/bootstrap2_r2/layout.js b/web/static/common/bootstrap2_r2/layout.js index 26ae8e3cf..18c778f8a 100644 --- a/web/static/common/bootstrap2_r2/layout.js +++ b/web/static/common/bootstrap2_r2/layout.js @@ -156,7 +156,8 @@ function initPage(page) { /* Disable submit button to prevent double submissions */ $(page).find('form').submit(function(){ - $(this).find('input[type=submit],button[type=submit]').attr('disabled', 'disabled').addClass('disabled').val('Working...'); + if (!$(this).hasClass('no-disable')) + $(this).find('input[type=submit],button[type=submit]').attr('disabled', 'disabled').addClass('disabled').val('Working...'); }); /* Suppress the backspace key. */ diff --git a/web/static/crossdomain.xml b/web/static/crossdomain.xml new file mode 100644 index 000000000..d506bf99f --- /dev/null +++ b/web/static/crossdomain.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/web/static/fap/css/jquery.fullwidthAudioPlayer-responsive.css b/web/static/fap/css/jquery.fullwidthAudioPlayer-responsive.css new file mode 100644 index 000000000..84c9e74fa --- /dev/null +++ b/web/static/fap/css/jquery.fullwidthAudioPlayer-responsive.css @@ -0,0 +1,156 @@ +/* +* Fullwidth Audio Player - Responsive Layout +* +*/ + + +/* Smartphones (portrait and landscape) ----------- */ +@media only screen +and (min-device-width : 320px) +and (max-device-width : 480px) { + + #fap-meta-wrapper > p { + margin-left: 45px !important; + } + + #fap-current-cover, #fap-cover-replacement, #fap-cover-replacement canvas, #fap-cover-replacement svg { + max-width: 40px !important; + max-height: 40px !important; + } + + #fap-ui-wrapper > div { + display: none; + } + + #fap-ui-wrapper > div:first-child { + display: block; + margin-right: 0; + } + + #fap-current-title { + font-size: 9px; + line-height: 9px; + } + + #fap-social-links { + margin-top: 2px; + line-height: 6px; + } + + #fap-current-meta, #fap-social-links a { + font-size: 6px; + line-height: 8px; + } + + #fap-time-bar, #fap-volume-bar, #fap-volume-sign, #fap-playlist-toggle, #fap-playlist-shuffle { + display: none; + } + +} + +/* Smartphones (portrait) ----------- */ +@media only screen +and (max-width : 320px) { + + #fap-main { + width: 320px; + } + + #fap-meta-wrapper { + width: 240px; + } + + #fap-ui-wrapper { + width: 80px; + } + + #fap-time-bar, #fap-volume-bar, #fap-volume-sign, #fap-playlist-toggle, #fap-playlist-shuffle { + display: none; + } + +} + +/* Smartphones (landscape) ----------- */ +@media only screen +and (min-width : 321px) { + + #fap-main { + width: 480px; + } + + #fap-meta-wrapper { + width: 400px; + } + + #fap-ui-wrapper { + width: 80px; + } + + #fap-time-bar, #fap-volume-bar, #fap-volume-sign, #fap-playlist-toggle, #fap-playlist-shuffle { + display: none; + } + +} + +/* iPads (portrait) ----------- */ +@media only screen +and (min-device-width : 768px) +and (max-device-width : 1024px) { + + #fap-main { + margin-right: auto !important; + margin-left: auto !important; + width: 768px; + } + + #fap-meta-wrapper { + width: 338px; + } + + #fap-ui-wrapper { + width: 430px; + } + + #fap-current-title { + font-size: 11px; + line-height: 11px; + } + + #fap-current-meta, #fap-social-links a { + font-size: 8px; + line-height: 8px; + } + + #fap-social-links { + margin-top: 2px; + } + + #fap-time-bar, #fap-volume-bar, #fap-volume-sign, #fap-playlist-toggle, #fap-playlist-shuffle { + display: block; + } + +} + +/* Desktops and laptops ----------- */ +@media only screen +and (min-width : 1024px) { + + #fap-main { + width: 960px; + } + + #fap-meta-wrapper { + width: 530px; + } + + #fap-ui-wrapper { + width: 430px; + } + + #fap-time-bar, #fap-volume-bar, #fap-volume-sign, #fap-playlist-toggle, #fap-playlist-shuffle { + display: block; + } + +} + + diff --git a/web/static/fap/css/jquery.fullwidthAudioPlayer.css b/web/static/fap/css/jquery.fullwidthAudioPlayer.css new file mode 100644 index 000000000..c8dcde34a --- /dev/null +++ b/web/static/fap/css/jquery.fullwidthAudioPlayer.css @@ -0,0 +1,360 @@ +/* +* Fullwidth Audio Player V1.5 +* Author: Rafael Dery +* Copyright 2011 +* +* Only for the sale at the envato marketplaces +* +*/ + +/* Reset */ + +#fap-wrapper * { + margin: 0; + padding: 0; + list-style: none !important; + line-height: 12px; + outline: none !important; +} + + +/* Wrapper */ + +#fap-wrapper { + min-width: 100%; + position: fixed; + left: 0; + z-index: 100000; + font-size: 10px; + font-family: Arial, Helvetica, sans-serif; +} + +.fap-fullwidth { + border-top: 1px solid; + border-bottom: 1px solid; +} + +.fap-boxed #fap-main { + border: 1px solid; +} + +#fap-wrapper-switcher { + position: absolute; + width: 30px; + height: 15px; + line-height: 15px; + left: 0; + border: 1px solid; + cursor: pointer; + font-size: 20px; + text-align: center; +} + +.fap-bordered-top { + -moz-border-radius-topleft: 5px; + -moz-border-radius-topright: 5px; + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 0px; + -webkit-border-radius: 5px 5px 0px 0px; + border-radius: 5px 5px 0px 0px; +} + +.fap-bordered-bottom { + -moz-border-radius-topleft: 0px; + -moz-border-radius-topright: 0px; + -moz-border-radius-bottomright: 5px; + -moz-border-radius-bottomleft: 5px; + -webkit-border-radius: 0px 0px 5px 5px; + border-radius: 0px 0px 5px 5px; +} + +#fap-init-text { + position: absolute; + left: 0; + font-size: 12px; +} + +.fap-wrapper-top #fap-init-text { + bottom: 20px; +} + +.fap-wrapper-bottom #fap-init-text { + top: 20px; +} + +#fap-main { + width: 960px; + height: 100%; + position: relative; +} + + +/* Meta Stuff */ + +#fap-meta-wrapper { + width: 530px; + float: left; + margin-top: 10px; +} + + + +#fap-current-cover, #fap-cover-replacement { + text-align: center; + font-size: 18px; + float: left; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); +} + +#fap-current-title { + font-weight: bold; + font-size: 12px; + line-height: 18px; + padding-right: 10px; +} + +#fap-current-meta { + font-size: 10px; +} + +#fap-current-meta a, #fap-current-meta a:visited { + color: #666666; +} + +#fap-current-meta a:hover { + text-decoration: none; +} + +#fap-social-links { + margin-top: 7px; +} + +#fap-social-links a { + font-size: 10px; + margin-right: 10px; + float: left; + display: block; +} + +#fap-social-links a.fap-soundcloud-link { + background: url(../images/fwap/sc_logo_dark.png) no-repeat; + width: 78px; + height: 12px; +} + + +/* Main UI */ + +#fap-ui-wrapper { + width: 430px; + float: right; +} + +#fap-ui-wrapper > div, #fap-ui-wrapper > a { + float: left; +} + +#fap-ui-nav { + position: relative; + width: 80px; + height: 40px; +} + +#fap-ui-wrapper > div { + margin-right: 11px; +} + +#fap-ui-wrapper > div:last-child { + margin-right: 0; +} + +#fap-ui-nav > a { + background-repeat: no-repeat; + display: block; + position: absolute; + -webkit-border-radius: 100%; + border-radius: 100%; +} + +#fap-ui-nav #fap-previous { + background-image: url(../images/fwap/previous.png); + background-position: 5px 12px; + top: 5px; + left: 0; + width: 30px; + height: 30px; +} + +#fap-ui-nav #fap-next { + background-image: url(../images/fwap/next.png); + background-position: 12px 12px; + top: 5px; + left: 50px; + width: 30px; + height: 30px; +} + +#fap-ui-nav #fap-play-pause { + top: 0; + left: 20px; + width: 40px; + height: 40px; + z-index: 3; +} + +#fap-ui-nav .fap-play { + background-image: url(../images/fwap/play.png); + background-position: 15px 11px; +} + +#fap-ui-nav .fap-pause { + background-image: url(../images/fwap/pause.png); + background-position: 16px 12px; +} + +#fap-time-bar { + position: relative; +} + +#fap-time-bar div { + position: absolute; + top: 0; + left: 0; +} + +#fap-time-bar div, #fap-volume-bar, #fap-volume-bar div { + cursor: pointer; +} + +#fap-time-bar div { + width: 0; +} + +#fap-time-bar span { + margin-top: 10px; +} + +#fap-volume-bar div { + width: 100%; +} + +#fap-time-bar #fap-current-time { + float: left; +} + +#fap-time-bar #fap-total-time { + float: right; +} + +#fap-volume-bar { + margin-right: 5px !important; +} + +#fap-volume-sign { + background-image: url(../images/fwap/volume.png); + background-repeat: no-repeat; + background-position: 0 3px; + width: 20px; + height: 22px; +} + +#fap-playlist-toggle { + margin-right: 0 !important; +} + +#fap-time-bar, #fap-time-bar div, #fap-volume-bar, #fap-volume-bar div { + height: 6px; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; +} + + +/* Playlist Stuff */ + +#fap-playlist-toggle, #fap-playlist-shuffle { + background-repeat: no-repeat; + display: block; + width: 25px; + height: 25px; + -webkit-border-radius: 100%; + border-radius: 100%; +} + +#fap-playlist-toggle { + background-image: url(../images/fwap/playlist.png); + background-position: 7px 7px; +} + +#fap-playlist-shuffle { + background-image: url(../images/fwap/shuffle.png); + background-position: 5px 7px; +} + +#fap-playlist { + width: 100%; + height: 100%; +} + +#fap-playlist li { + line-height: 20px; + margin-right: 10px; +} + +#fap-playlist li img, #fap-playlist li .fap-cover-replace-small { + text-align: center; + float: left; + width: 20px; + height: 20px; +} + +#fap-playlist li > span { + float: left; + line-height: 20px; + margin-left: 10px; + cursor: pointer; +} + +#fap-playlist li span:hover { + text-decoration: underline; +} + +#fap-playlist li .fap-remove-track { + font-size: 18px; + line-height: 22px; + float: right; + cursor: pointer; +} + +.fap-xml-playlist span { + display: none; +} + + +/* Popup Skin */ + +.fap-popup-skin #fap-wrapper-switcher { + display: none; + font-size: 20px; + text-align: center; +} + +/* Soundcloud */ +.sc-player-engine-container{ + width: 1px; + height: 1px; + position: fixed; + top: -200px; + left: -200px; +} + +/* Helper */ +.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; } +.clearfix:after { clear: both; } +.clearfix { zoom: 1; } +.clear {clear: both;} diff --git a/web/static/fap/html/popup.html b/web/static/fap/html/popup.html new file mode 100644 index 000000000..8e7418f46 --- /dev/null +++ b/web/static/fap/html/popup.html @@ -0,0 +1,94 @@ + + + + + + Fullwidth Audio Player + + + + + + + + + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/web/static/fap/images/black/next.png b/web/static/fap/images/black/next.png new file mode 100644 index 0000000000000000000000000000000000000000..890fbf6161a9a0161b7427704085f47627dfc467 GIT binary patch literal 1208 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9S!3HE7rssMADajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49rTIArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XP}#GU}m6TW~gUq zY+`P1uA^XNU}&IkV5Dzoq-$tyWo%?+V4wg6Nh+i#(Mch>H3D2mX;thjEr=FDs+o0^GXscbn}XpVJ5hw7AF^F7L;V>=P7_pOiaoz zEwNPsx)kDt+yc06!V;*iRM zRQ;gT;{4L0WMIUlDTAykuyQU+O)SYT3dzsUfrVl~Mt(_taYlZDf^)E`f^TASW*&$S zR`2U;<(XGpl9-pA>gi&u1T;Y}Gc(1?(bUMu)!4+@(A?78(9qS$2}rn_IlGw|8oRi- z7@ETLy5uL9=BDPA!1Sgd^t#~G3rY&P1wfl!Qj0RnQd8WD@^clyUbf1_?G{Iz=0WwQ z;C71>PQCg-$LND17Ac}(Lcr7mV#1RxkONQnsd>QEUIa|mzwfuqWME*_@pN$vskrrK z(q1oSN0C*R%@6uzfWv;f@k!l3CgJ>GwU$?VRGC zleQ!t{CiC6%gXNy6yM%G%dvhB-|`LqkBxR})v}+vFzbnG=G6T?YZN(*-yY<;vgJRc zbOGn_|GraZ-k6-1%T#f3pJd%Z2Dv4znQn3Izc2V*zA{U0t9^^!EwP_j*Id43T`ypG zZnDR-zD@XstF-58ZGAuER|P-raoJ@ZxwXu?Mg7|PjL=W&UwOAY@Y{P|*l(AxsB-l4 zcYYyPLVnle&S-qzDg4gI@E_+3#pO58cjQcZ^z-9fgY8C#c27#mGcngvu49p4n0R54 U?RjHO4^Ua+>FVdQ&MBb@03idWj{pDw literal 0 HcmV?d00001 diff --git a/web/static/fap/images/black/pause.png b/web/static/fap/images/black/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..4db935141415238084ebd1b213c8c37785c21f03 GIT binary patch literal 1038 zcmaJ=PiWIn98MjUIXe^;bRK5Nh77U!*EL<^YVDfN6-*gz#hzqo^47*Jc`oSr-lM38|yh+2K=+RlSDkoVs2@qOR#@4Gdcx!Bop zvV$Oq&h&_s#rt9WA8GgFHGA&rHN179Q~~ASII1W%AQBoZ0y1qVC6EP*HgkO)3=%{e zrRNK%AYT$yXwZs>psTQ>j$w zN{EJbiQ%HrsHeg6L5v7GGbU2ppy~896eQrNwr(LEnxvGiHR`Jr$YS$TqGLdxD-Ex zmz0nk7PyckNnE(Wm7qFh024L1+8#IBlIx9vVPVe_u=Q!64cpKlYblF*>sW-AdUdYW zI+jRFE`x(%yvF|3=*AVE9`D#3TWmB3ADDRBZ9LZY_MIwz67y*(k#|27zwPY&T3=mV z^{?G~AQ<;QZEckfXs6UUBDeCsYvn{}x%y^qKkM5*)c51~-ReT`?aN1>`<4R7h|~U# z*N=UV{DJPaYGU*EMi~j2wtc-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%s|1+P|wiV z#N6CmN5ROz&_Lh7NZ-&%*U;R`*vQJjKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8EkR}&8R-I5=oVMzl_XZ^<`pZ$OmImpPAEg{v+u2}(t{7puX=A(aKG z`a!A1`K3k4z=%sz23b{L-^Aq1JP;qO z-q+X4Gq1QLF)umQ)5TT^Xo6m5W{Q=gsgaSZv5ASHxuvP^Ao7N}lVoO<lFzskqfLd85}62Z6To;%E-L?*2)8CU?wHpOc{2arR+jN3WAh4vXVDA#ZE$jT=60 z32JdZ^Xu;h?m|y9X8D=E&*sm(J9ow=o%0EYtMgg@Y5a1IXxeM|O!Sz+`q#fUuhQzy z|0q3qqefpDYp~1qs0m9RJdFH3Cqgvmfoxxb{KaTJ�f`ZU^_bb2fec5$Jg<+ViMd zNg&IAX}?72i^U!bp7ic|A$0mtSdzH^24?k+FvZTd!sVrkm&J~$RJ_REy_#E?FL+xE z^9}7Y8*YX%-LzWsa;~(%G3_4Lbz94C?Ypd`o)mdKI;Vst0J$TkLI3~& literal 0 HcmV?d00001 diff --git a/web/static/fap/images/black/playlist.png b/web/static/fap/images/black/playlist.png new file mode 100644 index 0000000000000000000000000000000000000000..1fe9527a3b96673517801c65d6c7a0177af3531d GIT binary patch literal 962 zcmaJ=zi-n(7MgK)YD2Fqd{Ikd2ZZ=4&yUArZk*$A(C1-3pN};}F-sBI zaN-d&%6efYQP5Fn1&&V~?15O(?BWs8SQ_bB3a-DD^}r>A<3Y^Ett_0Wx^ORL*bu7|Ky#?1^9gDn@%hO=^xUqjVI=Q0L6Camj zOO55=BacpdK*zfC&ALaQgk05&t>|m_?a|S%FL!QiJ^3kQu1haYPcORZy~EkFPlpF5 ppI>*{{dGOE4}~# literal 0 HcmV?d00001 diff --git a/web/static/fap/images/black/previous.png b/web/static/fap/images/black/previous.png new file mode 100644 index 0000000000000000000000000000000000000000..171e82361e25460f719a38f1b84e5b450ed86a12 GIT binary patch literal 1200 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9S!3HE7rssMADajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49rTIArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XP}#GU}m6TW~gUq zY+`P1uA^XNU}&IkV5Dzoq-$tyWo%?+V4wg6Nh+i#(Mch>H3D2mX;thjEr=FDs+o0^GXscbn}XpVJ5hw7AF^F7L;V>=P7_pOiaoz zEwNPsx)kDt+yc06!V;*iRM zRQ;gT;{4L0WMIUlDTAykuyQU+O)SYT3dzsUfrVl~Mt(_taYlZDf^)E`f^TASW*&$S zR`2U;<(XGpl9-pA>gi&u1T;Y}Gc(1?#M#W!z}3*i(A?78(9qS$2}rn_IlGw|8oRi- z7@ETLy5uL9=BDPA!1Sgd^qS(-3rY&P1wfl!Qj0RnQd8WD@^clyUbf1_?G_`P=0WwQ z;C72KPQCg-$LND17Ac}(Lcr7mV#1RxkONQnsd>QEUIa|mx*PM{q)<2#$DlU=^qwWG5YdU8H9blI$yUk|47x}xm)Hf z{Tbn6xjDIY>Hda&niuCTKdE}7ez#!YolhMHo`^&*UK=R)QTYHvnfP2Y!CPn4L1l=i LtDnm{r-UW|SYM!5 literal 0 HcmV?d00001 diff --git a/web/static/fap/images/black/sc_logo_dark.png b/web/static/fap/images/black/sc_logo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..f5ac70ce242b0f6d42146b3ab536dede145b9fe4 GIT binary patch literal 3354 zcmai02{@E%8y;kYP+{yDW33KjDa*{5se_O;TZG1pbsDpn8H{i!IzpvMrNxr5g)Bw3 z>NEhk&l3bahlnL7^3nPDAJnSdF@=gSEU%~TZFg`YD3uJarj;1jbz zD2V{E;RBx=%Pk$_4is2ggip7KDXGozJC8pJ!Kyp9c&vQuFd8+Qf=`_uGBrly9^a91 zzId~+IIUadMsgnLdb&+QU)gIbzSo5_wwjENuDx1Kl3!lVjw>YW?3iQBb8SB>H=Ioz z?v01oH4-HiB4t*0o#=dxudtG65LjEqRRV{XTHT>-3?ymc*eM{rRG$7 zSBb@s9Q^E5ACG$bcv*hYsuW#PZHbBEUrqYf7r{$cJh7aAEs{1eWsXJ{NsItT_``e2 zdBQepXM%OY<)t6?uBgu5YF9RV8|=TgEL$pi!DY3aspvMG#vO0+;7Uv%wEWYD*LU=>>HvDu_ z`+mZc8_m}hJ49qmm0j9!S3VGfYMd($Z9m7HZ@hY1!-d6c+`k5JWZkG=4;1ET}6>)RX14l_!6-xho6 zkyM=~^F$83t%Th0{Glt#ae!xC5nIO5mh%_SE;V4?^FkAai>qjCrE}nQfups-bD~bE-ol>iV%gS~=I)~in#K8jM0l@}+$UHnA#Sulk z06tlLIaiOz)7FEQF0&H}ZTh9e){5p;R>?!nb%Fyg-0N(@&CC~zA!_O zv!pS%ocjQ*+Vw{W zxl)O0^uFZ0iMmCO;ODMg8wz#OG@-IHHjl$KKkkq|B&G^X1HNr_dKOzq1Gx=lBr-s$mHrq`~XUR5j23`t@H(o*XDCDA_L<@uEuC^No3&WY;0d?hhLJp;dLw ziCHT3F_0_MM@QD`%|h6_2=nfyahuKXS(gC!`{I#vyH^@y2Y+3(jhNJ9CJL<7)V-U^ zvX}re9ATxSYYH<~@7T1;UV8Kw=WcaVxT1mVX0d@R91Yn7_4+QM+yFuJK)HkBTb~U< zvV|KJ01)1ag~fRQcT%MR0A4!I$(816V-52r5wtKqB&@F%oj~4V0{{p*Y%3)A(lB5; zA&^Lg(TySB8L+K*8-_x_-zhY_F~rrz9&AFQ_<|2>>1gRfkV0TE7(wyzgE^QU`;or2 zGKK`uXk-`^8X6j^6{@F2qWD8~jEsz++PY9(UCk|qCN+#m!_YN}ROR1`{87i$m+DQy zk!d&*5xiX&gCzyij3JQiMt@#EbP~vaHX>4gOtm#1l#U@ob+ojhe^%Z~L~P9nGokom zXe5dgi4=%Dx@`j3K7d3cQ3FV1u!-Ygunoo=N8DZ`p#P-*=#PMIi~5_$?+$F&{|Em6 z#M5wof7$eJ>bH0PQ~ovzb93;ek^+Ob%|ROIBB1{P{^b(l`<@*I=eyux`%0sug1OVguH79#AMk=Ac~CE6A)ghMs3 zwYmM1lmKR5VrTAMKYM+p%lyonGG>HZYJ?BXfkowqt=8HeubkJM!mII$=K8@d;Ka)q z?pIJ?E0;4JbQyB>$+7z7uiS~C26j{Xw-SFieCjK5bSiZzb!t65JZ+rJ(&=NB;~cM# z2M$*;G&jAH2Nt8=6dcVayQuR!JWRco*{`glhpwUF%J-C=9Q68hu(*k{7Hj$F(Ibz( zQ?HO^<`w`{K04O@6to_*8QAfgIWd)b*2WozL@Y1MM%)pFeM; zhRG7~H&l?ZugxsY{G23VGHVjVVUa814f<-vEr+UW-0+4ny5QIpO?Qxj(1l!W8-H0W zPEI#I48=dpNJ*&_9acYWW@cu;)_Jc=%+$=x#y5)U@9*#E>FIf|s>-mUun-?YqtPO? zr33F57ZcGBvCpdN>+9nc6cnU>o1Kl}+?Cn6qqw!DWw`On27y2jnT}qs_9(8Xs;UYp zdAqhd=-9c?-C2TjCx@9#reVV)S=Cq^`O z&(o@ocKUI2R&V!?jz;Z4i(h>{w&9i1TeSE9Q|B4d_Op`DIl|GDOarjsMZS+!?D-VN zn|HUF`O$Z>sD}2MlYYGYIk~x7yGPjUI>~j7N#ru-?t8jq&6+302Z~=iAIi;_# z-rjcVs;b60b&DvanGeRs#-WUEor&FxU%cSejlG2~MU=IOde5;NWUj06bu+ouVWb;lOZtQ9XqjrpNRGRceslq!LF{3_xY(Y$A>9gf~n_f_l2tp0Si zpqJ`J#Q=F2kexVfBkNVHa|B?((o^Z}Shx1|^>xHznOflXK}b2r!)LF;>x-k-t5EGI z5XxpcSz^j)@7LroF{)mz*Qb)9H>!1ZOp)o?#cu=eC%{pq6`;--CpseC16Cm>;KuR1 z=py>1qM`!m;NbB3GV*~)mdqZXDI)4sZ1 zR8Vj{=*pP)zFBIox}h~6C0#mv1rc4?@n9-1C+FGOUv4Ft7vRsFx&BsECBf<~HCx#G zH}XBr7{fCf&*s?;QJaT3U92od{>3*6kZz@_Q%;q$X1uKXrKuLn8(H$r!K~fqrXasQvEWzC#NX%Z&ze#; zYW`@pp}C8)H0XB7a8$nTzW^6| zAT$u28uw-2n(cXXWBsMmF&*mrBlMPz8Ge&@ZsA47&9vO+i86@K`?w#esHnKPA0-5B zHWKFYt=F-<$5H1uG?3UPJH1UIk8X=yVMVRoTH40nh8Q1dJw)u}xf{&`zn&K5N>!tp z%F6bxc?VUe@q5t3==!Vsv?I^K87ZtK5jIz7E$xh1TT_gHSaKr|NK1EP&)4|JO986k zpvdb!w$##^qxn-_>SMK;%%G0`BtB};iI=)G;pfB;xh3yH54%EKK@P`i^=MPU+8gaX z!I`w>Q^-twK#3j)k$&~+m`Wb>>j~CVuKuFdgv7OT8ts&4tqqiZU!O*+r^We2Mb4F} zCN)i;dXi3*<679fB*j|^{pUAN_Fnn?`EyAVs@cP$xA-1fN;EgI?n-AHHx(U{HapoE zU;ljbCwf_pLEl?4UBzx`Xq+p@ookVwZ^(V#d*GJZu}e$tu}z1K5+n@2Js?T4=bsYs z86W-a0t|=AIdk%pHx*;~;QMZpZ}L literal 0 HcmV?d00001 diff --git a/web/static/fap/images/black/shuffle.png b/web/static/fap/images/black/shuffle.png new file mode 100644 index 0000000000000000000000000000000000000000..be91a522e56a2601894a1d6f7c16dfeb94418a02 GIT binary patch literal 1217 zcmaJ>ZD<>19KXdabX{U2&MnO*eY_SMCAqisa^`H>X1QdIcqOEf27Fa>c2LkMpvj5t4@?T+Kvm4D0Q8O-UYy4yeLWRZrtLKV8Rxs-*D| zR-{BT3&+&KX$uZd50&NVaXF>n{e7U<<&l5}9SOMFS>5K{G`_3LqqBES;$RozjHmJ2 zK~=;e$Ql*|EJ4L(DoKGPP0)!Rj^kp0p=gSv7?NhjsqrNt-|&U3 zG(P4yCQp*}dYz~z2*VmB=~OD^X)sJ2A>#Iw?nrK2w>z5(0<>jIH67K^fu|@{jY%hs zqeyS3pqYEJy4@%fDj4ZXCP@>Nmr@fbivJJQv^})#l;FSd-ci^tPnnP`LED(LWYoA? zr{~J#vlf&b!zvrb*=7}sV}@hcV}=Q`!z>UbS=Bvz7cYu@LAM=AmtjFj<4A!}RfX@# zCR0?7euU;y98Kq#Q)tO0v-u>Q5Cnl{n_R(=CpD-$O|F8toWO8whVI#y>y3hDBF_S} z)aRg*w+s#Jrp&AR$CBJvufbLB5KAKuZeK2mf+4-e{-@E+D>Oacac^vqu{ZcoN7HVh zv3|Ylx8oRgfGr4_vio!Oqt#Uj+!OU}kzl5E^JL!(;oRlWNUlZ}aJaKubAOvd!+Wp_k+v%%bb7n*i-)VYq5hHH;R2xCh(5> zZSb*e`p(39KY_iIof2zDXVo=U$5yxPY#D6*z>btJ#{KI%~@4fHi z^Z9&#@?I+BAMv-}+fERKKQ}BE@qRb{j~+UR*DL9dy{*g1PB>$z;?!gd5@{8cA;{_S zBrHN%otwS}2ML0tw9#*+aEOcX{b8PE!R|+4Z!zWX~Cn?1l`xx2YgPTd_3L(U1W=MY)V- zoCJj3xKZ^!$e!gguSgiI0IXvR`- z<0`$LE0Y&2C_Bh1A#}P~#X=Q1$gUz22xAc-$%_?%%ovZ277n4qu%t!XMR zWV7M`n-;iOJj!v|a0V~gs4x`e`bAOXB2BJ{lo=fwPLr$N=87%3-YDoM_AEk6n}zC- zg>5}_xd24$+N%E^JD=X{A^S(+sMXs){W>dcrONV7ZvhtnZwXHo}cTYA7+Pl8} z&t4$QDDc;f>z{s8FLed}B&P4XM1SA0_UQ6c109PGv`wEVj4pPQP zV-LPu37p?veqANopF6e`JM+W2xyKKTB>UDEvW**0o)7-wf9tVj6%0IaSAFYn;DgL5 z-^kZJjqdke4U!kNFS{0hs{g)O_@lde51l&F+s>XHIrRP~SC5n)Cb-Xm{>GW$LQlt0 zu8^saKZ2s4B)c~*_FdZOdGWP}4vhLr2YVZ-IzbY?zb_BBExgHjZ%8hi7vIi2bM_xM Cj))%s literal 0 HcmV?d00001 diff --git a/web/static/fap/images/fwap/next.png b/web/static/fap/images/fwap/next.png new file mode 100644 index 0000000000000000000000000000000000000000..890fbf6161a9a0161b7427704085f47627dfc467 GIT binary patch literal 1208 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9S!3HE7rssMADajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49rTIArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XP}#GU}m6TW~gUq zY+`P1uA^XNU}&IkV5Dzoq-$tyWo%?+V4wg6Nh+i#(Mch>H3D2mX;thjEr=FDs+o0^GXscbn}XpVJ5hw7AF^F7L;V>=P7_pOiaoz zEwNPsx)kDt+yc06!V;*iRM zRQ;gT;{4L0WMIUlDTAykuyQU+O)SYT3dzsUfrVl~Mt(_taYlZDf^)E`f^TASW*&$S zR`2U;<(XGpl9-pA>gi&u1T;Y}Gc(1?(bUMu)!4+@(A?78(9qS$2}rn_IlGw|8oRi- z7@ETLy5uL9=BDPA!1Sgd^t#~G3rY&P1wfl!Qj0RnQd8WD@^clyUbf1_?G{Iz=0WwQ z;C71>PQCg-$LND17Ac}(Lcr7mV#1RxkONQnsd>QEUIa|mzwfuqWME*_@pN$vskrrK z(q1oSN0C*R%@6uzfWv;f@k!l3CgJ>GwU$?VRGC zleQ!t{CiC6%gXNy6yM%G%dvhB-|`LqkBxR})v}+vFzbnG=G6T?YZN(*-yY<;vgJRc zbOGn_|GraZ-k6-1%T#f3pJd%Z2Dv4znQn3Izc2V*zA{U0t9^^!EwP_j*Id43T`ypG zZnDR-zD@XstF-58ZGAuER|P-raoJ@ZxwXu?Mg7|PjL=W&UwOAY@Y{P|*l(AxsB-l4 zcYYyPLVnle&S-qzDg4gI@E_+3#pO58cjQcZ^z-9fgY8C#c27#mGcngvu49p4n0R54 U?RjHO4^Ua+>FVdQ&MBb@03idWj{pDw literal 0 HcmV?d00001 diff --git a/web/static/fap/images/fwap/pause.png b/web/static/fap/images/fwap/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..4db935141415238084ebd1b213c8c37785c21f03 GIT binary patch literal 1038 zcmaJ=PiWIn98MjUIXe^;bRK5Nh77U!*EL<^YVDfN6-*gz#hzqo^47*Jc`oSr-lM38|yh+2K=+RlSDkoVs2@qOR#@4Gdcx!Bop zvV$Oq&h&_s#rt9WA8GgFHGA&rHN179Q~~ASII1W%AQBoZ0y1qVC6EP*HgkO)3=%{e zrRNK%AYT$yXwZs>psTQ>j$w zN{EJbiQ%HrsHeg6L5v7GGbU2ppy~896eQrNwr(LEnxvGiHR`Jr$YS$TqGLdxD-Ex zmz0nk7PyckNnE(Wm7qFh024L1+8#IBlIx9vVPVe_u=Q!64cpKlYblF*>sW-AdUdYW zI+jRFE`x(%yvF|3=*AVE9`D#3TWmB3ADDRBZ9LZY_MIwz67y*(k#|27zwPY&T3=mV z^{?G~AQ<;QZEckfXs6UUBDeCsYvn{}x%y^qKkM5*)c51~-ReT`?aN1>`<4R7h|~U# z*N=UV{DJPaYGU*EMi~j2wtc-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%s|1+P|wiV z#N6CmN5ROz&_Lh7NZ-&%*U;R`*vQJjKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8EkR}&8R-I5=oVMzl_XZ^<`pZ$OmImpPAEg{v+u2}(t{7puX=A(aKG z`a!A1`K3k4z=%sz23b{L-^Aq1JP;qO z-q+X4Gq1QLF)umQ)5TT^Xo6m5W{Q=gsgaSZv5ASHxuvP^Ao7N}lVoO<lFzskqfLd85}62Z6To;%E-L?*2)8CU?wHpOc{2arR+jN3WAh4vXVDA#ZE$jT=60 z32JdZ^Xu;h?m|y9X8D=E&*sm(J9ow=o%0EYtMgg@Y5a1IXxeM|O!Sz+`q#fUuhQzy z|0q3qqefpDYp~1qs0m9RJdFH3Cqgvmfoxxb{KaTJ�f`ZU^_bb2fec5$Jg<+ViMd zNg&IAX}?72i^U!bp7ic|A$0mtSdzH^24?k+FvZTd!sVrkm&J~$RJ_REy_#E?FL+xE z^9}7Y8*YX%-LzWsa;~(%G3_4Lbz94C?Ypd`o)mdKI;Vst0J$TkLI3~& literal 0 HcmV?d00001 diff --git a/web/static/fap/images/fwap/playlist.png b/web/static/fap/images/fwap/playlist.png new file mode 100644 index 0000000000000000000000000000000000000000..1fe9527a3b96673517801c65d6c7a0177af3531d GIT binary patch literal 962 zcmaJ=zi-n(7MgK)YD2Fqd{Ikd2ZZ=4&yUArZk*$A(C1-3pN};}F-sBI zaN-d&%6efYQP5Fn1&&V~?15O(?BWs8SQ_bB3a-DD^}r>A<3Y^Ett_0Wx^ORL*bu7|Ky#?1^9gDn@%hO=^xUqjVI=Q0L6Camj zOO55=BacpdK*zfC&ALaQgk05&t>|m_?a|S%FL!QiJ^3kQu1haYPcORZy~EkFPlpF5 ppI>*{{dGOE4}~# literal 0 HcmV?d00001 diff --git a/web/static/fap/images/fwap/previous.png b/web/static/fap/images/fwap/previous.png new file mode 100644 index 0000000000000000000000000000000000000000..171e82361e25460f719a38f1b84e5b450ed86a12 GIT binary patch literal 1200 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9S!3HE7rssMADajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49rTIArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XP}#GU}m6TW~gUq zY+`P1uA^XNU}&IkV5Dzoq-$tyWo%?+V4wg6Nh+i#(Mch>H3D2mX;thjEr=FDs+o0^GXscbn}XpVJ5hw7AF^F7L;V>=P7_pOiaoz zEwNPsx)kDt+yc06!V;*iRM zRQ;gT;{4L0WMIUlDTAykuyQU+O)SYT3dzsUfrVl~Mt(_taYlZDf^)E`f^TASW*&$S zR`2U;<(XGpl9-pA>gi&u1T;Y}Gc(1?#M#W!z}3*i(A?78(9qS$2}rn_IlGw|8oRi- z7@ETLy5uL9=BDPA!1Sgd^qS(-3rY&P1wfl!Qj0RnQd8WD@^clyUbf1_?G_`P=0WwQ z;C72KPQCg-$LND17Ac}(Lcr7mV#1RxkONQnsd>QEUIa|mx*PM{q)<2#$DlU=^qwWG5YdU8H9blI$yUk|47x}xm)Hf z{Tbn6xjDIY>Hda&niuCTKdE}7ez#!YolhMHo`^&*UK=R)QTYHvnfP2Y!CPn4L1l=i LtDnm{r-UW|SYM!5 literal 0 HcmV?d00001 diff --git a/web/static/fap/images/fwap/sc_logo_dark.png b/web/static/fap/images/fwap/sc_logo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..f5ac70ce242b0f6d42146b3ab536dede145b9fe4 GIT binary patch literal 3354 zcmai02{@E%8y;kYP+{yDW33KjDa*{5se_O;TZG1pbsDpn8H{i!IzpvMrNxr5g)Bw3 z>NEhk&l3bahlnL7^3nPDAJnSdF@=gSEU%~TZFg`YD3uJarj;1jbz zD2V{E;RBx=%Pk$_4is2ggip7KDXGozJC8pJ!Kyp9c&vQuFd8+Qf=`_uGBrly9^a91 zzId~+IIUadMsgnLdb&+QU)gIbzSo5_wwjENuDx1Kl3!lVjw>YW?3iQBb8SB>H=Ioz z?v01oH4-HiB4t*0o#=dxudtG65LjEqRRV{XTHT>-3?ymc*eM{rRG$7 zSBb@s9Q^E5ACG$bcv*hYsuW#PZHbBEUrqYf7r{$cJh7aAEs{1eWsXJ{NsItT_``e2 zdBQepXM%OY<)t6?uBgu5YF9RV8|=TgEL$pi!DY3aspvMG#vO0+;7Uv%wEWYD*LU=>>HvDu_ z`+mZc8_m}hJ49qmm0j9!S3VGfYMd($Z9m7HZ@hY1!-d6c+`k5JWZkG=4;1ET}6>)RX14l_!6-xho6 zkyM=~^F$83t%Th0{Glt#ae!xC5nIO5mh%_SE;V4?^FkAai>qjCrE}nQfups-bD~bE-ol>iV%gS~=I)~in#K8jM0l@}+$UHnA#Sulk z06tlLIaiOz)7FEQF0&H}ZTh9e){5p;R>?!nb%Fyg-0N(@&CC~zA!_O zv!pS%ocjQ*+Vw{W zxl)O0^uFZ0iMmCO;ODMg8wz#OG@-IHHjl$KKkkq|B&G^X1HNr_dKOzq1Gx=lBr-s$mHrq`~XUR5j23`t@H(o*XDCDA_L<@uEuC^No3&WY;0d?hhLJp;dLw ziCHT3F_0_MM@QD`%|h6_2=nfyahuKXS(gC!`{I#vyH^@y2Y+3(jhNJ9CJL<7)V-U^ zvX}re9ATxSYYH<~@7T1;UV8Kw=WcaVxT1mVX0d@R91Yn7_4+QM+yFuJK)HkBTb~U< zvV|KJ01)1ag~fRQcT%MR0A4!I$(816V-52r5wtKqB&@F%oj~4V0{{p*Y%3)A(lB5; zA&^Lg(TySB8L+K*8-_x_-zhY_F~rrz9&AFQ_<|2>>1gRfkV0TE7(wyzgE^QU`;or2 zGKK`uXk-`^8X6j^6{@F2qWD8~jEsz++PY9(UCk|qCN+#m!_YN}ROR1`{87i$m+DQy zk!d&*5xiX&gCzyij3JQiMt@#EbP~vaHX>4gOtm#1l#U@ob+ojhe^%Z~L~P9nGokom zXe5dgi4=%Dx@`j3K7d3cQ3FV1u!-Ygunoo=N8DZ`p#P-*=#PMIi~5_$?+$F&{|Em6 z#M5wof7$eJ>bH0PQ~ovzb93;ek^+Ob%|ROIBB1{P{^b(l`<@*I=eyux`%0sug1OVguH79#AMk=Ac~CE6A)ghMs3 zwYmM1lmKR5VrTAMKYM+p%lyonGG>HZYJ?BXfkowqt=8HeubkJM!mII$=K8@d;Ka)q z?pIJ?E0;4JbQyB>$+7z7uiS~C26j{Xw-SFieCjK5bSiZzb!t65JZ+rJ(&=NB;~cM# z2M$*;G&jAH2Nt8=6dcVayQuR!JWRco*{`glhpwUF%J-C=9Q68hu(*k{7Hj$F(Ibz( zQ?HO^<`w`{K04O@6to_*8QAfgIWd)b*2WozL@Y1MM%)pFeM; zhRG7~H&l?ZugxsY{G23VGHVjVVUa814f<-vEr+UW-0+4ny5QIpO?Qxj(1l!W8-H0W zPEI#I48=dpNJ*&_9acYWW@cu;)_Jc=%+$=x#y5)U@9*#E>FIf|s>-mUun-?YqtPO? zr33F57ZcGBvCpdN>+9nc6cnU>o1Kl}+?Cn6qqw!DWw`On27y2jnT}qs_9(8Xs;UYp zdAqhd=-9c?-C2TjCx@9#reVV)S=Cq^`O z&(o@ocKUI2R&V!?jz;Z4i(h>{w&9i1TeSE9Q|B4d_Op`DIl|GDOarjsMZS+!?D-VN zn|HUF`O$Z>sD}2MlYYGYIk~x7yGPjUI>~j7N#ru-?t8jq&6+302Z~=iAIi;_# z-rjcVs;b60b&DvanGeRs#-WUEor&FxU%cSejlG2~MU=IOde5;NWUj06bu+ouVWb;lOZtQ9XqjrpNRGRceslq!LF{3_xY(Y$A>9gf~n_f_l2tp0Si zpqJ`J#Q=F2kexVfBkNVHa|B?((o^Z}Shx1|^>xHznOflXK}b2r!)LF;>x-k-t5EGI z5XxpcSz^j)@7LroF{)mz*Qb)9H>!1ZOp)o?#cu=eC%{pq6`;--CpseC16Cm>;KuR1 z=py>1qM`!m;NbB3GV*~)mdqZXDI)4sZ1 zR8Vj{=*pP)zFBIox}h~6C0#mv1rc4?@n9-1C+FGOUv4Ft7vRsFx&BsECBf<~HCx#G zH}XBr7{fCf&*s?;QJaT3U92od{>3*6kZz@_Q%;q$X1uKXrKuLn8(H$r!K~fqrXasQvEWzC#NX%Z&ze#; zYW`@pp}C8)H0XB7a8$nTzW^6| zAT$u28uw-2n(cXXWBsMmF&*mrBlMPz8Ge&@ZsA47&9vO+i86@K`?w#esHnKPA0-5B zHWKFYt=F-<$5H1uG?3UPJH1UIk8X=yVMVRoTH40nh8Q1dJw)u}xf{&`zn&K5N>!tp z%F6bxc?VUe@q5t3==!Vsv?I^K87ZtK5jIz7E$xh1TT_gHSaKr|NK1EP&)4|JO986k zpvdb!w$##^qxn-_>SMK;%%G0`BtB};iI=)G;pfB;xh3yH54%EKK@P`i^=MPU+8gaX z!I`w>Q^-twK#3j)k$&~+m`Wb>>j~CVuKuFdgv7OT8ts&4tqqiZU!O*+r^We2Mb4F} zCN)i;dXi3*<679fB*j|^{pUAN_Fnn?`EyAVs@cP$xA-1fN;EgI?n-AHHx(U{HapoE zU;ljbCwf_pLEl?4UBzx`Xq+p@ookVwZ^(V#d*GJZu}e$tu}z1K5+n@2Js?T4=bsYs z86W-a0t|=AIdk%pHx*;~;QMZpZ}L literal 0 HcmV?d00001 diff --git a/web/static/fap/images/fwap/shuffle.png b/web/static/fap/images/fwap/shuffle.png new file mode 100644 index 0000000000000000000000000000000000000000..be91a522e56a2601894a1d6f7c16dfeb94418a02 GIT binary patch literal 1217 zcmaJ>ZD<>19KXdabX{U2&MnO*eY_SMCAqisa^`H>X1QdIcqOEf27Fa>c2LkMpvj5t4@?T+Kvm4D0Q8O-UYy4yeLWRZrtLKV8Rxs-*D| zR-{BT3&+&KX$uZd50&NVaXF>n{e7U<<&l5}9SOMFS>5K{G`_3LqqBES;$RozjHmJ2 zK~=;e$Ql*|EJ4L(DoKGPP0)!Rj^kp0p=gSv7?NhjsqrNt-|&U3 zG(P4yCQp*}dYz~z2*VmB=~OD^X)sJ2A>#Iw?nrK2w>z5(0<>jIH67K^fu|@{jY%hs zqeyS3pqYEJy4@%fDj4ZXCP@>Nmr@fbivJJQv^})#l;FSd-ci^tPnnP`LED(LWYoA? zr{~J#vlf&b!zvrb*=7}sV}@hcV}=Q`!z>UbS=Bvz7cYu@LAM=AmtjFj<4A!}RfX@# zCR0?7euU;y98Kq#Q)tO0v-u>Q5Cnl{n_R(=CpD-$O|F8toWO8whVI#y>y3hDBF_S} z)aRg*w+s#Jrp&AR$CBJvufbLB5KAKuZeK2mf+4-e{-@E+D>Oacac^vqu{ZcoN7HVh zv3|Ylx8oRgfGr4_vio!Oqt#Uj+!OU}kzl5E^JL!(;oRlWNUlZ}aJaKubAOvd!+Wp_k+v%%bb7n*i-)VYq5hHH;R2xCh(5> zZSb*e`p(39KY_iIof2zDXVo=U$5yxPY#D6*z>btJ#{KI%~@4fHi z^Z9&#@?I+BAMv-}+fERKKQ}BE@qRb{j~+UR*DL9dy{*g1PB>$z;?!gd5@{8cA;{_S zBrHN%otwS}2ML0tw9#*+aEOcX{b8PE!R|+4Z!zWX~Cn?1l`xx2YgPTd_3L(U1W=MY)V- zoCJj3xKZ^!$e!gguSgiI0IXvR`- z<0`$LE0Y&2C_Bh1A#}P~#X=Q1$gUz22xAc-$%_?%%ovZ277n4qu%t!XMR zWV7M`n-;iOJj!v|a0V~gs4x`e`bAOXB2BJ{lo=fwPLr$N=87%3-YDoM_AEk6n}zC- zg>5}_xd24$+N%E^JD=X{A^S(+sMXs){W>dcrONV7ZvhtnZwXHo}cTYA7+Pl8} z&t4$QDDc;f>z{s8FLed}B&P4XM1SA0_UQ6c109PGv`wEVj4pPQP zV-LPu37p?veqANopF6e`JM+W2xyKKTB>UDEvW**0o)7-wf9tVj6%0IaSAFYn;DgL5 z-^kZJjqdke4U!kNFS{0hs{g)O_@lde51l&F+s>XHIrRP~SC5n)Cb-Xm{>GW$LQlt0 zu8^saKZ2s4B)c~*_FdZOdGWP}4vhLr2YVZ-IzbY?zb_BBExgHjZ%8hi7vIi2bM_xM Cj))%s literal 0 HcmV?d00001 diff --git a/web/static/fap/images/white/next.png b/web/static/fap/images/white/next.png new file mode 100644 index 0000000000000000000000000000000000000000..ed6762f23d47f3aae57f55476f14e5057fffd05b GIT binary patch literal 1091 zcmV-J1ibr+P)4Tx04R}-l+Q~PVHn51vyB)iL11Qkh@nGBs7w}RMCGo(*tBg~f0Po$?CiU{ zle4qa%26U(f|ru*d1uDm5$(qdGxK?$AK&MB z-{F0M8d)(-JtP5n!?BWmQR({Vm{j`_Asj&+!l+YJ+l(X<1E9fUv1@F;hrqupt$X|b zI_lE4ng@jaKh%lTb}(f=ak3uu6-!kMZ8FSKs7BM z|C+c%%_(W1MkH>@24YeH&g(_h@8=*r^~@L^r0;R+=`OQ-d=_TXN_RhT8}a8f>+a#2 z#Pb=gH%8n{&sxUn9rjo_p*gW3k3%Dd9v|?z$wwEp4JbjhwM#!rpOV)g4O?IHuKzA8qHe6NWHQ4?5 zW?+>pP^lFuS83d>RC0Yby(58Yf7(5YU7B8Os@7T+7jCT7FHP^*tHQ2TvC67;&Z}|3 zd?p?hPl_?ILp%pbyd-vt7sYOxofiix8N;NaVZv3ip-`5AN%ERI{+SmG@2t6_p^q8N z(o~6`|AbY@XgUiV(SNxAbMSk`qp>3J!UhhXuG%(|?j0gDE>~^N72v`*x)0t~ZOwEZ z4m|-D&ZtGJ}8;WLk96sqPn3I;4%{fxLET5GkbR{t#`+_*~}`j zbQ|of$TWkHP7s8E4g{p_o1sg$=%t|qPG8di96oFK;;jqv7?{n8(tRu-J z$rIl^|FCgp^`Xw)_Pm2VoZ%(5%<2g~;sB3}{k5Vx)kpY@Lu{j0{4Ks?52OG9 literal 0 HcmV?d00001 diff --git a/web/static/fap/images/white/pause.png b/web/static/fap/images/white/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..84fbe0efafb62676543d3a057441799b3a292c13 GIT binary patch literal 940 zcmV;d15^BoP)4Tx04R}-l+Q~PVHn51vyB)iL11Qkh@nGBs7w}RMCGo(*tBg~f0Po$?CiU{ zle4qa%26U(f|ru*d1uDm5$(qdGxK?$AK&MB z-{F0M8d)(-JtP5n!?BWmQR({Vm{j`_Asj&+!l+YJ+l(X<1E9fUv1@F;hrqupt$X|b zI_lE4ng@jaKh%lTb}(f=ak3uu6-!kMZ8FSKs7BM z|C+c%%_(W1MkH>@24YeH&g(_h@8=*r^~@L^r0;R+=`OQ-d=_TXN_RhT8}a8f>+a#2 z#Pb=gH%8n{&sxUn9rjo_p*gW3k3%Dd9v|?z$wwEp4JbjhwM#!rpOV)g4O?IHuKzA8qHe6NWHQ4?5 zW?+>pP^lFuS83d>RC0Yby(58Yf7(5YU7B8Os@7T+7jCT7FHP^*tHQ2TvC67;&Z}|3 zd?p?hPl_?ILp%pbyd-vt7sYOxofiix8N;NaVZv3ip-`5AN%ERI{+SmG@2t6_p^q8N z(o~6`|AbY@XgUiV(SNxAbMSk`qp>3J!UhhXuG%(|?j0gDE>~^N72v`*x)0t~ZOwEZ z4m|-D&ZtGJ}8;WLk96sqPn3I;4%{fxLET5GkbR{t#`+_*~}`j zbQ|oQ%W*Lefnmt@jSr#mc~o%G>&3%5?@v_DHP9^Xsbs O00004Tx04R}-l+Q~PVHn51vyB)iL11Qkh@nGBs7w}RMCGo(*tBg~f0Po$?CiU{ zle4qa%26U(f|ru*d1uDm5$(qdGxK?$AK&MB z-{F0M8d)(-JtP5n!?BWmQR({Vm{j`_Asj&+!l+YJ+l(X<1E9fUv1@F;hrqupt$X|b zI_lE4ng@jaKh%lTb}(f=ak3uu6-!kMZ8FSKs7BM z|C+c%%_(W1MkH>@24YeH&g(_h@8=*r^~@L^r0;R+=`OQ-d=_TXN_RhT8}a8f>+a#2 z#Pb=gH%8n{&sxUn9rjo_p*gW3k3%Dd9v|?z$wwEp4JbjhwM#!rpOV)g4O?IHuKzA8qHe6NWHQ4?5 zW?+>pP^lFuS83d>RC0Yby(58Yf7(5YU7B8Os@7T+7jCT7FHP^*tHQ2TvC67;&Z}|3 zd?p?hPl_?ILp%pbyd-vt7sYOxofiix8N;NaVZv3ip-`5AN%ERI{+SmG@2t6_p^q8N z(o~6`|AbY@XgUiV(SNxAbMSk`qp>3J!UhhXuG%(|?j0gDE>~^N72v`*x)0t~ZOwEZ z4m|-D&ZtGJ}8;WLk96sqPn3I;4%{fxLET5GkbR{t#`+_*~}`j zbQ|o2nLBl74G65$Ki*vZ8QqkXxjQ6H`tzP(pUZo^)pU;Ksg3?F1q-_9d-j$buMzS_6gC& zE6%YNniNBD&IK%RFlIaFq6z0WTw_+I=_pc4!g-@f&3a17Dz>BQ1CCa)9S63=B{oeA zEUJCi>N)mg7G`WoUU26BW@VQoPV^JE*vYBo;I79LPNtwf{DCWM4Otw5A8{Bit1-2h YzltPrcI_bbqW}N^07*qoM6N<$g38zKb^rhX literal 0 HcmV?d00001 diff --git a/web/static/fap/images/white/playlist.png b/web/static/fap/images/white/playlist.png new file mode 100644 index 0000000000000000000000000000000000000000..0a5859a12c1696ae9157c59afeb243411d3b73d7 GIT binary patch literal 1024 zcmbVLJ#W)M7ekYK0|cO~|nkWvxd8TeaPQO z_ZIl~-1%HCkD1$NTXe|Aentc*qyqvvvA;{Y#1D_&ej^P*m>)*HKI?n0tboRnU)o4T zoN}}vG**k$5B3NH1F{<>w)pexiwL677T;(d^wJg?MQg_y**aeD1;=}V8H%efK%=lY zK}?trig-WCt-=;3ycXY=*RlvECT!0Zubk?88=yrq0yGI$1E@owBMH@1!!Vu!1tKUz zMMg>$8CFfPAOzD#QB|brE<&zS*EQ8_Duz*a%{JE24BJU^ z<|hG}=|)_4imly>wOSeR8O?f>?$0`4V?-IvM>GYkEe&{n5GCcgEYDT6m}Jo*3ELTs z!6d&{bb~(B{*Bu-)s_kChVDYmbukvF*zkXHCUa-xvN`^0mf02Wz;b)t`uuP`JS5>0 zlkw4b+PFO9V+A|d=@plQUk~mqew}YOEB%vAT-h1CSA4Tx04R}-l+Q~PVHn51vyB)iL11Qkh@nGBs7w}RMCGo(*tBg~f0Po$?CiU{ zle4qa%26U(f|ru*d1uDm5$(qdGxK?$AK&MB z-{F0M8d)(-JtP5n!?BWmQR({Vm{j`_Asj&+!l+YJ+l(X<1E9fUv1@F;hrqupt$X|b zI_lE4ng@jaKh%lTb}(f=ak3uu6-!kMZ8FSKs7BM z|C+c%%_(W1MkH>@24YeH&g(_h@8=*r^~@L^r0;R+=`OQ-d=_TXN_RhT8}a8f>+a#2 z#Pb=gH%8n{&sxUn9rjo_p*gW3k3%Dd9v|?z$wwEp4JbjhwM#!rpOV)g4O?IHuKzA8qHe6NWHQ4?5 zW?+>pP^lFuS83d>RC0Yby(58Yf7(5YU7B8Os@7T+7jCT7FHP^*tHQ2TvC67;&Z}|3 zd?p?hPl_?ILp%pbyd-vt7sYOxofiix8N;NaVZv3ip-`5AN%ERI{+SmG@2t6_p^q8N z(o~6`|AbY@XgUiV(SNxAbMSk`qp>3J!UhhXuG%(|?j0gDE>~^N72v`*x)0t~ZOwEZ z4m|-D&ZtGJ}8;WLk96sqPn3I;4%{fxLET5GkbR{t#`+_*~}`j zbQ|otHv*TDei1zDi&fI0CxBRPZHW5x4@D`9%Yx zY2XYvh_yfhc7Q{m1AGEyO-(^DVl*Hhz$I`O>lEVya1Ojj))W+uO)2VridtvX6ZI|l zdhk8b zfEG|S_&7FHQriJ5zN-kHA4m~(v)6e>f70lOm>5lr{?X_QR;5Dzxbl4m00000NkvXX Hu0mjfbjSJV literal 0 HcmV?d00001 diff --git a/web/static/fap/images/white/sc_logo_dark.png b/web/static/fap/images/white/sc_logo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..73ab32606855052811304004d2118cc975b61214 GIT binary patch literal 1952 zcmaJ?Yfw{X8qO@#ctb%hMQZCYkqU)eK|&%BLr$VmL%9S2+cM^IfYX?qT#h8*B?`la zBuJa83%KcK7B7`rNC7WMbL zeZTj8W{xQ}WrN?su!T4r&QGurOvly~>|H#69`?P)vJ_*>a+H^iW*~W}POO1&92p{k z0D(fB52Zt5S&_OIO2FZK2(Ty{%@%H9Nf8BE?8T7v3Kho2;S$(-l~^i=P(T9Z!^%X$ zgtLPHz_LU_)>5ZXdqxMnM#sUte`=CZ9rMGMQctI-P_eNZKML zD%O*fTH>q%2x+AnScSrf67VXDCCE-Rk$_eD+Z7b5x3Ws@n>Jw$qv*vd3XM$lUTGF6 z6#jpxLh%-@Mbn|*>;0d?T2YY-qNGDwWT!@o4K9!9O{HRSHINuZG$I7qG26w|0t7|0 z1&9jZW~>E-VkxZj#;@^0AxogtqGF{K5`c*WOo0r;G8V|=#esA%nVTHXqtSSD4mUQL z!;IxJVrhIXHJ(1p1rg~^1*Al0xw7B6+&Q^kD=1W0W)RZAg^-M|K@`C2E3@FaYhli* z_l7H*yB5xzTnbhU#XH#l8uaWD<{t0%t!=U3t??lx=5`Hc>$|+w3LMTiNC0v~`oWPZ zd3k1LP|w79-KCqm4{xiho>&%BPhGKb_4hlr5PdkrKXCjHO{Xq1mk0xbe?5LIEaEZu z`SGS>k1~hxz4)BkaQX5tfB%PD&1G)0W$~+u;3@MzWV=#oA7+G{d-W|~2S-tIfl_f;IV9$qaZmjt)(?i5O zOW0`j-(2!rt29kpARtXMP?lEc|y)`<|XYWAo=9J%|KPKJaiQXZ1@4 zuDgpKI|~Y}#miqRruTk*avj$`P_*d+z%qSYGxn`sl(64#%D=8&R%QsXNL{DFX#bVw zMal!T!eH32|ECR-8kelKYZYvrA$G!3*F_%8$!N#Wx(_!Kd4{bm2Bn zmAcWQg`j?c(BfKnV1zR^ys0cycD+ z6|k`Moy&s9fAn0Tp>2|zUtZ03J*z#%YW!rowJ!T{JoKJl}kVkqMFlposRoa-tOU^wa_vO?_Iw!BKyp$!i)PLi+@6hyzjovTy z6V9-1RIF!bH8{1Y{D`Zq?Xl@lsd`a)$=_=_Ysc{DEp2B?t!upJ?&0`GMx6pbxxSHi zAu4HmZgX9S-g+RkuU}$)(WGCw!4(j*bc1kBX!MPwLO4GyHe>oq*!bm~K0cd29M2!k zNhJkqFY-r@CV%$X*QDo+kJ6U@@QZKec+jRk$$H}9f6a%dPPj%NZV6w(IDqc*8`u*n z6VJp&4wY2)fFw>E_Mriq5x#-9u=+RWlR&YS@Q(GbJBa(k_#7vICH z>k#FN54DaRx3^p?yLoQ%q2mbSb(?ziFWff?#9Q{WjL6Bhqcf*V9oJt~;e2pW W*3DnMGS;+u|Cs__3fPdmz2rYr&nsX6 literal 0 HcmV?d00001 diff --git a/web/static/fap/images/white/shuffle.png b/web/static/fap/images/white/shuffle.png new file mode 100644 index 0000000000000000000000000000000000000000..c87835d702b14ce171e0f9ae68f4359387f070f2 GIT binary patch literal 1231 zcmbVMZD`zN98Y&5y0zuD`LbDxX*TxBOP-{c0G^2Bkb&pF!_)Pd$mgjns0m9QCqAZ^SBlRmFi=O0!B3 z&l$=D%tJ++IkyJ;Ff3Ho3q`LepAuEeAeBIe^bH%KF|04)+lo2`J-h@bbTdvo_ zHx(y#oGQx0c*b%d&XORa0uJCDP13zlp66e}89)OHFci&1XkP4PL;&#SLm+F8Ru=Qp zK+_hI;>4uq*&;<%t5vevOIpqZMGJxua4<{+X++!^(^LG2=^kq_NYGUs-S%|L!~;g9 zWKDZ<0(rU<@F0tu06NOSn`HD@^B%lla+n(FDJzbbVF*oCIUJJXqt}#o&j8prejh%EpRD% zARXnI6qjmo?1jx{CBXC1G|h5Zn$9vYj*SXwhUa5hVL;;O7B*+Po?@!7WmiXbo7mK2 zv0}!7if1_m%c`_GV0hBMALe5Y@bNs7WT1Th@gY9nXBVl)Vpou2NL8Fm;`P`dm zthRDes^I@zdbG8b2whAboO`WpbENYAsrJu8I)3NC>Y*a6lOO)|E|#eKZ1|PhSm({} zlVfeGqg$8vg+D!<>ppS~`{B{P)oTm)U$1num3r~>p}QxO%LnF++QZI5_uxA(hN;lq z2ODE^mol}7k#HBbNiI%(F@MjfebxDPKPWePdY)K4JAC8JkM}n0qi?J?qKnEe^4QQjvoP;={rcNzaryRz_2hehmeZRvi{E{MT_tY4+BILAK5=N};79du*Y5We4kylh z{AK3sTkWLsM}O#>-y3yfVd>eMC)NkcKZUNWJil>#jSf@er3K~)Yu{>IAIFomHtcqL V_noDuKbM1FOfEYlEv3gV{0%Rkm$Co= literal 0 HcmV?d00001 diff --git a/web/static/fap/images/white/volume.png b/web/static/fap/images/white/volume.png new file mode 100644 index 0000000000000000000000000000000000000000..107b2ec629a6a46806b7d343dc4de6d490378262 GIT binary patch literal 1236 zcmbVMUu@e%7 zw4km7Y0Elb9V*%;@vyyBLfSxk+<;Z1mHIMGh=&acflvnzJfMm_3<*)rZBsz1_JAe( z?z{Vbzwf_K5A+{uZRu>GD5^DcSk94k2YK5=kCE@q#0`Jh=_v(o&@OpZ)xlIkw~H8L zOm!INu&R$ATf)5*6)YL~f>+2Mku=+ksJ>35W>yHAqI&yk6;&I-9w_2r!-~_tUH^&( zh90M1i)LZAlEP)<@Pva0C;Ic+#E2&9bl*#$wlU?uRB%94uF*HU=WSKum*VucoacBoFE7X0SggiAj=>&j0CBNl^_Hg4^6B&dP&O3 z=?z;%iqmD!t4It}tyUw|o`~%XGe{IgpMzz?L?i5uTb^1ATW(i_LB_7;7!}X3E#Nb% zMSIMP)5O#D5X?$8yGd-h8;K$*V`^%JK@rH9rXSauw(I5aKW=QP?dHcTn8{(+9&VL%t&MMmp*kq$ujBY-?jCw!DlSr^!u3H*^W27(__mpuj>thEPmSCPhAh z(n(HW6MUk0w9KOhHe2gcfYe|VWL3?ueAzG0dbBcjjJL3!c5D-@*uJ~|uwJ+E{dN%b5Slm;1@Iq5^4qs|-JASfgIIXk6qW$9OBXb9aKN|Vb z1bTbKv&NN-xb1ks)#@^D&X)*D| z_sWM)91pB)2klKoaqe!{-f(t0cyZ?L)yrJp?BuD%?t3r4!o4^2=h@|sP|G{d%?aw8 zub%kk=o0!Y)H!+P-13df5BBA@>CFrKXTA*F|242u1wRLVdVApfnZ!c9>EIpimu(+p zFDyP^?&#mO0GGY``{5H0yI;S(tMl5>=eIiQ_oia?Z$tC=0;j--)if(d[a][j].priority<=e){d[a].splice(j+1,0,k),i=!0;break}i||d[a].unshift(k)}return c},unsubscribe:function(a,b){if(!!d[a]){var c=d[a].length,e=0;for(;e=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('
').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);var r=this.element[0],i=!1;while(r&&(r=r.parentNode))r==document&&(i=!0);if(!i&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.leftu[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.topu[3]?f-this.offset.click.topu[2]?l-this.offset.click.left=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?e.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){t==="disabled"?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(t);var i=null,s=e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")==r)return i=e(this),!1});e.data(t.target,r.widgetName+"-item")==r&&(i=e(t.target));if(!i)return!1;if(this.options.handle&&!n){var o=!1;e(this.options.handle,i).find("*").andSelf().each(function(){this==t.target&&(o=!0)});if(!o)return!1}return this.currentItem=i,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){var i=this.options;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),i.containment&&this._setContainment(),i.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",i.cursor)),i.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",i.opacity)),i.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",i.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(var s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(!u)continue;if(s.instance!==this.currentContainer)continue;if(o!=this.currentItem[0]&&this.placeholder[u==1?"next":"prev"]()[0]!=o&&!e.contains(this.placeholder[0],o)&&(this.options.type=="semi-dynamic"?!e.contains(this.element[0],o):!0)){this.direction=u==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(!t)return;e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1},cancel:function(){if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left,c=r+f>u&&r+fs&&t+le[this.floating?"width":"height"]?c:s0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return e!=0&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t)for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var s=r.length-1;s>=0;s--)r[s][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))}}for(var s=r.length-1;s>=0;s--){var f=r[s][1],l=r[s][0];for(var u=0,c=l.length;u=0;n--){var r=this.items[n];if(r.instance!=this.currentContainer&&this.currentContainer&&r.item[0]!=this.currentItem[0])continue;var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight());var s=i.offset();r.left=s.left,r.top=s.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var n=this.containers.length-1;n>=0;n--){var s=this.containers[n].element.offset();this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n=t.options;if(!n.placeholder||n.placeholder.constructor==String){var r=n.placeholder;n.placeholder={element:function(){var n=e(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(n.style.visibility="hidden"),n},update:function(e,i){if(r&&!n.forcePlaceholderSize)return;i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))}}}t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n=null,r=null;for(var i=this.containers.length-1;i>=0;i--){if(e.contains(this.currentItem[0],this.containers[i].element[0]))continue;if(this._intersectsWith(this.containers[i].containerCache)){if(n&&e.contains(this.containers[i].element[0],n.element[0]))continue;n=this.containers[i],r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0)}if(!n)return;if(this.containers.length===1)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else{var s=1e4,o=null,u=this.containers[r].floating?"left":"top",a=this.containers[r].floating?"width":"height",f=this.positionAbs[u]+this.offset.click[u];for(var l=this.items.length-1;l>=0;l--){if(!e.contains(this.containers[r].element[0],this.items[l].item[0]))continue;if(this.items[l].item[0]==this.currentItem[0])continue;var c=this.items[l].item.offset()[u],h=!1;Math.abs(c-f)>Math.abs(c+this.items[l][a]-f)&&(h=!0,c+=this.items[l][a]),Math.abs(c-f)this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top));if(n.grid){var u=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1];o=this.containment?u-this.offset.click.topthis.containment[3]?u-this.offset.click.topthis.containment[2]?a-this.offset.click.left=0;i--)n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(var i=0;i

Creating Playlist...

'; + + $('body').append(fapDom); + + $wrapper = $('body').children('#fap-wrapper'); + $main = $wrapper.children('#fap-main'); + + if(options.layout == "fullwidth") { + $wrapper.addClass('fap-fullwidth').css({background: options.wrapperColor, 'borderColor': options.strokeColor}); + } + else if(options.layout == "boxed") { + $wrapper.addClass('fap-boxed'); + $main.css({background: options.wrapperColor, 'borderColor': options.strokeColor}); + } + + if(isPopupWin) { + $wrapper.addClass('fap-popup-skin'); + } + + //change wrapper css for mobile + if(_detectMobileBrowsers()) { + $wrapper.css({position: 'absolute'}) + } + + //position main wrapper + if(isPopupWin) { + $main.css({'marginLeft': 10, 'marginRight': 10}); + } + else if(options.mainPosition == 'center') { + $main.css({'marginLeft': 'auto', 'marginRight': 'auto'}); + } + else if(options.mainPosition == 'right') { + $main.css({'float': 'right', 'marginRight': 10}); + } + else { + $main.css({'marginLeft': 10}); + } + + options.wrapperPosition == 'top' ? $main.children('#fap-wrapper-switcher').addClass('fap-bordered-bottom').css({'bottom': -15, 'borderTop': 'none'}) : $main.children('#fap-wrapper-switcher').addClass('fap-bordered-top').css({'top': -15, 'borderBottom': 'none'}); + + //set default wrapper position + options.opened ? $.fullwidthAudioPlayer.setPlayerPosition('open', false) : $.fullwidthAudioPlayer.setPlayerPosition('close', false); + + //switcher handler + $main.children('#fap-wrapper-switcher').click(function() { + options.opened ? $.fullwidthAudioPlayer.setPlayerPosition('close', true) : $.fullwidthAudioPlayer.setPlayerPosition('open', true); + }); + + soundManager.onready(_onSoundManagerReady); + }; + + function _addTrackToPopup(html, playIt) { + + if( !window.fapPopupWin || window.fapPopupWin.closed ) { + + var windowWidth = 980; + var centerWidth = (window.screen.width - windowWidth) / 2; + var centerHeight = (window.screen.height - totalHeight) / 2; + var isChrome = /Chrome/i.test(navigator.userAgent); + + window.fapPopupWin = window.open(options.popupUrl, '', 'menubar=no,toolbar=no,location=yes,status=no,width='+windowWidth+',height='+(isChrome ? totalHeight+30 : totalHeight)+',left='+centerWidth+',top='+centerHeight+''); + + if(window.fapPopupWin == null) { + alert("Pop-Up Music Player can not be opened. Your browser is blocking Pop-Ups. Please allow Pop-Ups for this site to use the Music Player."); + } + $(window.fapPopupWin).load(function() { + $(window.fapPopupWin).animate({innerHeight: totalHeight}, 500); + $('.fap-single-track[data-autoenqueue="yes"]').each(function(i, item) { + var node = $(item); + html += _createHtmlFromNode(node); + }); + options.autoPlay = playIt; + window.fapPopupWin.initPlayer(options, html); + playlistCreated = true; + }); + + } + else { + var $node = $(html); + $.fullwidthAudioPlayer.addTrack($node.attr('href'), $node.attr('title'), ($node.data('meta') ? $('body').find($node.data('meta')).html() : ''), $node.attr('rel'), $node.attr('target'), playIt); + + } + + } + + function _onSoundManagerReady() { + + if(options.playlist) { + var playlistDom = '
    '; + $playlistWrapper = $(playlistDom).css('height', options.playlistHeight); + } + + if(options.xmlPath) { + //get playlists from xml file + $.ajax({ type: "GET", url: options.xmlPath, dataType: "xml", cache: false, success: function(xml) { + + var playlists = $(xml).find('playlists'), + playlistId = options.xmlPlaylist ? playlistId = options.xmlPlaylist : playlistId = playlists.children('playlist:first').attr('id'); + + _createInitPlaylist(playlists.children('playlist[id="'+playlistId+'"]').children('track')); + + //check if custom xml playlists are set in the HTML document + $('.fap-xml-playlist').each(function(i, playlist) { + var $playlist = $(playlist); + $playlist.append('

    '+playlist.title+'

      '); + //get the start playlist + playlists.children('playlist[id="'+playlist.id+'"]').children('track').each(function(j, track) { + var $track = $(track); + var targetString = $track.attr('target') ? 'target="'+$track.attr('target')+'"' : ''; + var relString = $track.attr('rel') ? 'rel="'+$track.attr('rel')+'"' : ''; + var metaString = $track.find('meta') ? 'data-meta="#'+playlist.id+'-'+j+'"' : ''; + $playlist.children('ul').append('
    • '+$track.attr('title')+'
    • '); + $playlist.append(''+$track.find('meta').text()+''); + }); + }); + + }, + error: function() { + alert("XML file could not be loaded. Please check the XML path!"); + } + }); + } + else { + _createInitPlaylist($elem.children('a')); + } + }; + + function _createInitPlaylist(initTracks) { + + if(options.storePlaylist) { + var initFromBrowser = Boolean(amplify.store('fap-playlist')); + } + + initTracks = initFromBrowser ? JSON.parse(amplify.store('fap-playlist')) : initTracks; + + + $elem.bind('fap-tracks-stored', function() { + + ++loadingIndex; + if(loadingIndex < initTracks.length) { + //get stored playlist from browser when available + if(options.storePlaylist && initFromBrowser) { + var initTrack = initTracks[loadingIndex]; + + $.fullwidthAudioPlayer.addTrack(initTrack.stream_url, initTrack.title, initTrack.meta, initTrack.artwork_url, initTrack.permalink_url, options.autoPlay); + } + else { + var initTrack = initTracks.eq(loadingIndex); + + $.fullwidthAudioPlayer.addTrack(initTrack.attr('href'), initTrack.attr('title'), options.xmlPath ? initTrack.children('meta').text() : $elem.find(initTrack.data('meta')).html(), initTrack.attr('rel'), initTrack.attr('target'), options.autoPlay); + } + } + else { + $elem.unbind('fap-tracks-stored'); + if(options.randomize) { _shufflePlaylist(); } + + _buildPlayer(); + } + }).trigger('fap-tracks-stored'); + + }; + + + + //********************************************* + //************** DOM INTERFACE **************** + //********************************************* + + function _buildPlayer() { + + //remove init text + $main.children('p').remove(); + + //create meta wrapper + $main.append('

      '); + + $metaWrapper = $main.children('#fap-meta-wrapper').css('height', options.height-10); + + //add a cover replacement + _createCoverReplacement(document.getElementById('fap-cover-replacement'), options.coverSize[0], options.coverSize[1]); + + //append social links if requested + if(options.socials) { + $metaWrapper.append(''); + } + + //create ui wrapper + $uiWrapper = $main.append('
      ').children('#fap-ui-wrapper').css('height', options.height); + + //append UI Wrapper + var $uiNav = $uiWrapper.append('
      ').children('#fap-ui-nav'); + + $uiNav.css('margin-top', options.height * 0.5 - $uiNav.height() * 0.5); + + //append previous button + $uiNav.append('').children('#fap-previous').click(function() { + $.fullwidthAudioPlayer.previous(); + return false; + }); + + //append play/pause button + $uiNav.append('').children('#fap-play-pause').click(function() { + $.fullwidthAudioPlayer.toggle(); + return false; + }); + + //append next button + $uiNav.append('').children('#fap-next').click(function() { + $.fullwidthAudioPlayer.next(); + return false; + }); + + //append time bar + var rightPositionTimeBar = $uiWrapper.children('div:first').length ? $uiWrapper.width()-$uiWrapper.children('div:first').position().left+20 : 0; + $uiWrapper.append('
      00:00:0000:00:00
      '); + + $uiWrapper.find('#fap-loading-bar, #fap-progress-bar').click(function(evt) { + var progress = (evt.pageX - $(this).parent().offset().left) / timeBarWidth; + player.setPosition(progress * player.duration); + _setSliderPosition(progress); + }); + + //append volume bar if requested - hidden for mobile browsers + if(options.volume) { + var rightPositionVolume = options.playlist || options.shuffle ? 60 : 20; + if(isPopupWin) { rightPositionVolume = options.shuffle ? 60 : 20; } + $uiWrapper.append('
      '); + + $uiWrapper.children('#fap-volume-sign').css('margin-top', options.height * 0.5 - $uiWrapper.children('#fap-volume-sign').height() * 0.5); + + $uiWrapper.find('#fap-volume-bar').click(function(evt) { + var value = (evt.pageX - $(this).offset().left) / volumeBarWidth; + $.fullwidthAudioPlayer.volume(value); + }); + } + + //create visual playlist if requested - hidden for mobile browsers + if(options.playlist) { + + if(options.wrapperPosition == 'bottom') { + $main.append('
      ').append($playlistWrapper); + $playlistWrapper.css({'marginTop': options.offset}); + } + else { + $main.prepend('
      ').prepend($playlistWrapper); + $playlistWrapper.css({'marginBottom': options.offset}) + } + + //init scroll bar + $playlistWrapper.niceScroll({cursorcolor: options.mainColor, cursorborder: 'none', autohidemode: false}); + $playlistWrapper.getNiceScroll().hide(); + $('.nicescroll-rails').hover( + function() { + $playlistWrapper.getNiceScroll().resize().show(); + }, + function() { + $playlistWrapper.getNiceScroll().resize().hide(); + } + ); + $playlistWrapper.hover( + function() { + $playlistWrapper.getNiceScroll().resize().show(); + }, + function() { + $playlistWrapper.getNiceScroll().resize().hide(); + } + ); + + //make playlist sortable + if(options.sortable) { + var oldIndex; + $playlistWrapper.sortable().bind('sortstart', function(evt, ui) { + ui.item.addClass('fap-prevent-click'); + oldIndex = $playlistWrapper.children('li').index(ui.item); + }); + + $playlistWrapper.sortable().bind('sortupdate', function(evt, ui) { + var targetIndex = $playlistWrapper.children('li').index(ui.item); + var item = tracks[oldIndex]; + var currentTitle = tracks[currentIndex].title; + tracks.splice(oldIndex, 1); + tracks.splice(targetIndex, 0, item); + _updateTrackIndex(currentTitle); + if(options.storePlaylist) { amplify.store('fap-playlist', JSON.stringify(tracks)); } + }); + } + + if(!isPopupWin) { + //playlist switcher + $uiWrapper.append(''); + $uiWrapper.children('#fap-playlist-toggle').click(function() { + playlistIsOpened ? $.fullwidthAudioPlayer.setPlayerPosition('closePlaylist', true) : $.fullwidthAudioPlayer.setPlayerPosition('openPlaylist', true); + return false; + }); + + } + else { + //open playlist when player is in the pop-up window + $.fullwidthAudioPlayer.setPlayerPosition('openPlaylist', false); + } + + } + + //append shuffle buttin if requested + if(options.shuffle) { + + $uiWrapper.append(''); + + $uiWrapper.children('#fap-playlist-shuffle').click(function() { + _shufflePlaylist(); + return false; + }); + + } + + //hover for rounded buttons in the ui wrapper + $uiWrapper.find('a').hover( + function() { + $(this).css('backgroundColor', options.fillColorHover); + }, + function() { + $(this).css('backgroundColor', options.fillColor); + } + ); + + //register keyboard events + if(options.keyboard) { + $(document).keyup(function(evt) { + switch (evt.which) { + case 32: + $.fullwidthAudioPlayer.toggle(); + break; + case 39: + $.fullwidthAudioPlayer.next(); + break; + case 37: + $.fullwidthAudioPlayer.previous(); + break; + case 38: + $.fullwidthAudioPlayer.volume((currentVolume / 100)+.05); + break; + case 40: + $.fullwidthAudioPlayer.volume((currentVolume / 100)-.05); + break; + } + }); + } + + //add margin for p elements in meta wrapper + $metaWrapper.children('p').css('marginLeft', options.coverSize[0] + 10); + + //fire on ready handler + $elem.trigger('onFapReady'); + playlistCreated = true; + + $('.fap-single-track[data-autoenqueue="yes"]').each(function(i, item) { + var node = $(item); + jQuery.fullwidthAudioPlayer.addTrack(node.attr('href'), node.attr('title'), $('body').find(node.data('meta')).html(), node.attr('rel'), node.attr('target'), false); + + }); + + //start playing track when addTrack method is called + $elem.bind('fap-tracks-stored', function(evt, trackIndex) { + if(playAddedTrack) { $.fullwidthAudioPlayer.selectTrack(trackIndex, playAddedTrack); } + }); + + //select first track when playlist has tracks + $.fullwidthAudioPlayer.selectTrack(0, /Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent) ? false : options.autoPlay); + options.autoPlay ? $elem.trigger('onFapPlay') : $elem.trigger('onFapPause'); + + }; + + function _documentTrackHandler() { + + if($elem.jquery >= "1.7"){ + $('body').on('click', '.fap-my-playlist li a, .fap-single-track', _addTrackFromDocument); + $('body').on('click', '.fap-add-playlist', _addTrackFromDocument); + } + else { + $('body').delegate('.fap-my-playlist li a, .fap-single-track', 'click', _addTrackFromDocument); + $('body').delegate('.fap-add-playlist', 'click', _addTrackFromDocument); + } + + function _addTrackFromDocument() { + if(!playlistCreated) { return false; } + var node = $(this), + playIt = true; + + if(node.data('enqueue')) { + playIt = node.data('enqueue') == 'yes' ? false : true; + } + + if(popupMode) { + //adding whole plalist to the player + if(node.hasClass('fap-add-playlist')) { + var playlistId = node.data('playlist'), + tracks = jQuery('ul[data-playlist="'+playlistId+'"]').first().children('li').find('.fap-single-track'), + html = _createHtmlFromNode($(tracks.get(0))); + + if(tracks.size() == 0) { return false; } + + //add first track to pop-up to open it + _addTrackToPopup(html, playIt); + tracks.splice(0, 1); + + window.fapReady = window.fapPopupWin.addTrack != undefined; + //start interval for adding the playlist into the pop-up player + var interval = setInterval(function() { + if(window.fapReady) { + clearInterval(interval); + tracks.each(function(i, item) { + _addTrackToPopup(item, playIt); + }); + } + }, 50); + } + //adding a single track to the player + else { + var html = _createHtmlFromNode(node); + _addTrackToPopup(html, playIt); + } + + } + else { + //adding whole plalist to the player + if(node.hasClass('fap-add-playlist')) { + var playlistId = node.data('playlist'), + tracks = jQuery('ul[data-playlist="'+playlistId+'"]').first().children('li').find('.fap-single-track'); + + if(tracks.size() == 0) { return false; } + + loadingIndex = -1; + $elem.bind('fap-tracks-stored', function() { + ++loadingIndex; + if(loadingIndex < tracks.size()) { + var $track = tracks.eq(loadingIndex); + $.fullwidthAudioPlayer.addTrack($track.attr('href'), $track.attr('title'), $('body').find($track.data('meta')).html(), $track.attr('rel'), $track.attr('target'), (loadingIndex == 0 && playIt)); + } + else { + $elem.unbind('fap-tracks-stored'); + } + + }).trigger('fap-tracks-stored'); + } + //adding a single track to the player + else { + $.fullwidthAudioPlayer.addTrack(node.attr('href'), node.attr('title'), $('body').find(node.data('meta')).html(), node.attr('rel'), node.attr('target'), playIt); + } + + } + + return false; + }; + + }; + + + //********************************************* + //************** API METHODS ****************** + //********************************************* + + //global method for playing the current track + $.fullwidthAudioPlayer.play = function() { + if(currentIndex == -1) { + $.fullwidthAudioPlayer.next(); + } + if(tracks.length > 0) { + if(player.playState) { + player.resume(); + } + else { + player.play(); + } + + $uiWrapper.find('#fap-play-pause').removeClass('fap-play').addClass('fap-pause'); + paused = false; + $elem.trigger('onFapPlay'); + } + }; + + //global method for pausing the current track + $.fullwidthAudioPlayer.pause = function() { + if(tracks.length > 0) { + player.pause(); + $uiWrapper.find('#fap-play-pause').removeClass('fap-pause').addClass('fap-play'); + paused = true; + $elem.trigger('onFapPause'); + } + }; + + //global method for pausing/playing the current track + $.fullwidthAudioPlayer.toggle = function() { + if(paused) { + $.fullwidthAudioPlayer.play(); + } + else { + $.fullwidthAudioPlayer.pause(); + } + }; + + //global method for playing the previous track + $.fullwidthAudioPlayer.previous = function() { + if(tracks.length > 0) { + $.fullwidthAudioPlayer.selectTrack(currentIndex-1, true); + } + }; + + //global method for playing the next track + $.fullwidthAudioPlayer.next = function() { + if(tracks.length > 0) { + $.fullwidthAudioPlayer.selectTrack(currentIndex+1, true); + } + }; + + $.fullwidthAudioPlayer.volume = function(value) { + if(tracks.length > 0) { + if(value < 0 ) value = 0; + if(value > 1 ) value = 1; + currentVolume = value * 100; + if(player) { player.setVolume(currentVolume); } + $uiWrapper.find('#fap-volume-progress').width(value * volumeBarWidth); + } + }; + + //global method for adding a track to the playlist + $.fullwidthAudioPlayer.addTrack = function(trackUrl, title, meta, cover, linkUrl, playIt) { + if(trackUrl == null || trackUrl == '') { + alert('The track with the title "'+title+'" does not contain a track URI to a MP3 file or to a soundcloud resource!'); + return false; + } + + if ( title === undefined ) { + title = ''; + } + if ( meta === undefined ) { + meta = ''; + } + if ( cover === undefined ) { + cover = ''; + } + if ( linkUrl === undefined ) { + linkUrl = ''; + } + if ( playIt === undefined ) { + playIt = false; + } + + if(popupMode && window.fapPopupWin && !window.fapPopupWin.closed) { + window.fapPopupWin.addTrack(trackUrl,title,meta,cover,linkUrl, playIt); + window.fapPopupWin.focus(); + return false; + } + + if(options.base64) { + trackUrl = _decodebase64(trackUrl); + } + + playAddedTrack = playIt; + if(RegExp('http(s?)://soundcloud').test(trackUrl) || RegExp('http(s?)://official.fm').test(trackUrl)) { + _getTracksFromExternalSource(trackUrl); + } + else { + var li = _storeTrackDatas({stream_url: trackUrl, title: title, meta: meta, artwork_url: cover, permalink_url:linkUrl}); + $elem.trigger('onFapTracksAdded', [tracks]); + $elem.trigger('fap-tracks-stored', [li]); + } + + if(!options.opened && playIt && !isPopupWin) { + $.fullwidthAudioPlayer.setPlayerPosition('open', true); + } + }; + + //select a track by index + $.fullwidthAudioPlayer.selectTrack = function(index, playIt) { + + if(tracks.length <= 0) { + $.fullwidthAudioPlayer.clear(); + return false; + } + + if(index == currentIndex) { + $.fullwidthAudioPlayer.toggle(); + return false; + } + else if(index < 0) { currentIndex = tracks.length - 1; } + else if(index >= tracks.length) { + currentIndex = 0; + playIt = options.loopPlaylist; + } + else { currentIndex = index; } + + paused = !playIt; + + var isSoundcloud = RegExp('http(s?)://soundcloud').test(tracks[currentIndex].permalink_url); + + //reset + $uiWrapper.find('#fap-progress-bar').width(0); + $uiWrapper.find('#fap-total-time, #fap-current-time').text('00:00:00'); + + $metaWrapper.children('#fap-current-cover').attr('src', tracks[currentIndex].artwork_url); + $metaWrapper.children('#fap-current-title').html(tracks[currentIndex].title); + $metaWrapper.children('#fap-current-meta').html(isSoundcloud ? tracks[currentIndex].genre : tracks[currentIndex].meta); + + if(!tracks[currentIndex].artwork_url) { + $metaWrapper.children('#fap-current-cover').hide(); + $metaWrapper.children('#fap-cover-replacement').show(); + } + else { + $metaWrapper.children('#fap-current-cover').show(); + $metaWrapper.children('#fap-cover-replacement').hide(); + } + + if(tracks[currentIndex].permalink_url) { + $metaWrapper.children('#fap-social-links').children('a').show(); + var facebookLink = 'http://www.facebook.com/sharer.php?u='+encodeURIComponent(tracks[currentIndex].permalink_url); + var twitterLink = 'http://twitter.com/share?url='+encodeURIComponent(tracks[currentIndex].permalink_url)+'&text='+encodeURIComponent(tracks[currentIndex].title)+''; + + $metaWrapper.find('#fap-social-links a:eq(0)').attr('href', facebookLink); + $metaWrapper.find('#fap-social-links a:eq(1)').attr('href', twitterLink); + $metaWrapper.find('#fap-social-links a:eq(2)').attr('href', tracks[currentIndex].permalink_url+'/download'); + $metaWrapper.find('#fap-social-links a:eq(3)').attr('href', tracks[currentIndex].permalink_url); + } + else { + $metaWrapper.children('#fap-social-links').children('a').hide(); + } + + if($playlistWrapper) { + $playlistWrapper.children('li').css('background', 'none'); + $playlistWrapper.children('li').eq(currentIndex).css('background', options.activeTrackColor); + $playlistWrapper.scrollTop($playlistWrapper.children('li').eq(0).outerHeight(true) * currentIndex); + } + + if(playIt) { + $uiWrapper.find('#fap-play-pause').removeClass('fap-play').addClass('fap-pause'); + } + else { + $uiWrapper.find('#fap-play-pause').removeClass('fap-pause').addClass('fap-play'); + } + + //destroy sound + if(player) { + player.destruct(); + } + + //options for soundmanager + var soundManagerOptions = { + id: 'fap_sound', + autoPlay: playIt, + autoLoad: options.autoLoad, + volume: currentVolume, + whileloading: _onLoading, + whileplaying: _onPlaying, + onfinish: _onFinish, + onload: _onLoad + }; + + if(isSoundcloud) { + $metaWrapper.children('#fap-social-links').children('a:eq(3)').show(); + if(tracks[currentIndex].downloadable) { $metaWrapper.children('#fap-social-links').children('a:eq(2)').show(); } + else { $metaWrapper.children('#fap-social-links').children('a:eq(2)').hide(); } + + $.extend(soundManagerOptions, {id: "fap_sound", url: tracks[currentIndex].stream_url+'?client_id='+SC.options.client_id}); + /*SC.stream(tracks[currentIndex].stream_url, + soundManagerOptions, + function(sound){ + if(sound) { + player = sound; + } + else { + alert("Streaming could not be started. Please try again!"); + } + } + );*/ + } + else { + $metaWrapper.children('#fap-social-links').children('a:eq(2), a:eq(3)').hide(); + $.extend(soundManagerOptions, {id: "fap_sound", url: tracks[currentIndex].stream_url}); + } + + player = soundManager.createSound(soundManagerOptions); + + $elem.trigger('onFapTrackSelect', [ tracks[currentIndex] ]); + + }; + + + //removes all tracks from the playlist and stops playing - states: open, close, openPlaylist, closePlaylist + $.fullwidthAudioPlayer.setPlayerPosition = function(state, animated) { + if($wrapper.is(':animated')) { return false; } + if(state == "open") { + $main.children('#fap-wrapper-switcher').html('×'); + if(options.wrapperPosition == 'top') { + $wrapper.animate({'top': -(totalHeight-options.height)}, animated ? 300 : 0); + } + else { + $wrapper.animate({'bottom': -(totalHeight-options.height)}, animated ? 300 : 0); + } + options.opened = true; + } + else if(state == "close") { + $main.children('#fap-wrapper-switcher').html('+'); + if(options.wrapperPosition == 'top') { + $wrapper.animate({'top': -totalHeight-1}, animated ? 300 : 0); + } + else { + $wrapper.animate({'bottom': -totalHeight-1}, animated ? 300 : 0); + } + options.opened = playlistIsOpened = false; + } + else if(state == "openPlaylist") { + if(options.wrapperPosition == 'top') { + $wrapper.animate({'top': 0}, 300, function() { + $playlistWrapper.getNiceScroll().resize().show(); + }); + } + else { + $wrapper.animate({'bottom': 0}, 300, function() { + $playlistWrapper.getNiceScroll().resize().show(); + }); + } + playlistIsOpened = true; + } + else if(state == "closePlaylist") { + $playlistWrapper.getNiceScroll().hide(); + if(options.wrapperPosition == 'top') { + $wrapper.animate({'top': -(totalHeight-options.height)}, 300); + } + else { + $wrapper.animate({'bottom': -(totalHeight-options.height)}, 300); + } + playlistIsOpened = false; + } + }; + + //removes all tracks from the playlist and stops playing + $.fullwidthAudioPlayer.clear = function() { + + //reset everything + $metaWrapper.children('#fap-current-cover').hide(); + $metaWrapper.children('#fap-cover-replacement').show(); + $metaWrapper.children('#fap-current-title, #fap-current-meta').html(''); + $metaWrapper.children('#fap-social-links').children('a').attr('href', '').hide(); + $uiWrapper.find('#fap-progress-bar, #fap-loading-bar').width(0); + $uiWrapper.find('#fap-current-time, #fap-total-time').text('00:00:00'); + $uiWrapper.find('#fap-play-pause').removeClass('fap-pause').addClass('fap-play'); + + paused = true; + currentIndex = -1; + + if($playlistWrapper) { + $playlistWrapper.empty(); + } + tracks = []; + if(player) { player.destruct(); } + + if(options.playlist) { + $playlistWrapper.getNiceScroll().resize(); + } + + $elem.trigger('onFapClear'); + + }; + + //pop up player + $.fullwidthAudioPlayer.popUp = function() { + + if(popupMode) { + if(!window.fapPopupWin || window.fapPopupWin.closed) { + _addTrackToPopup('', false); + } + else { + window.fapPopupWin.focus(); + } + } + + }; + + + //********************************************* + //************** PRIVATE METHODS ****************** + //********************************************* + + function _createHtmlFromNode(node) { + var html = ''; + if(node.data('meta')) { + var metaText = $('body').find(node.data('meta')).html() ? $('body').find(node.data('meta')).html() : ''; + html += ''+metaText+''; + } + return html; + }; + + //get track(s) from soundcloud link + function _getTracksFromExternalSource(linkUrl) { + + if(RegExp('http(s?)://soundcloud').test(linkUrl)) { + //replace likes with favorites + linkUrl = linkUrl.replace("/likes", "/favorites"); + + //load soundcloud data from tracks + SC.get('/resolve', {url: linkUrl}, function(data, error){ + if(error && error.message) { + return false; + } + var loadIndex = -1, temp = -1; + //favorites(likes) + if($.isArray(data)) { + for(var i=0; i < data.length; ++i) { + temp = _storeTrackDatas(data[i]); + loadIndex = temp < loadIndex ? temp : loadIndex; + if(i == 0) { loadIndex = temp; } + } + } + //sets + else if(data.kind == "playlist") { + for(var i=0; i < data.tracks.length; ++i) { + temp = _storeTrackDatas(data.tracks[i]); + loadIndex = temp < loadIndex ? temp : loadIndex; + if(i == 0) { loadIndex = temp; } + } + } + //user tracks + else if(data.kind == "user") { + SC.get("/users/"+data.id+"/tracks", function(data, error){ + + for(var i=0; i < data.length; ++i) { + temp = _storeTrackDatas(data[i]); + loadIndex = temp < loadIndex ? temp : loadIndex; + if(i == 0) { loadIndex = temp; } + } + $elem.trigger('onFapTracksAdded', [tracks]); + $elem.trigger('fap-tracks-stored', [loadIndex]); + }); + } + //group tracks + else if(data.kind == "group") { + SC.get("/groups/"+data.id+"/tracks", function(data, error){ + for(var i=0; i < data.length; ++i) { + temp = _storeTrackDatas(data[i]); + loadIndex = temp < loadIndex ? temp : loadIndex; + if(i == 0) { loadIndex = temp; } + } + $elem.trigger('onFapTracksAdded', [tracks]); + $elem.trigger('fap-tracks-stored', [loadIndex]); + }); + } + //single track + else { + if(data.kind == "track") { + loadIndex = _storeTrackDatas(data); + } + } + if(loadIndex >= 0) { + $elem.trigger('onFapTracksAdded', [tracks]); + $elem.trigger('fap-tracks-stored', [loadIndex]); + } + + }); + } + else if(RegExp('http(s?)://official.fm').test(linkUrl)) { + var trackId = linkUrl.substr(linkUrl.lastIndexOf('/tracks')+8); + $.getJSON('http://api.official.fm/tracks/'+trackId+'?fields=streaming,cover&api_version=2', function(data) { + var track = data.track; + var li = _storeTrackDatas({stream_url: track.streaming.http, title: track.artist + ' - ' + track.title, meta: track.project.name, artwork_url: track.cover.urls.small, permalink_url:track.page}); + $elem.trigger('onFapTracksAdded', [tracks]); + $elem.trigger('fap-tracks-stored', [li]); + }); + + } + + }; + + //store track datas from soundcloud + function _storeTrackDatas(data) { + //search if a track with a same title already exists + var trackIndex = tracks.length; + for(var i= 0; i < tracks.length; ++i) { + if(data.title == tracks[i].title) { + trackIndex = i; + return trackIndex; + break; + + } + } + + tracks.push(data); + _createPlaylistTrack(data.artwork_url, data.title); + + if(options.storePlaylist) { amplify.store('fap-playlist', JSON.stringify(tracks)); } + + return trackIndex; + }; + + + //soundmanager loading + function _onLoading() { + + $uiWrapper.find('#fap-loading-bar').width(( this.bytesLoaded / this.bytesTotal) * timeBarWidth); + }; + + //soundmaanger playing + function _onPlaying() { + _setTimes(this.position, this.duration); + }; + + //soundmanager finish + function _onFinish() { + if(options.playNextWhenFinished) { + $.fullwidthAudioPlayer.next(); + } + else { + $.fullwidthAudioPlayer.pause(); + player.setPosition(0); + _setSliderPosition(0); + } + }; + + //soundmanager file load + function _onLoad(state) { + if(!state) { + if(window.console && window.console.log) { + console.log("Track could not be loaded! Please check the URL: "+this.url); + } + } + }; + + //create a new playlist item in the playlist + function _createPlaylistTrack(cover, title) { + + if(!options.playlist) { return false; } + var coverDom = cover ? '' : '
      '; + + $playlistWrapper.append('
    • '+coverDom+''+title+'
      ×
    • '); + var listItem = $playlistWrapper.children('li').last().css({'marginBottom': 5, 'height': 22}); + + if(navigator.appVersion.indexOf("MSIE 7.")==-1) { + if(!cover) { _createCoverReplacement(listItem.children('.fap-cover-replace-small').get(0), 20, 20); } + } + + //Playlist Item Event Handlers + if($elem.jquery >= "1.7"){ + listItem.on('click', 'span', _selectTrackFromPlaylist); + listItem.on('click', '.fap-remove-track', _removeTrackFromPlaylist); + } + else { + listItem.delegate('span', 'click', _selectTrackFromPlaylist); + listItem.delegate('.fap-remove-track', 'click', _removeTrackFromPlaylist); + } + + function _selectTrackFromPlaylist() { + var $listItem = $(this).parent(); + if($listItem.hasClass('fap-prevent-click')) { + $listItem.removeClass('fap-prevent-click'); + } + else { + var index = $playlistWrapper.children('li').index($listItem); + $.fullwidthAudioPlayer.selectTrack(index, true); + } + }; + + function _removeTrackFromPlaylist() { + var $this = $(this), + index = $this.parent().parent().children('li').index($this.parent()); + + tracks.splice(index, 1); + $this.parent().remove(); + + if(index == currentIndex) { + currentIndex--; + index = index == tracks.length ? 0 : index; + $.fullwidthAudioPlayer.selectTrack(index, paused ? false : true); + } + else if(index < currentIndex) { + currentIndex--; + } + + $playlistWrapper.getNiceScroll().resize(); + if(options.storePlaylist) { amplify.store('fap-playlist', JSON.stringify(tracks)); } + }; + + $playlistWrapper.getNiceScroll().resize(); + + }; + + //creates a cover replacement when track has no artwork image + function _createCoverReplacement(container, width, height) { + $(container).append(''); + }; + + //set the time slider position + function _setSliderPosition(playProgress) { + $uiWrapper.find('#fap-progress-bar').width(playProgress * timeBarWidth); + }; + + //update the current and total time + function _setTimes(position, duration) { + var time = _convertTime(position/1000); + if(currentTime != time) { + $uiWrapper.find('#fap-current-time').text(time); + $uiWrapper.find('#fap-total-time').text(_convertTime(duration / 1000)); + _setSliderPosition(position / duration); + } + currentTime = time; + }; + + //converts seconds into a well formatted time + function _convertTime(second) { + second = Math.abs(second); + var val = new Array(); + val[0] = Math.floor(second/3600%24);//hours + val[1] = Math.floor(second/60%60);//mins + val[2] = Math.floor(second%60);//secs + var stopage = true; + var cutIndex = -1; + for(var i = 0; i < val.length; i++) { + if(val[i] < 10) val[i] = "0" + val[i]; + if( val[i] == "00" && i < (val.length - 2) && !stopage) cutIndex = i; + else stopage = true; + } + val.splice(0, cutIndex + 1); + return val.join(':'); + }; + + function _shufflePlaylist() { + if($playlistWrapper) { + $playlistWrapper.empty(); + } + //action for the shuffle button + if(currentIndex != -1) { + var tempTitle = tracks[currentIndex].title; + tracks.shuffle(); + _updateTrackIndex(tempTitle); + for(var i=0; i < tracks.length; ++i) { + _createPlaylistTrack(tracks[i].artwork_url, tracks[i].title); + } + $main.find('#fap-playlist').children('li').eq(currentIndex).css('backgroundColor', options.fillColor); + $main.find('#fap-playlist').scrollTop(0); + } + //action for randomize option + else { + tracks.shuffle(); + for(var i=0; i < tracks.length; ++i) { + _createPlaylistTrack(tracks[i].artwork_url, tracks[i].title); + } + + } + if(options.storePlaylist) { amplify.store('fap-playlist', JSON.stringify(tracks)); } + }; + + //array shuffle + function _arrayShuffle(){ + var tmp, rand; + for(var i =0; i < this.length; i++){ + rand = Math.floor(Math.random() * this.length); + tmp = this[i]; + this[i] = this[rand]; + this[rand] = tmp; + } + }; + Array.prototype.shuffle = _arrayShuffle; + + function _updateTrackIndex(title) { + for(var i=0; i < tracks.length; ++i) { + if(tracks[i].title == title) { currentIndex = i; } + } + }; + + function _decodebase64(input) { + var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + + while (i < input.length) { + + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output = output + String.fromCharCode(chr1); + + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + + } + + output = _utf8_decode(output); + + return output; + }; + + function _utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + + function _detectMobileBrowsers() { + return /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent); + }; + + return this.each(function() {_init(this)}); + }; + + + //OPTIONS + $.fn.fullwidthAudioPlayer.defaults = { + wrapperPosition: 'bottom', //top, bottom or popup + mainPosition: 'center', //left, center or right + wrapperColor: '#f0f0f0', //background color of the wrapper + mainColor: '#3c3c3c', + fillColor: '#e3e3e3', + metaColor: '#666666', + strokeColor: '#e0e0e0', + fillColorHover: '#d1d1d1', + activeTrackColor: '#E8E8E8', + twitterText: 'Share on Twitter', + facebookText: 'Share on Facebook', + downloadText: 'Download', + layout: 'fullwidth', //V1.5 - fullwidth or boxed + popupUrl: 'popup.html', //- since V1.3 + height: 80, // the height of the wrapper + playlistHeight: 210, //set the playlist height for the scrolling + coverSize: [65, 65], //size (width,height) of the cover + offset: 20, //offset between playlist and upper content + opened: true, + volume: true, // show/hide volume control + playlist: true, //show/hide playlist + autoLoad: true, //loads the music file when soundmanager is ready + autoPlay: false, //enable/disbale autoplay + playNextWhenFinished: true, //plays the next track when current one has finished + keyboard: true, //enable/disable the keyboard shortcuts + socials: true, //hide/show social links + autoPopup: false, //pop out player in a new window automatically - since V1.3 + randomize: false, //randomize default playlist - since V1.3 + shuffle: true, //show/hide shuffle button - since V1.3 + sortable: false, //sortable playlist + base64: false, //set to true when you encode your mp3 urls with base64 + xmlPath: '', //the xml path + xmlPlaylist: '', //the ID of the playlist which should be loaded into player from the XML file + hideOnMobile: false, //1.4.1 - Hide the player on mobile devices + loopPlaylist: true, //1.5 - When end of playlist has been reached, start from beginning + storePlaylist: false //1.5 - Stores the playlist in the browser + }; + +})(jQuery); + +/* + json2.js + 2013-05-26 + + Public Domain. + + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + + See http://www.JSON.org/js.html + + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. + + + This file creates a global JSON object containing two methods: stringify + and parse. + + JSON.stringify(value, replacer, space) + value any JavaScript value, usually an object or array. + + replacer an optional parameter that determines how object + values are stringified for objects. It can be a + function or an array of strings. + + space an optional parameter that specifies the indentation + of nested structures. If it is omitted, the text will + be packed without extra whitespace. If it is a number, + it will specify the number of spaces to indent at each + level. If it is a string (such as '\t' or ' '), + it contains the characters used to indent at each level. + + This method produces a JSON text from a JavaScript value. + + When an object value is found, if the object contains a toJSON + method, its toJSON method will be called and the result will be + stringified. A toJSON method does not serialize: it returns the + value represented by the name/value pair that should be serialized, + or undefined if nothing should be serialized. The toJSON method + will be passed the key associated with the value, and this will be + bound to the value + + For example, this would serialize Dates as ISO strings. + + Date.prototype.toJSON = function (key) { + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + return this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z'; + }; + + You can provide an optional replacer method. It will be passed the + key and value of each member, with this bound to the containing + object. The value that is returned from your method will be + serialized. If your method returns undefined, then the member will + be excluded from the serialization. + + If the replacer parameter is an array of strings, then it will be + used to select the members to be serialized. It filters the results + such that only members with keys listed in the replacer array are + stringified. + + Values that do not have JSON representations, such as undefined or + functions, will not be serialized. Such values in objects will be + dropped; in arrays they will be replaced with null. You can use + a replacer function to replace those with JSON values. + JSON.stringify(undefined) returns undefined. + + The optional space parameter produces a stringification of the + value that is filled with line breaks and indentation to make it + easier to read. + + If the space parameter is a non-empty string, then that string will + be used for indentation. If the space parameter is a number, then + the indentation will be that many spaces. + + Example: + + text = JSON.stringify(['e', {pluribus: 'unum'}]); + // text is '["e",{"pluribus":"unum"}]' + + + text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); + // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' + + text = JSON.stringify([new Date()], function (key, value) { + return this[key] instanceof Date ? + 'Date(' + this[key] + ')' : value; + }); + // text is '["Date(---current time---)"]' + + + JSON.parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. + + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. + + Example: + + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. + + myData = JSON.parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); + + myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { + var d; + if (typeof value === 'string' && + value.slice(0, 5) === 'Date(' && + value.slice(-1) === ')') { + d = new Date(value.slice(5, -1)); + if (d) { + return d; + } + } + return value; + }); + + + This is a reference implementation. You are free to copy, modify, or + redistribute. +*/ + +/*jslint evil: true, regexp: true */ + +/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, + call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, + getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, + lastIndex, length, parse, prototype, push, replace, slice, stringify, + test, toJSON, toString, valueOf +*/ + + +// Create a JSON object only if one does not already exist. We create the +// methods in a closure to avoid creating global variables. + +if (typeof JSON !== 'object') { + JSON = {}; +} + +(function () { + 'use strict'; + + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + if (typeof Date.prototype.toJSON !== 'function') { + + Date.prototype.toJSON = function () { + + return isFinite(this.valueOf()) + ? this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z' + : null; + }; + + String.prototype.toJSON = + Number.prototype.toJSON = + Boolean.prototype.toJSON = function () { + return this.valueOf(); + }; + } + + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + + + function quote(string) { + +// If the string contains no control characters, no quote characters, and no +// backslash characters, then we can safely slap some quotes around it. +// Otherwise we must also replace the offending characters with safe escape +// sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' + ? c + : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; + } + + + function str(key, holder) { + +// Produce a string from holder[key]. + + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key]; + +// If the value has a toJSON method, call it to obtain a replacement value. + + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + +// If we were called with a replacer function, then call the replacer to +// obtain a replacement value. + + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + +// What happens next depends on the value's type. + + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + +// JSON numbers must be finite. Encode non-finite numbers as null. + + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + +// If the value is a boolean or null, convert it to a string. Note: +// typeof null does not produce 'null'. The case is included here in +// the remote chance that this gets fixed someday. + + return String(value); + +// If the type is 'object', we might be dealing with an object or an array or +// null. + + case 'object': + +// Due to a specification blunder in ECMAScript, typeof null is 'object', +// so watch out for that case. + + if (!value) { + return 'null'; + } + +// Make an array to hold the partial results of stringifying this object value. + + gap += indent; + partial = []; + +// Is the value an array? + + if (Object.prototype.toString.apply(value) === '[object Array]') { + +// The value is an array. Stringify every element. Use null as a placeholder +// for non-JSON values. + + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + +// Join all of the elements together, separated with commas, and wrap them in +// brackets. + + v = partial.length === 0 + ? '[]' + : gap + ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' + : '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + +// If the replacer is an array, use it to select the members to be stringified. + + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + if (typeof rep[i] === 'string') { + k = rep[i]; + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } else { + +// Otherwise, iterate through all of the keys in the object. + + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + +// Join all of the member texts together, separated with commas, +// and wrap them in braces. + + v = partial.length === 0 + ? '{}' + : gap + ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' + : '{' + partial.join(',') + '}'; + gap = mind; + return v; + } + } + +// If the JSON object does not yet have a stringify method, give it one. + + if (typeof JSON.stringify !== 'function') { + JSON.stringify = function (value, replacer, space) { + +// The stringify method takes a value and an optional replacer, and an optional +// space parameter, and returns a JSON text. The replacer can be a function +// that can replace values, or an array of strings that will select the keys. +// A default replacer method can be provided. Use of the space parameter can +// produce text that is more easily readable. + + var i; + gap = ''; + indent = ''; + +// If the space parameter is a number, make an indent string containing that +// many spaces. + + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + +// If the space parameter is a string, it will be used as the indent string. + + } else if (typeof space === 'string') { + indent = space; + } + +// If there is a replacer, it must be a function or an array. +// Otherwise, throw an error. + + rep = replacer; + if (replacer && typeof replacer !== 'function' && + (typeof replacer !== 'object' || + typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + +// Make a fake root object containing our value under the key of ''. +// Return the result of stringifying the value. + + return str('', {'': value}); + }; + } + + +// If the JSON object does not yet have a parse method, give it one. + + if (typeof JSON.parse !== 'function') { + JSON.parse = function (text, reviver) { + +// The parse method takes a text and an optional reviver function, and returns +// a JavaScript value if the text is a valid JSON text. + + var j; + + function walk(holder, key) { + +// The walk method is used to recursively walk the resulting structure so +// that modifications can be made. + + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + } + + +// Parsing happens in four stages. In the first stage, we replace certain +// Unicode characters with escape sequences. JavaScript handles many characters +// incorrectly, either silently deleting them, or treating them as line endings. + + text = String(text); + cx.lastIndex = 0; + if (cx.test(text)) { + text = text.replace(cx, function (a) { + return '\\u' + + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }); + } + +// In the second stage, we run the text against regular expressions that look +// for non-JSON patterns. We are especially concerned with '()' and 'new' +// because they can cause invocation, and '=' because it can cause mutation. +// But just to be safe, we want to reject all unexpected forms. + +// We split the second stage into 4 regexp operations in order to work around +// crippling inefficiencies in IE's and Safari's regexp engines. First we +// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we +// replace all simple value tokens with ']' characters. Third, we delete all +// open brackets that follow a colon or comma or that begin the text. Finally, +// we look to see that the remaining characters are only whitespace or ']' or +// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. + + if (/^[\],:{}\s]*$/ + .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') + .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') + .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { + +// In the third stage we use the eval function to compile the text into a +// JavaScript structure. The '{' operator is subject to a syntactic ambiguity +// in JavaScript: it can begin a block or an object literal. We wrap the text +// in parens to eliminate the ambiguity. + + j = eval('(' + text + ')'); + +// In the optional fourth stage, we recursively walk the new structure, passing +// each name/value pair to a reviver function for possible transformation. + + return typeof reviver === 'function' + ? walk({'': j}, '') + : j; + } + +// If the text is not JSON parseable, then a SyntaxError is thrown. + + throw new SyntaxError('JSON.parse'); + }; + } +}()); + + +/* jquery.nicescroll 3.4.1 InuYaksa*2013 MIT http://areaaperta.com/nicescroll */(function(e){var D=!1,G=!1,N=5E3,O=2E3,C=0,J,u=document.getElementsByTagName("script"),u=u[u.length-1].src.split("?")[0];J=0e){if(b.getScrollTop()>=b.page.maxh)return!0}else if(0>=b.getScrollTop())return!0;b.scrollmom&&b.scrollmom.stop();b.lastdeltay+= +e;b.debounced("mousewheely",function(){var c=b.lastdeltay;b.lastdeltay=0;b.rail.drag||b.doScrollBy(c)},120)}c.stopImmediatePropagation();return c.preventDefault()}var b=this;this.version="3.4.0";this.name="nicescroll";this.me=d;this.opt={doc:e("body"),win:!1};e.extend(this.opt,K);this.opt.snapbackspeed=80;if(j)for(var m in b.opt)"undefined"!=typeof j[m]&&(b.opt[m]=j[m]);this.iddoc=(this.doc=b.opt.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/BODY|HTML/.test(b.opt.win?b.opt.win[0].nodeName: +this.doc[0].nodeName);this.haswrapper=!1!==b.opt.win;this.win=b.opt.win||(this.ispage?e(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?e(window):this.win;this.body=e("body");this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=b.opt.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel= +this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;this.observerremover=this.observer=this.scrollmom=this.scrollrunning=this.checkrtlmode=!1;do this.id="ascrail"+O++;while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor= +this.rail=!1;this.visibility=!0;this.hidden=this.locked=!1;this.cursoractive=!0;this.overflowx=b.opt.overflowx;this.overflowy=b.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;if(H)m=H;else{m=document.createElement("DIV");var h={haspointerlock:"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document};h.isopera="opera"in window;h.isopera12=h.isopera&& +"getUserMedia"in navigator;h.isie="all"in document&&"attachEvent"in m&&!h.isopera;h.isieold=h.isie&&!("msInterpolationMode"in m.style);h.isie7=h.isie&&!h.isieold&&(!("documentMode"in document)||7==document.documentMode);h.isie8=h.isie&&"documentMode"in document&&8==document.documentMode;h.isie9=h.isie&&"performance"in window&&9<=document.documentMode;h.isie10=h.isie&&"performance"in window&&10<=document.documentMode;h.isie9mobile=/iemobile.9/i.test(navigator.userAgent);h.isie9mobile&&(h.isie9=!1); +h.isie7mobile=!h.isie9mobile&&h.isie7&&/iemobile/i.test(navigator.userAgent);h.ismozilla="MozAppearance"in m.style;h.iswebkit="WebkitAppearance"in m.style;h.ischrome="chrome"in window;h.ischrome22=h.ischrome&&h.haspointerlock;h.ischrome26=h.ischrome&&"transition"in m.style;h.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window;h.hasmstouch=window.navigator.msPointerEnabled||!1;h.ismac=/^mac$/i.test(navigator.platform);h.isios=h.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform); +h.isios4=h.isios&&!("seal"in Object);h.isandroid=/android/i.test(navigator.userAgent);h.trstyle=!1;h.hastransform=!1;h.hastranslate3d=!1;h.transitionstyle=!1;h.hastransition=!1;h.transitionend=!1;for(var q=["transform","msTransform","webkitTransform","MozTransform","OTransform"],r=0;rh&&!e.tt)b.delaylist[c]={last:h+d,tt:setTimeout(function(){b.delaylist[c].tt=0;g.call()},d)};else if(!e||!e.tt)b.delaylist[c]= +{last:h,tt:0},setTimeout(function(){g.call()},0)};this.debounced=function(c,g,d){var e=b.delaylist[c];(new Date).getTime();b.delaylist[c]=g;e||setTimeout(function(){var g=b.delaylist[c];b.delaylist[c]=!1;g.call()},d)};this.synched=function(c,g){b.synclist[c]=g;b.onsync||(w(function(){b.onsync=!1;for(c in b.synclist){var g=b.synclist[c];g&&g.call(b);b.synclist[c]=!1}}),b.onsync=!0);return c};this.unsynched=function(c){b.synclist[c]&&(b.synclist[c]=!1)};this.css=function(c,g){for(var d in g)b.saved.css.push([c, +d,c.css(d)]),c.css(d,g[d])};this.scrollTop=function(c){return"undefined"==typeof c?b.getScrollTop():b.setScrollTop(c)};this.scrollLeft=function(c){return"undefined"==typeof c?b.getScrollLeft():b.setScrollLeft(c)};BezierClass=function(b,g,d,e,f,h,k){this.st=b;this.ed=g;this.spd=d;this.p1=e||0;this.p2=f||1;this.p3=h||0;this.p4=k||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(b){return 3*b*b*(1-b)},B3:function(b){return 3*b*(1-b)*(1-b)},B4:function(b){return(1- +b)*(1-b)*(1-b)},getNow:function(){var b=1-((new Date).getTime()-this.ts)/this.spd,g=this.B2(b)+this.B3(b)+this.B4(b);return 0>b?this.ed:this.st+Math.round(this.df*g)},update:function(b,g){this.st=this.getNow();this.ed=b;this.spd=g;this.ts=(new Date).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};f.hastranslate3d&&f.isios&&this.doc.css("-webkit-backface-visibility","hidden");var z=function(){var c=b.doc.css(f.trstyle);return c&&"matrix"== +c.substr(0,6)?c.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1};this.getScrollTop=function(c){if(!c){if(c=z())return 16==c.length?-c[13]:-c[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(c){if(!c){if(c=z())return 16==c.length?-c[12]:-c[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=document.createEvent?function(b){var g=document.createEvent("UIEvents"); +g.initUIEvent("scroll",!1,!0,window,1);b.dispatchEvent(g)}:document.fireEvent?function(b){var g=document.createEventObject();b.fireEvent("onscroll");g.cancelBubble=!0}:function(){};f.hastranslate3d&&b.opt.enabletranslate3d?(this.setScrollTop=function(c,g){b.doc.translate.y=c;b.doc.translate.ty=-1*c+"px";b.doc.css(f.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0px)");g||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(c,g){b.doc.translate.x=c;b.doc.translate.tx=-1*c+ +"px";b.doc.css(f.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0px)");g||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(c,g){b.doc.translate.y=c;b.doc.translate.ty=-1*c+"px";b.doc.css(f.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");g||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(c,g){b.doc.translate.x=c;b.doc.translate.tx=-1*c+"px";b.doc.css(f.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");g||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop= +function(){return b.docscroll.scrollTop()},this.setScrollTop=function(c){return b.docscroll.scrollTop(c)},this.getScrollLeft=function(){return b.docscroll.scrollLeft()},this.setScrollLeft=function(c){return b.docscroll.scrollLeft(c)};this.getTarget=function(b){return!b?!1:b.target?b.target:b.srcElement?b.srcElement:!1};this.hasParent=function(b,g){if(!b)return!1;for(var d=b.target||b.srcElement||b||!1;d&&d.id!=g;)d=d.parentNode||!1;return!1!==d};var B={thin:1,medium:3,thick:5};this.getOffset=function(){if(b.isfixed)return{top:parseFloat(b.win.css("top")), +left:parseFloat(b.win.css("left"))};if(!b.viewport)return b.win.offset();var c=b.win.offset(),g=b.viewport.offset();return{top:c.top-g.top+b.viewport.scrollTop(),left:c.left-g.left+b.viewport.scrollLeft()}};this.updateScrollBar=function(c){if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()}),b.railh&&b.railh.css({width:b.win.innerWidth()});else{var g=b.getOffset(),d=g.top,e=g.left,d=d+s(b.win,"border-top-width",!0);b.win.outerWidth();b.win.innerWidth();var e=e+(b.rail.align?b.win.outerWidth()- +s(b.win,"border-right-width")-b.rail.width:s(b.win,"border-left-width")),f=b.opt.railoffset;f&&(f.top&&(d+=f.top),b.rail.align&&f.left&&(e+=f.left));b.locked||b.rail.css({top:d,left:e,height:c?c.h:b.win.innerHeight()});b.zoom&&b.zoom.css({top:d+1,left:1==b.rail.align?e-20:e+b.rail.width+4});b.railh&&!b.locked&&(d=g.top,e=g.left,c=b.railh.align?d+s(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:d+s(b.win,"border-top-width",!0),e+=s(b.win,"border-left-width"),b.railh.css({top:c,left:e, +width:b.railh.width}))}};this.doRailClick=function(c,g,d){var e;b.locked||(b.cancelEvent(c),g?(g=d?b.doScrollLeft:b.doScrollTop,e=d?(c.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(c.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y,g(e)):(g=d?b.doScrollLeftBy:b.doScrollBy,e=d?b.scroll.x:b.scroll.y,c=d?c.pageX-b.railh.offset().left:c.pageY-b.rail.offset().top,d=d?b.view.w:b.view.h,e>=c?g(d):g(-d)))};b.hasanimationframe=w;b.hascancelanimationframe=x;b.hasanimationframe?b.hascancelanimationframe|| +(x=function(){b.cancelAnimationFrame=!0}):(w=function(b){return setTimeout(b,15-Math.floor(+new Date/1E3)%16)},x=clearInterval);this.init=function(){b.saved.css=[];if(f.isie7mobile)return!0;f.hasmstouch&&b.css(b.ispage?e("html"):b.win,{"-ms-touch-action":"none"});b.zindex="auto";b.zindex=!b.ispage&&"auto"==b.opt.zindex?k()||"auto":b.opt.zindex;!b.ispage&&"auto"!=b.zindex&&b.zindex>C&&(C=b.zindex);b.isie&&(0==b.zindex&&"auto"==b.opt.zindex)&&(b.zindex="auto");if(!b.ispage||!f.cantouch&&!f.isieold&& +!f.isie9mobile){var c=b.docscroll;b.ispage&&(c=b.haswrapper?b.win:b.doc);f.isie9mobile||b.css(c,{"overflow-y":"hidden"});b.ispage&&f.isie7&&("BODY"==b.doc[0].nodeName?b.css(e("html"),{"overflow-y":"hidden"}):"HTML"==b.doc[0].nodeName&&b.css(e("body"),{"overflow-y":"hidden"}));f.isios&&(!b.ispage&&!b.haswrapper)&&b.css(e("body"),{"-webkit-overflow-scrolling":"touch"});var g=e(document.createElement("div"));g.css({position:"relative",top:0,"float":"right",width:b.opt.cursorwidth,height:"0px","background-color":b.opt.cursorcolor, +border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius,"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});g.hborder=parseFloat(g.outerHeight()-g.innerHeight());b.cursor=g;var d=e(document.createElement("div"));d.attr("id",b.id);d.addClass("nicescroll-rails");var h,j,y=["left","right"],s;for(s in y)j=y[s],(h=b.opt.railpadding[j])?d.css("padding-"+j,h+"px"):b.opt.railpadding[j]=0;d.append(g);d.width=Math.max(parseFloat(b.opt.cursorwidth), +g.outerWidth())+b.opt.railpadding.left+b.opt.railpadding.right;d.css({width:d.width+"px",zIndex:b.zindex,background:b.opt.background,cursor:"default"});d.visibility=!0;d.scrollable=!0;d.align="left"==b.opt.railalign?0:1;b.rail=d;g=b.rail.drag=!1;b.opt.boxzoom&&(!b.ispage&&!f.isieold)&&(g=document.createElement("div"),b.bind(g,"click",b.doZoom),b.zoom=e(g),b.zoom.css({cursor:"pointer","z-index":b.zindex,backgroundImage:"url("+J+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),b.opt.dblclickzoom&& +b.bind(b.win,"dblclick",b.doZoom),f.cantouch&&b.opt.gesturezoom&&(b.ongesturezoom=function(c){1.5c.scale&&b.doZoomOut(c);return b.cancelEvent(c)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(b.opt.horizrailenabled){b.css(c,{"overflow-x":"hidden"});g=e(document.createElement("div"));g.css({position:"relative",top:0,height:b.opt.cursorwidth,width:"0px","background-color":b.opt.cursorcolor,border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius, +"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});g.wborder=parseFloat(g.outerWidth()-g.innerWidth());b.cursorh=g;var l=e(document.createElement("div"));l.attr("id",b.id+"-hr");l.addClass("nicescroll-rails");l.height=Math.max(parseFloat(b.opt.cursorwidth),g.outerHeight());l.css({height:l.height+"px",zIndex:b.zindex,background:b.opt.background});l.append(g);l.visibility=!0;l.scrollable=!0;l.align="top"==b.opt.railvalign?0:1;b.railh=l;b.railh.drag=!1}b.ispage? +(d.css({position:"fixed",top:"0px",height:"100%"}),d.align?d.css({right:"0px"}):d.css({left:"0px"}),b.body.append(d),b.railh&&(l.css({position:"fixed",left:"0px",width:"100%"}),l.align?l.css({bottom:"0px"}):l.css({top:"0px"}),b.body.append(l))):(b.ishwscroll?("static"==b.win.css("position")&&b.css(b.win,{position:"relative"}),c="HTML"==b.win[0].nodeName?b.body:b.win,b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":d.width+4}),c.append(b.zoom)),d.css({position:"absolute",top:0}), +d.align?d.css({right:0}):d.css({left:0}),c.append(d),l&&(l.css({position:"absolute",left:0,bottom:0}),l.align?l.css({bottom:0}):l.css({top:0}),c.append(l))):(b.isfixed="fixed"==b.win.css("position"),c=b.isfixed?"fixed":"absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,!1==/relative|absolute/.test(b.viewport.css("position"))&&b.css(b.viewport,{position:"relative"})),d.css({position:c}),b.zoom&&b.zoom.css({position:c}),b.updateScrollBar(),b.body.append(d),b.zoom&& +b.body.append(b.zoom),b.railh&&(l.css({position:c}),b.body.append(l))),f.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),f.isie&&b.opt.disableoutline&&b.win.attr("hideFocus","true"),f.iswebkit&&b.opt.disableoutline&&b.win.css({outline:"none"}));!1===b.opt.autohidemode?(b.autohidedom=!1,b.rail.css({opacity:b.opt.cursoropacitymax}),b.railh&&b.railh.css({opacity:b.opt.cursoropacitymax})):!0===b.opt.autohidemode?(b.autohidedom=e().add(b.rail),f.isie8&& +(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&f.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==b.opt.autohidemode?(b.autohidedom=e().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==b.opt.autohidemode?(b.autohidedom=e().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==b.opt.autohidemode&&(b.autohidedom=!1,b.hide(),b.locked=!1);if(f.isie9mobile)b.scrollmom=new L(b),b.onmangotouch= +function(){var c=b.getScrollTop(),d=b.getScrollLeft();if(c==b.scrollmom.lastscrolly&&d==b.scrollmom.lastscrollx)return!0;var g=c-b.mangotouch.sy,e=d-b.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(e,2)+Math.pow(g,2)))){var f=0>g?-1:1,p=0>e?-1:1,h=+new Date;b.mangotouch.lazy&&clearTimeout(b.mangotouch.lazy);80t?t=Math.round(t/2):t>b.page.maxh&&(t=b.page.maxh+Math.round((t-b.page.maxh)/2)):(0>t&&(h=t=0),t>b.page.maxh&&(t=b.page.maxh,h=0));if(b.railh&&b.railh.scrollable){var l=b.rail.drag.sl-j;b.ishwscroll&&b.opt.bouncescroll?0>l?l=Math.round(l/2):l>b.page.maxw&&(l=b.page.maxw+ +Math.round((l-b.page.maxw)/2)):(0>l&&(k=l=0),l>b.page.maxw&&(l=b.page.maxw,k=0))}g=!1;if(b.rail.drag.dl)g=!0,"v"==b.rail.drag.dl?l=b.rail.drag.sl:"h"==b.rail.drag.dl&&(t=b.rail.drag.st);else{var p=Math.abs(p),j=Math.abs(j),y=b.opt.directionlockdeadzone;if("v"==b.rail.drag.ck){if(p>y&&j<=0.3*p)return b.rail.drag=!1,!0;j>y&&(b.rail.drag.dl="f",e("body").scrollTop(e("body").scrollTop()))}else if("h"==b.rail.drag.ck){if(j>y&&p<=0.3*az)return b.rail.drag=!1,!0;p>y&&(b.rail.drag.dl="f",e("body").scrollLeft(e("body").scrollLeft()))}}b.synched("touchmove", +function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.prepareTransition(0),b.rail.scrollable&&b.setScrollTop(t),b.scrollmom.update(k,h),b.railh&&b.railh.scrollable?(b.setScrollLeft(l),b.showCursor(t,l)):b.showCursor(t),f.isie10&&document.selection.clear())});f.ischrome&&b.istouchcapable&&(g=!1);if(g)return b.cancelEvent(c)}}}b.onmousedown=function(c,d){if(!(b.rail.drag&&1!=b.rail.drag.pt)){if(b.locked)return b.cancelEvent(c);b.cancelScroll();b.rail.drag={x:c.clientX,y:c.clientY,sx:b.scroll.x, +sy:b.scroll.y,pt:1,hr:!!d};var g=b.getTarget(c);!b.ispage&&f.hasmousecapture&&g.setCapture();b.isiframe&&!f.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(c)}};b.onmouseup=function(c){if(b.rail.drag&&(f.hasmousecapture&&document.releaseCapture(),b.isiframe&&!f.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),1==b.rail.drag.pt))return b.rail.drag=!1,b.cancelEvent(c)};b.onmousemove=function(c){if(b.rail.drag&& +1==b.rail.drag.pt){if(f.ischrome&&0==c.which)return b.onmouseup(c);b.cursorfreezed=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(c.clientX-b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var d=b.scrollvaluemaxw;b.scroll.x>d&&(b.scroll.x=d)}else b.scroll.y=b.rail.drag.sy+(c.clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),d=b.scrollvaluemax,b.scroll.y>d&&(b.scroll.y=d);b.synched("mousemove",function(){b.rail.drag&&1==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x* +b.scrollratio.x),b.opt.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),b.opt.cursordragspeed))});return b.cancelEvent(c)}};if(f.cantouch||b.opt.touchbehavior)b.onpreventclick=function(c){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(c)},b.bind(b.win,"mousedown",b.ontouchstart),b.onclick=f.isios?!1:function(c){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(c)):!0},b.opt.grabcursorenabled&&f.cursorgrabvalue&&(b.css(b.ispage? +b.doc:b.win,{cursor:f.cursorgrabvalue}),b.css(b.rail,{cursor:f.cursorgrabvalue}));else{var m=function(c){if(b.selectiondrag){if(c){var d=b.win.outerHeight();c=c.pageY-b.selectiondrag.top;0=d&&(c-=d);b.selectiondrag.df=c}0!=b.selectiondrag.df&&(b.doScrollBy(2*-Math.floor(b.selectiondrag.df/6)),b.debounced("doselectionscroll",function(){m()},50))}};b.hasTextSelected="getSelection"in document?function(){return 0b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y)), +b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x)),b.cursoractive&&b.noticeCursor());b.scroll.y&&0==b.getScrollTop()&&b.doScrollTo(Math.floor(b.scroll.y*b.scrollratio.y));return b};this.resize=b.onResize;this.lazyResize=function(c){c=isNaN(c)?30:c;b.delayed("resize",b.resize,c);return b};this._bind=function(c,d,e,f){b.events.push({e:c,n:d,f:e,b:f,q:!1});c.addEventListener?c.addEventListener(d,e,f||!1):c.attachEvent?c.attachEvent("on"+d,e):c["on"+d]=e};this.jqbind=function(c,d,f){b.events.push({e:c, +n:d,f:f,q:!0});e(c).bind(d,f)};this.bind=function(c,d,e,h){var k="jquery"in c?c[0]:c;"mousewheel"==d?"onwheel"in b.win?b._bind(k,"wheel",e,h||!1):(c="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",n(k,c,e,h||!1),"DOMMouseScroll"==c&&n(k,"MozMousePixelScroll",e,h||!1)):k.addEventListener?(f.cantouch&&/mouseup|mousedown|mousemove/.test(d)&&b._bind(k,"mousedown"==d?"touchstart":"mouseup"==d?"touchend":"touchmove",function(b){if(b.touches){if(2>b.touches.length){var c=b.touches.length? +b.touches[0]:b;c.original=b;e.call(this,c)}}else b.changedTouches&&(c=b.changedTouches[0],c.original=b,e.call(this,c))},h||!1),b._bind(k,d,e,h||!1),f.cantouch&&"mouseup"==d&&b._bind(k,"touchcancel",e,h||!1)):b._bind(k,d,function(c){if((c=c||window.event||!1)&&c.srcElement)c.target=c.srcElement;"pageY"in c||(c.pageX=c.clientX+document.documentElement.scrollLeft,c.pageY=c.clientY+document.documentElement.scrollTop);return!1===e.call(k,c)||!1===h?b.cancelEvent(c):!0})};this._unbind=function(b,d,e,f){b.removeEventListener? +b.removeEventListener(d,e,f):b.detachEvent?b.detachEvent("on"+d,e):b["on"+d]=!1};this.unbindAll=function(){for(var c=0;c(b.newscrolly-h)*(d-h)||0>(b.newscrollx-k)* +(c-k))&&b.cancelScroll();!1==b.opt.bouncescroll&&(0>d?d=0:d>b.page.maxh&&(d=b.page.maxh),0>c?c=0:c>b.page.maxw&&(c=b.page.maxw));if(b.scrollrunning&&c==b.newscrollx&&d==b.newscrolly)return!1;b.newscrolly=d;b.newscrollx=c;b.newscrollspeed=e||!1;if(b.timer)return!1;b.timer=setTimeout(function(){var e=b.getScrollTop(),h=b.getScrollLeft(),k,p;k=c-h;p=d-e;k=Math.round(Math.sqrt(Math.pow(k,2)+Math.pow(p,2)));k=b.newscrollspeed&&1=b.newscrollspeed&&(k*=b.newscrollspeed);b.prepareTransition(k,!0);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);0c?c=0:c>b.page.maxh&&(c=b.page.maxh);0>d?d=0:d>b.page.maxw&&(d=b.page.maxw);if(c!=b.newscrolly||d!=b.newscrollx)return b.doScrollPos(d,c,b.opt.snapbackspeed);b.onscrollend&&b.scrollrunning&&b.onscrollend.call(b,{type:"scrollend",current:{x:d,y:c},end:{x:b.newscrollx,y:b.newscrolly}});b.scrollrunning= +!1}):(this.doScrollLeft=function(c,d){var e=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(c,e,d)},this.doScrollTop=function(c,d){var e=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(e,c,d)},this.doScrollPos=function(c,d,e){function f(){if(b.cancelAnimationFrame)return!0;b.scrollrunning=!0;if(n=1-n)return b.timer=w(f)||1;var c=0,d=sy=b.getScrollTop();if(b.dst.ay){var d=b.bzscroll?b.dst.py+b.bzscroll.getNow()*b.dst.ay:b.newscrolly,e=d-sy;if(0>e&&db.newscrolly)d= +b.newscrolly;b.setScrollTop(d);d==b.newscrolly&&(c=1)}else c=1;var g=sx=b.getScrollLeft();if(b.dst.ax){g=b.bzscroll?b.dst.px+b.bzscroll.getNow()*b.dst.ax:b.newscrollx;e=g-sx;if(0>e&&gb.newscrollx)g=b.newscrollx;b.setScrollLeft(g);g==b.newscrollx&&(c+=1)}else c+=1;2==c?(b.timer=0,b.cursorfreezed=!1,b.bzscroll=!1,b.scrollrunning=!1,0>d?d=0:d>b.page.maxh&&(d=b.page.maxh),0>g?g=0:g>b.page.maxw&&(g=b.page.maxw),g!=b.newscrollx||d!=b.newscrolly?b.doScrollPos(g,d):b.onscrollend&&b.onscrollend.call(b, +{type:"scrollend",current:{x:sx,y:sy},end:{x:b.newscrollx,y:b.newscrolly}})):b.timer=w(f)||1}d="undefined"==typeof d||!1===d?b.getScrollTop(!0):d;if(b.timer&&b.newscrolly==d&&b.newscrollx==c)return!0;b.timer&&x(b.timer);b.timer=0;var h=b.getScrollTop(),k=b.getScrollLeft();(0>(b.newscrolly-h)*(d-h)||0>(b.newscrollx-k)*(c-k))&&b.cancelScroll();b.newscrolly=d;b.newscrollx=c;if(!b.bouncescroll||!b.rail.visibility)0>b.newscrolly?b.newscrolly=0:b.newscrolly>b.page.maxh&&(b.newscrolly=b.page.maxh);if(!b.bouncescroll|| +!b.railh.visibility)0>b.newscrollx?b.newscrollx=0:b.newscrollx>b.page.maxw&&(b.newscrollx=b.page.maxw);b.dst={};b.dst.x=c-k;b.dst.y=d-h;b.dst.px=k;b.dst.py=h;var j=Math.round(Math.sqrt(Math.pow(b.dst.x,2)+Math.pow(b.dst.y,2)));b.dst.ax=b.dst.x/j;b.dst.ay=b.dst.y/j;var l=0,s=j;0==b.dst.x?(l=h,s=d,b.dst.ay=1,b.dst.py=0):0==b.dst.y&&(l=k,s=c,b.dst.ax=1,b.dst.px=0);j=b.getTransitionSpeed(j);e&&1>=e&&(j*=e);b.bzscroll=0=b.page.maxh||k==b.page.maxw&&c>=b.page.maxw)&&b.checkContentSize();var n=1;b.cancelAnimationFrame=!1;b.timer=1;b.onscrollstart&&!b.scrollrunning&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:k,y:h},request:{x:c,y:d},end:{x:b.newscrollx,y:b.newscrolly},speed:j});f();(h==b.page.maxh&&d>=h||k==b.page.maxw&&c>=k)&&b.checkContentSize();b.noticeCursor()}},this.cancelScroll=function(){b.timer&&x(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=!1;return b}):(this.doScrollLeft=function(c, +d){var e=b.getScrollTop();b.doScrollPos(c,e,d)},this.doScrollTop=function(c,d){var e=b.getScrollLeft();b.doScrollPos(e,c,d)},this.doScrollPos=function(c,d){var e=c>b.page.maxw?b.page.maxw:c;0>e&&(e=0);var f=d>b.page.maxh?b.page.maxh:d;0>f&&(f=0);b.synched("scroll",function(){b.setScrollTop(f);b.setScrollLeft(e)})},this.cancelScroll=function(){});this.doScrollBy=function(c,d){var e=0,e=d?Math.floor((b.scroll.y-c)*b.scrollratio.y):(b.timer?b.newscrolly:b.getScrollTop(!0))-c;if(b.bouncescroll){var f= +Math.round(b.view.h/2);e<-f?e=-f:e>b.page.maxh+f&&(e=b.page.maxh+f)}b.cursorfreezed=!1;py=b.getScrollTop(!0);if(0>e&&0>=py)return b.noticeCursor();if(e>b.page.maxh&&py>=b.page.maxh)return b.checkContentSize(),b.noticeCursor();b.doScrollTop(e)};this.doScrollLeftBy=function(c,d){var e=0,e=d?Math.floor((b.scroll.x-c)*b.scrollratio.x):(b.timer?b.newscrollx:b.getScrollLeft(!0))-c;if(b.bouncescroll){var f=Math.round(b.view.w/2);e<-f?e=-f:e>b.page.maxw+f&&(e=b.page.maxw+f)}b.cursorfreezed=!1;px=b.getScrollLeft(!0); +if(0>e&&0>=px||e>b.page.maxw&&px>=b.page.maxw)return b.noticeCursor();b.doScrollLeft(e)};this.doScrollTo=function(c,d){d&&Math.round(c*b.scrollratio.y);b.cursorfreezed=!1;b.doScrollTop(c)};this.checkContentSize=function(){var c=b.getContentSize();(c.h!=b.page.h||c.w!=b.page.w)&&b.resize(!1,c)};b.onscroll=function(){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x))); +b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(c){if(!b.zoomactive){b.zoomactive=!0;b.zoomrestore={style:{}};var d="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),h=b.win[0].style,k;for(k in d){var j=d[k];b.zoomrestore.style[j]="undefined"!=typeof h[j]?h[j]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()- +b.win.height()};f.isios4&&(b.zoomrestore.scrollTop=e(window).scrollTop(),e(window).scrollTop(0));b.win.css({position:f.isios4?"absolute":"fixed",top:0,left:0,"z-index":C+100,margin:"0px"});d=b.win.css("backgroundColor");(""==d||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(d))&&b.win.css("backgroundColor","#fff");b.rail.css({"z-index":C+101});b.zoom.css({"z-index":C+102});b.zoom.css("backgroundPosition","0px -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(c)}};this.doZoomOut= +function(c){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),f.isios4&&e(window).scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0px 0px"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(c)};this.doZoom=function(c){return b.zoomactive?b.doZoomOut(c):b.doZoomIn(c)};this.resizeZoom=function(){if(b.zoomactive){var c=b.getScrollTop();b.win.css({width:e(window).width()- +b.zoomrestore.padding.w+"px",height:e(window).height()-b.zoomrestore.padding.h+"px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,c))}};this.init();e.nicescroll.push(this)},L=function(e){var d=this;this.nc=e;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(e,j){d.stop();var n=d.time();d.steptime= +0;d.lasttime=n;d.speedx=0;d.speedy=0;d.lastx=e;d.lasty=j;d.lastscrollx=-1;d.lastscrolly=-1};this.update=function(e,j){var n=d.time();d.steptime=n-d.lasttime;d.lasttime=n;var n=j-d.lasty,v=e-d.lastx,b=d.nc.getScrollTop(),m=d.nc.getScrollLeft(),b=b+n,m=m+v;d.snapx=0>m||m>d.nc.page.maxw;d.snapy=0>b||b>d.nc.page.maxh;d.speedx=v;d.speedy=n;d.lastx=e;d.lasty=j};this.stop=function(){d.nc.unsynched("domomentum2d");d.timer&&clearTimeout(d.timer);d.timer=0;d.lastscrollx=-1;d.lastscrolly=-1};this.doSnapy=function(e, +j){var n=!1;0>j?(j=0,n=!0):j>d.nc.page.maxh&&(j=d.nc.page.maxh,n=!0);0>e?(e=0,n=!0):e>d.nc.page.maxw&&(e=d.nc.page.maxw,n=!0);n&&d.nc.doScrollPos(e,j,d.nc.opt.snapbackspeed)};this.doMomentum=function(e){var j=d.time(),n=e?j+e:d.lasttime;e=d.nc.getScrollLeft();var v=d.nc.getScrollTop(),b=d.nc.page.maxh,m=d.nc.page.maxw;d.speedx=0=j-n;if(0>v||v>b||0>e||e>m)n=!1;e=d.speedx&&n?d.speedx:!1;if(d.speedy&&n&&d.speedy||e){var h=Math.max(16, +d.steptime);50q||q>m))e=0.1;if(d.speedy&&(r=Math.floor(d.lastscrolly-d.speedy*(1-d.demulxy)),d.lastscrolly=r,0>r||r>b))e=0.1;d.demulxy=Math.min(1,d.demulxy+e);d.nc.synched("domomentum2d", +function(){d.speedx&&(d.nc.getScrollLeft()!=d.chkx&&d.stop(),d.chkx=q,d.nc.setScrollLeft(q));d.speedy&&(d.nc.getScrollTop()!=d.chky&&d.stop(),d.chky=r,d.nc.setScrollTop(r));d.timer||(d.nc.hideCursor(),d.doSnapy(q,r))});1>d.demulxy?d.timer=setTimeout(u,h):(d.stop(),d.nc.hideCursor(),d.doSnapy(q,r))};u()}else d.doSnapy(d.nc.getScrollLeft(),d.nc.getScrollTop())}},z=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(j){var d=e.data(j,"__nicescroll")||!1;return d&&d.ishwscroll?d.getScrollTop():z.call(j)}, +set:function(j,d){var k=e.data(j,"__nicescroll")||!1;k&&k.ishwscroll?k.setScrollTop(parseInt(d)):z.call(j,d);return this}};e.fn.scrollTop=function(j){if("undefined"==typeof j){var d=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return d&&d.ishwscroll?d.getScrollTop():z.call(this)}return this.each(function(){var d=e.data(this,"__nicescroll")||!1;d&&d.ishwscroll?d.setScrollTop(parseInt(j)):z.call(e(this),j)})};var B=e.fn.scrollLeft;e.cssHooks.pageXOffset={get:function(j){var d=e.data(j,"__nicescroll")|| +!1;return d&&d.ishwscroll?d.getScrollLeft():B.call(j)},set:function(j,d){var k=e.data(j,"__nicescroll")||!1;k&&k.ishwscroll?k.setScrollLeft(parseInt(d)):B.call(j,d);return this}};e.fn.scrollLeft=function(j){if("undefined"==typeof j){var d=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return d&&d.ishwscroll?d.getScrollLeft():B.call(this)}return this.each(function(){var d=e.data(this,"__nicescroll")||!1;d&&d.ishwscroll?d.setScrollLeft(parseInt(j)):B.call(e(this),j)})};for(var F=function(j){var d=this; +this.length=0;this.name="nicescrollarray";this.each=function(e){for(var j=0,k=0;k

      Creating Playlist...

      ';a("body").append(c),B=a("body").children("#fap-wrapper"),C=B.children("#fap-main"),"fullwidth"==J.layout?B.addClass("fap-fullwidth").css({background:J.wrapperColor,borderColor:J.strokeColor}):"boxed"==J.layout&&(B.addClass("fap-boxed"),C.css({background:J.wrapperColor,borderColor:J.strokeColor})),U&&B.addClass("fap-popup-skin"),z()&&B.css({position:"absolute"}),U?C.css({marginLeft:10,marginRight:10}):"center"==J.mainPosition?C.css({marginLeft:"auto",marginRight:"auto"}):"right"==J.mainPosition?C.css({"float":"right",marginRight:10}):C.css({marginLeft:10}),"top"==J.wrapperPosition?C.children("#fap-wrapper-switcher").addClass("fap-bordered-bottom").css({bottom:-15,borderTop:"none"}):C.children("#fap-wrapper-switcher").addClass("fap-bordered-top").css({top:-15,borderBottom:"none"}),J.opened?a.fullwidthAudioPlayer.setPlayerPosition("open",!1):a.fullwidthAudioPlayer.setPlayerPosition("close",!1),C.children("#fap-wrapper-switcher").click(function(){J.opened?a.fullwidthAudioPlayer.setPlayerPosition("close",!0):a.fullwidthAudioPlayer.setPlayerPosition("open",!0)}),soundManager.onready(e)}function d(b,c){if(!window.fapPopupWin||window.fapPopupWin.closed){var d=980,e=(window.screen.width-d)/2,f=(window.screen.height-L)/2,g=/Chrome/i.test(navigator.userAgent);window.fapPopupWin=window.open(J.popupUrl,"","menubar=no,toolbar=no,location=yes,status=no,width="+d+",height="+(g?L+30:L)+",left="+e+",top="+f),null==window.fapPopupWin&&alert("Pop-Up Music Player can not be opened. Your browser is blocking Pop-Ups. Please allow Pop-Ups for this site to use the Music Player."),a(window.fapPopupWin).load(function(){a(window.fapPopupWin).animate({innerHeight:L},500),a('.fap-single-track[data-autoenqueue="yes"]').each(function(c,d){var e=a(d);b+=i(e)}),J.autoPlay=c,window.fapPopupWin.initPlayer(J,b),I=!0})}else{var h=a(b);a.fullwidthAudioPlayer.addTrack(h.attr("href"),h.attr("title"),h.data("meta")?a("body").find(h.data("meta")).html():"",h.attr("rel"),h.attr("target"),c)}}function e(){if(J.playlist){var b='
        ';K=a(b).css("height",J.playlistHeight)}J.xmlPath?a.ajax({type:"GET",url:J.xmlPath,dataType:"xml",cache:!1,success:function(b){var c=a(b).find("playlists"),d=d=J.xmlPlaylist?J.xmlPlaylist:c.children("playlist:first").attr("id");f(c.children('playlist[id="'+d+'"]').children("track")),a(".fap-xml-playlist").each(function(b,d){var e=a(d);e.append("

        "+d.title+'

          '),c.children('playlist[id="'+d.id+'"]').children("track").each(function(b,c){var f=a(c),g=f.attr("target")?'target="'+f.attr("target")+'"':"",h=f.attr("rel")?'rel="'+f.attr("rel")+'"':"",i=f.find("meta")?'data-meta="#'+d.id+"-"+b+'"':"";e.children("ul").append('
        • "+f.attr("title")+"
        • "),e.append(''+f.find("meta").text()+"")})})},error:function(){alert("XML file could not be loaded. Please check the XML path!")}}):f(A.children("a"))}function f(b){if(J.storePlaylist)var c=Boolean(amplify.store("fap-playlist"));b=c?JSON.parse(amplify.store("fap-playlist")):b,A.bind("fap-tracks-stored",function(){if(++M,M

          '),E=C.children("#fap-meta-wrapper").css("height",J.height-10),q(document.getElementById("fap-cover-replacement"),J.coverSize[0],J.coverSize[1]),J.socials&&E.append(''),D=C.append('
          ').children("#fap-ui-wrapper").css("height",J.height);var b=D.append('
          ').children("#fap-ui-nav");if(b.css("margin-top",.5*J.height-.5*b.height()),b.append('').children("#fap-previous").click(function(){return a.fullwidthAudioPlayer.previous(),!1}),b.append('').children("#fap-play-pause").click(function(){return a.fullwidthAudioPlayer.toggle(),!1}),b.append('').children("#fap-next").click(function(){return a.fullwidthAudioPlayer.next(),!1}),D.children("div:first").length?D.width()-D.children("div:first").position().left+20:0,D.append('
          00:00:0000:00:00
          '),D.find("#fap-loading-bar, #fap-progress-bar").click(function(b){var c=(b.pageX-a(this).parent().offset().left)/N;F.setPosition(c*F.duration),r(c)}),J.volume){var c=J.playlist||J.shuffle?60:20;U&&(c=J.shuffle?60:20),D.append('
          '),D.children("#fap-volume-sign").css("margin-top",.5*J.height-.5*D.children("#fap-volume-sign").height()),D.find("#fap-volume-bar").click(function(b){var c=(b.pageX-a(this).offset().left)/O;a.fullwidthAudioPlayer.volume(c)})}if(J.playlist){if("bottom"==J.wrapperPosition?(C.append('
          ').append(K),K.css({marginTop:J.offset})):(C.prepend('
          ').prepend(K),K.css({marginBottom:J.offset})),K.niceScroll({cursorcolor:J.mainColor,cursorborder:"none",autohidemode:!1}),K.getNiceScroll().hide(),a(".nicescroll-rails").hover(function(){K.getNiceScroll().resize().show()},function(){K.getNiceScroll().resize().hide()}),K.hover(function(){K.getNiceScroll().resize().show()},function(){K.getNiceScroll().resize().hide()}),J.sortable){var d;K.sortable().bind("sortstart",function(a,b){b.item.addClass("fap-prevent-click"),d=K.children("li").index(b.item)}),K.sortable().bind("sortupdate",function(a,b){var c=K.children("li").index(b.item),e=V[d],f=V[P].title;V.splice(d,1),V.splice(c,0,e),w(f),J.storePlaylist&&lify.store("fap-playlist",JSON.stringify(V))})}U?a.fullwidthAudioPlayer.setPlayerPosition("openPlaylist",!1):(D.append(''),D.children("#fap-playlist-toggle").click(function(){return R?a.fullwidthAudioPlayer.setPlayerPosition("closePlaylist",!0):a.fullwidthAudioPlayer.setPlayerPosition("openPlaylist",!0),!1}))}J.shuffle&&(D.append(''),D.children("#fap-playlist-shuffle").click(function(){return u(),!1})),D.find("a").hover(function(){a(this).css("backgroundColor",J.fillColorHover)},function(){a(this).css("backgroundColor",J.fillColor)}),J.keyboard&&a(document).keyup(function(b){switch(b.which){case 32:a.fullwidthAudioPlayer.toggle();break;case 39:a.fullwidthAudioPlayer.next();break;case 37:a.fullwidthAudioPlayer.previous();break;case 38:a.fullwidthAudioPlayer.volume(Q/100+.05);break;case 40:a.fullwidthAudioPlayer.volume(Q/100-.05)}}),E.children("p").css("marginLeft",J.coverSize[0]+10),A.trigger("onFapReady"),I=!0,a('.fap-single-track[data-autoenqueue="yes"]').each(function(b,c){var d=a(c);jQuery.fullwidthAudioPlayer.addTrack(d.attr("href"),d.attr("title"),a("body").find(d.data("meta")).html(),d.attr("rel"),d.attr("target"),!1)}),A.bind("fap-tracks-stored",function(b,c){S&&a.fullwidthAudioPlayer.selectTrack(c,S)}),a.fullwidthAudioPlayer.selectTrack(0,/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)?!1:J.autoPlay),J.autoPlay?A.trigger("onFapPlay"):A.trigger("onFapPause")}function h(){function b(){if(!I)return!1;var b=a(this),c=!0;if(b.data("enqueue")&&(c="yes"==b.data("enqueue")?!1:!0),T)if(b.hasClass("fap-add-playlist")){var e=b.data("playlist"),f=jQuery('ul[data-playlist="'+e+'"]').first().children("li").find(".fap-single-track"),g=i(a(f.get(0)));if(0==f.size())return!1;d(g,c),f.splice(0,1),window.fapReady=void 0!=window.fapPopupWin.addTrack;var h=setInterval(function(){window.fapReady&&(clearInterval(h),f.each(function(a,b){d(b,c)}))},50)}else{var g=i(b);d(g,c)}else if(b.hasClass("fap-add-playlist")){var e=b.data("playlist"),f=jQuery('ul[data-playlist="'+e+'"]').first().children("li").find(".fap-single-track");if(0==f.size())return!1;M=-1,A.bind("fap-tracks-stored",function(){if(++M,M="1.7"?(a("body").on("click",".fap-my-playlist li a, .fap-single-track",b),a("body").on("click",".fap-add-playlist",b)):(a("body").delegate(".fap-my-playlist li a, .fap-single-track","click",b),a("body").delegate(".fap-add-playlist","click",b))}function i(b){var c='';if(b.data("meta")){var d=a("body").find(b.data("meta")).html()?a("body").find(b.data("meta")).html():"";c+=''+d+""}return c}function j(b){if(RegExp("http(s?)://soundcloud").test(b))b=b.replace("/likes","/favorites"),SC.get("/resolve",{url:b},function(b,c){if(c&&c.message)return!1;var d=-1,e=-1;if(a.isArray(b))for(var f=0;fe?e:d,0==f&&(d=e);else if("playlist"==b.kind)for(var f=0;fe?e:d,0==f&&(d=e);else"user"==b.kind?SC.get("/users/"+b.id+"/tracks",function(a){for(var b=0;be?e:d,0==b&&(d=e);A.trigger("onFapTracksAdded",[V]),A.trigger("fap-tracks-stored",[d])}):"group"==b.kind?SC.get("/groups/"+b.id+"/tracks",function(a){for(var b=0;be?e:d,0==b&&(d=e);A.trigger("onFapTracksAdded",[V]),A.trigger("fap-tracks-stored",[d])}):"track"==b.kind&&(d=k(b));d>=0&&(A.trigger("onFapTracksAdded",[V]),A.trigger("fap-tracks-stored",[d]))});else if(RegExp("http(s?)://official.fm").test(b)){var c=b.substr(b.lastIndexOf("/tracks")+8);a.getJSON("http://api.official.fm/tracks/"+c+"?fields=streaming,cover&api_version=2",function(a){var b=a.track,c=k({stream_url:b.streaming.http,title:b.artist+" - "+b.title,meta:b.project.name,artwork_url:b.cover.urls.small,permalink_url:b.page});A.trigger("onFapTracksAdded",[V]),A.trigger("fap-tracks-stored",[c])})}}function k(a){for(var b=V.length,c=0;cc&&P--,K.getNiceScroll().resize(),J.storePlaylist&&lify.store("fap-playlist",JSON.stringify(V))}if(!J.playlist)return!1;var f=b?'':'
          ';K.append('
        • '+f+""+c+'
          ×
        • ');var g=K.children("li").last().css({marginBottom:5,height:22});-1==navigator.appVersion.indexOf("MSIE 7.")&&(b||q(g.children(".fap-cover-replace-small").get(0),20,20)),A.jquery>="1.7"?(g.on("click","span",d),g.on("click",".fap-remove-track",e)):(g.delegate("span","click",d),g.delegate(".fap-remove-track","click",e)),K.getNiceScroll().resize()}function q(b,c,d){a(b).append('')}function r(a){D.find("#fap-progress-bar").width(a*N)}function s(a,b){var c=t(a/1e3);G!=c&&(D.find("#fap-current-time").text(c),D.find("#fap-total-time").text(t(b/1e3)),r(a/b)),G=c}function t(a){a=Math.abs(a);var b=new Array;b[0]=Math.floor(a/3600%24),b[1]=Math.floor(a/60%60),b[2]=Math.floor(a%60);for(var c=!0,d=-1,e=0;e>4,c=(15&f)<<4|g>>2,d=(3&g)<<6|h,j+=String.fromCharCode(b),64!=g&&(j+=String.fromCharCode(c)),64!=h&&(j+=String.fromCharCode(d));return j=y(j)}function y(a){for(var b="",c=0,d=c1=c2=0;cd?(b+=String.fromCharCode(d),c++):d>191&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&c2),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&c2)<<6|63&c3),c+=3);return b}function z(){return/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)}var A,B,C,D,E,F,G,H,I,J=a.extend({},a.fn.fullwidthAudioPlayer.defaults,b),K=null,L=0,M=-1,N=180,O=50,P=-1,Q=100,R=!1,S=!1,T=!1,U=!1,V=[];return a.fullwidthAudioPlayer.play=function(){-1==P&&a.fullwidthAudioPlayer.next(),V.length>0&&(F.playState?F.resume():F.play(),D.find("#fap-play-pause").removeClass("fap-play").addClass("fap-pause"),H=!1,A.trigger("onFapPlay"))},a.fullwidthAudioPlayer.pause=function(){V.length>0&&(F.pause(),D.find("#fap-play-pause").removeClass("fap-pause").addClass("fap-play"),H=!0,A.trigger("onFapPause"))},a.fullwidthAudioPlayer.toggle=function(){H?a.fullwidthAudioPlayer.play():a.fullwidthAudioPlayer.pause()},a.fullwidthAudioPlayer.previous=function(){V.length>0&&a.fullwidthAudioPlayer.selectTrack(P-1,!0)},a.fullwidthAudioPlayer.next=function(){V.length>0&&a.fullwidthAudioPlayer.selectTrack(P+1,!0)},a.fullwidthAudioPlayer.volume=function(a){V.length>0&&(0>a&&(a=0),a>1&&(a=1),Q=100*a,F&&F.setVolume(Q),D.find("#fap-volume-progress").width(a*O))},a.fullwidthAudioPlayer.addTrack=function(b,c,d,e,f,g){if(null==b||""==b)return alert('The track with the title "'+c+'" does not contain a track URI to a MP3 file or to a soundcloud resource!'),!1;if(void 0===c&&(c=""),void 0===d&&(d=""),void 0===e&&(e=""),void 0===f&&(f=""),void 0===g&&(g=!1),T&&window.fapPopupWin&&!window.fapPopupWin.closed)return window.fapPopupWin.addTrack(b,c,d,e,f,g),window.fapPopupWin.focus(),!1;if(J.base64&&(b=x(b)),S=g,RegExp("http(s?)://soundcloud").test(b)||RegExp("http(s?)://official.fm").test(b))j(b);else{var h=k({stream_url:b,title:c,meta:d,artwork_url:e,permalink_url:f});A.trigger("onFapTracksAdded",[V]),A.trigger("fap-tracks-stored",[h])}J.opened||!g||U||a.fullwidthAudioPlayer.setPlayerPosition("open",!0)},a.fullwidthAudioPlayer.selectTrack=function(b,c){if(V.length<=0)return a.fullwidthAudioPlayer.clear(),!1;if(b==P)return a.fullwidthAudioPlayer.toggle(),!1;0>b?P=V.length-1:b>=V.length?(P=0,c=J.loopPlaylist):P=b,H=!c;var d=RegExp("http(s?)://soundcloud").test(V[P].permalink_url);if(D.find("#fap-progress-bar").width(0),D.find("#fap-total-time, #fap-current-time").text("00:00:00"),E.children("#fap-current-cover").attr("src",V[P].artwork_url),E.children("#fap-current-title").html(V[P].title),E.children("#fap-current-meta").html(d?V[P].genre:V[P].meta),V[P].artwork_url?(E.children("#fap-current-cover").show(),E.children("#fap-cover-replacement").hide()):(E.children("#fap-current-cover").hide(),E.children("#fap-cover-replacement").show()),V[P].permalink_url){E.children("#fap-social-links").children("a").show();var e="http://www.facebook.com/sharer.php?u="+encodeURIComponent(V[P].permalink_url),f="http://twitter.com/share?url="+encodeURIComponent(V[P].permalink_url)+"&text="+encodeURIComponent(V[P].title);E.find("#fap-social-links a:eq(0)").attr("href",e),E.find("#fap-social-links a:eq(1)").attr("href",f),E.find("#fap-social-links a:eq(2)").attr("href",V[P].permalink_url+"/download"),E.find("#fap-social-links a:eq(3)").attr("href",V[P].permalink_url)}else E.children("#fap-social-links").children("a").hide();K&&(K.children("li").css("background","none"),K.children("li").eq(P).css("background",J.activeTrackColor),K.scrollTop(K.children("li").eq(0).outerHeight(!0)*P)),c?D.find("#fap-play-pause").removeClass("fap-play").addClass("fap-pause"):D.find("#fap-play-pause").removeClass("fap-pause").addClass("fap-play"),F&&F.destruct();var g={id:"fap_sound",autoPlay:c,autoLoad:J.autoLoad,volume:Q,whileloading:l,whileplaying:m,onfinish:n,onload:o};d?(E.children("#fap-social-links").children("a:eq(3)").show(),V[P].downloadable?E.children("#fap-social-links").children("a:eq(2)").show():E.children("#fap-social-links").children("a:eq(2)").hide(),a.extend(g,{id:"fap_sound",url:V[P].stream_url+"?client_id="+SC.options.client_id})):(E.children("#fap-social-links").children("a:eq(2), a:eq(3)").hide(),a.extend(g,{id:"fap_sound",url:V[P].stream_url})),F=soundManager.createSound(g),A.trigger("onFapTrackSelect",[V[P]])},a.fullwidthAudioPlayer.setPlayerPosition=function(a,b){return B.is(":animated")?!1:("open"==a?(C.children("#fap-wrapper-switcher").html("×"),"top"==J.wrapperPosition?B.animate({top:-(L-J.height)},b?300:0):B.animate({bottom:-(L-J.height)},b?300:0),J.opened=!0):"close"==a?(C.children("#fap-wrapper-switcher").html("+"),"top"==J.wrapperPosition?B.animate({top:-L-1},b?300:0):B.animate({bottom:-L-1},b?300:0),J.opened=R=!1):"openPlaylist"==a?("top"==J.wrapperPosition?B.animate({top:0},300,function(){K.getNiceScroll().resize().show()}):B.animate({bottom:0},300,function(){K.getNiceScroll().resize().show()}),R=!0):"closePlaylist"==a&&(K.getNiceScroll().hide(),"top"==J.wrapperPosition?B.animate({top:-(L-J.height)},300):B.animate({bottom:-(L-J.height)},300),R=!1),void 0)},a.fullwidthAudioPlayer.clear=function(){E.children("#fap-current-cover").hide(),E.children("#fap-cover-replacement").show(),E.children("#fap-current-title, #fap-current-meta").html(""),E.children("#fap-social-links").children("a").attr("href","").hide(),D.find("#fap-progress-bar, #fap-loading-bar").width(0),D.find("#fap-current-time, #fap-total-time").text("00:00:00"),D.find("#fap-play-pause").removeClass("fap-pause").addClass("fap-play"),H=!0,P=-1,K&&K.empty(),V=[],F&&F.destruct(),J.playlist&&K.getNiceScroll().resize(),A.trigger("onFapClear")},a.fullwidthAudioPlayer.popUp=function(){T&&(!window.fapPopupWin||window.fapPopupWin.closed?d("",!1):window.fapPopupWin.focus())},Array.prototype.shuffle=v,this.each(function(){c(this)})},a.fn.fullwidthAudioPlayer.defaults={wrapperPosition:"bottom",mainPosition:"center",wrapperColor:"#f0f0f0",mainColor:"#3c3c3c",fillColor:"#e3e3e3",metaColor:"#666666",strokeColor:"#e0e0e0",fillColorHover:"#d1d1d1",activeTrackColor:"#E8E8E8",twitterText:"Share on Twitter",facebookText:"Share on Facebook",downloadText:"Download",layout:"fullwidth",popupUrl:"popup.html",height:80,playlistHeight:210,coverSize:[65,65],offset:20,opened:!0,volume:!0,playlist:!0,autoLoad:!0,autoPlay:!1,playNextWhenFinished:!0,keyboard:!0,socials:!0,autoPopup:!1,randomize:!1,shuffle:!0,sortable:!1,base64:!1,xmlPath:"",xmlPlaylist:"",hideOnMobile:!1,loopPlaylist:!0,storePlaylist:!1}}(jQuery),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(b){var c,d=!1,e=!1,f=5e3,g=2e3,h=0,i=document.getElementsByTagName("script"),i=i[i.length-1].src.split("?")[0];c=0c;++c)a.call(b,this[c],c,this)});var j=window.requestAnimationFrame||!1,k=window.cancelAnimationFrame||!1;["ms","moz","webkit","o"].forEach(function(a){j||(j=window[a+"RequestAnimationFrame"]),k||(k=window[a+"CancelAnimationFrame"]||window[a+"CancelRequestAnimationFrame"])});var l=window.MutationObserver||window.WebKitMutationObserver||!1,m={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:!1,cursordragontouch:!1},n=!1,o=function(a,i){function o(){var a=t.win;if("zIndex"in a)return a.zIndex();for(;0e){if(t.getScrollTop()>=t.page.maxh)return!0}else if(0>=t.getScrollTop())return!0;t.scrollmom&&t.scrollmom.stop(),t.lastdeltay+=e,t.debounced("mousewheely",function(){var a=t.lastdeltay;t.lastdeltay=0,t.rail.drag||t.doScrollBy(a)},120)}return a.stopImmediatePropagation(),a.preventDefault()}var t=this;if(this.version="3.4.0",this.name="nicescroll",this.me=i,this.opt={doc:b("body"),win:!1},b.extend(this.opt,m),this.opt.snapbackspeed=80,a)for(var u in t.opt)"undefined"!=typeof a[u]&&(t.opt[u]=a[u]);this.iddoc=(this.doc=t.opt.doc)&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/BODY|HTML/.test(t.opt.win?t.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==t.opt.win,this.win=t.opt.win||(this.ispage?b(window):this.doc),this.docscroll=this.ispage&&!this.haswrapper?b(window):this.win,this.body=b("body"),this.iframe=this.isfixed=this.viewport=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=t.opt.autohidemode,this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,this.observerremover=this.observer=this.scrollmom=this.scrollrunning=this.checkrtlmode=!1;do this.id="ascrail"+g++;while(document.getElementById(this.id));if(this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1,this.visibility=!0,this.hidden=this.locked=!1,this.cursoractive=!0,this.overflowx=t.opt.overflowx,this.overflowy=t.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltay=this.lastdeltax=0,n)u=n;else{u=document.createElement("DIV");var v={haspointerlock:"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document};v.isopera="opera"in window,v.isopera12=v.isopera&&"getUserMedia"in navigator,v.isie="all"in document&&"attachEvent"in u&&!v.isopera,v.isieold=v.isie&&!("msInterpolationMode"in u.style),v.isie7=!(!v.isie||v.isieold||"documentMode"in document&&7!=document.documentMode),v.isie8=v.isie&&"documentMode"in document&&8==document.documentMode,v.isie9=v.isie&&"performance"in window&&9<=document.documentMode,v.isie10=v.isie&&"performance"in window&&10<=document.documentMode,v.isie9mobile=/iemobile.9/i.test(navigator.userAgent),v.isie9mobile&&(v.isie9=!1),v.isie7mobile=!v.isie9mobile&&v.isie7&&/iemobile/i.test(navigator.userAgent),v.ismozilla="MozAppearance"in u.style,v.iswebkit="WebkitAppearance"in u.style,v.ischrome="chrome"in window,v.ischrome22=v.ischrome&&v.haspointerlock,v.ischrome26=v.ischrome&&"transition"in u.style,v.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window,v.hasmstouch=window.navigator.msPointerEnabled||!1,v.ismac=/^mac$/i.test(navigator.platform),v.isios=v.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform),v.isios4=v.isios&&!("seal"in Object),v.isandroid=/android/i.test(navigator.userAgent),v.trstyle=!1,v.hastransform=!1,v.hastranslate3d=!1,v.transitionstyle=!1,v.hastransition=!1,v.transitionend=!1; +for(var w=["transform","msTransform","webkitTransform","MozTransform","OTransform"],x=0;xf&&!e.tt?t.delaylist[a]={last:f+c,tt:setTimeout(function(){t.delaylist[a].tt=0,b.call()},c)}:e&&e.tt||(t.delaylist[a]={last:f,tt:0},setTimeout(function(){b.call()},0)),void 0)},this.debounced=function(a,b,c){var d=t.delaylist[a];(new Date).getTime(),t.delaylist[a]=b,d||setTimeout(function(){var b=t.delaylist[a];t.delaylist[a]=!1,b.call()},c)},this.synched=function(a,b){return t.synclist[a]=b,t.onsync||(j(function(){t.onsync=!1;for(a in t.synclist){var b=t.synclist[a];b&&b.call(t),t.synclist[a]=!1}}),t.onsync=!0),a},this.unsynched=function(a){t.synclist[a]&&(t.synclist[a]=!1)},this.css=function(a,b){for(var c in b)t.saved.css.push([a,c,a.css(c)]),a.css(c,b[c])},this.scrollTop=function(a){return"undefined"==typeof a?t.getScrollTop():t.setScrollTop(a)},this.scrollLeft=function(a){return"undefined"==typeof a?t.getScrollLeft():t.setScrollLeft(a)},BezierClass=function(a,b,c,d,e,f,g){this.st=a,this.ed=b,this.spd=c,this.p1=d||0,this.p2=e||1,this.p3=f||0,this.p4=g||1,this.ts=(new Date).getTime(),this.df=this.ed-this.st},BezierClass.prototype={B2:function(a){return 3*a*a*(1-a)},B3:function(a){return 3*a*(1-a)*(1-a)},B4:function(a){return(1-a)*(1-a)*(1-a)},getNow:function(){var a=1-((new Date).getTime()-this.ts)/this.spd,b=this.B2(a)+this.B3(a)+this.B4(a);return 0>a?this.ed:this.st+Math.round(this.df*b)},update:function(a,b){return this.st=this.getNow(),this.ed=a,this.spd=b,this.ts=(new Date).getTime(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},A.hastranslate3d&&A.isios&&this.doc.css("-webkit-backface-visibility","hidden");var B=function(){var a=t.doc.css(A.trstyle);return a&&"matrix"==a.substr(0,6)?a.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1};this.getScrollTop=function(a){if(!a){if(a=B())return 16==a.length?-a[13]:-a[5];if(t.timerscroll&&t.timerscroll.bz)return t.timerscroll.bz.getNow()}return t.doc.translate.y},this.getScrollLeft=function(a){if(!a){if(a=B())return 16==a.length?-a[12]:-a[4];if(t.timerscroll&&t.timerscroll.bh)return t.timerscroll.bh.getNow()}return t.doc.translate.x},this.notifyScrollEvent=document.createEvent?function(a){var b=document.createEvent("UIEvents");b.initUIEvent("scroll",!1,!0,window,1),a.dispatchEvent(b)}:document.fireEvent?function(a){var b=document.createEventObject();a.fireEvent("onscroll"),b.cancelBubble=!0}:function(){},A.hastranslate3d&&t.opt.enabletranslate3d?(this.setScrollTop=function(a,b){t.doc.translate.y=a,t.doc.translate.ty=-1*a+"px",t.doc.css(A.trstyle,"translate3d("+t.doc.translate.tx+","+t.doc.translate.ty+",0px)"),b||t.notifyScrollEvent(t.win[0])},this.setScrollLeft=function(a,b){t.doc.translate.x=a,t.doc.translate.tx=-1*a+"px",t.doc.css(A.trstyle,"translate3d("+t.doc.translate.tx+","+t.doc.translate.ty+",0px)"),b||t.notifyScrollEvent(t.win[0])}):(this.setScrollTop=function(a,b){t.doc.translate.y=a,t.doc.translate.ty=-1*a+"px",t.doc.css(A.trstyle,"translate("+t.doc.translate.tx+","+t.doc.translate.ty+")"),b||t.notifyScrollEvent(t.win[0])},this.setScrollLeft=function(a,b){t.doc.translate.x=a,t.doc.translate.tx=-1*a+"px",t.doc.css(A.trstyle,"translate("+t.doc.translate.tx+","+t.doc.translate.ty+")"),b||t.notifyScrollEvent(t.win[0])})}else this.getScrollTop=function(){return t.docscroll.scrollTop()},this.setScrollTop=function(a){return t.docscroll.scrollTop(a)},this.getScrollLeft=function(){return t.docscroll.scrollLeft()},this.setScrollLeft=function(a){return t.docscroll.scrollLeft(a)};this.getTarget=function(a){return a?a.target?a.target:a.srcElement?a.srcElement:!1:!1},this.hasParent=function(a,b){if(!a)return!1;for(var c=a.target||a.srcElement||a||!1;c&&c.id!=b;)c=c.parentNode||!1;return!1!==c};var C={thin:1,medium:3,thick:5};this.getOffset=function(){if(t.isfixed)return{top:parseFloat(t.win.css("top")),left:parseFloat(t.win.css("left"))};if(!t.viewport)return t.win.offset();var a=t.win.offset(),b=t.viewport.offset();return{top:a.top-b.top+t.viewport.scrollTop(),left:a.left-b.left+t.viewport.scrollLeft()}},this.updateScrollBar=function(a){if(t.ishwscroll)t.rail.css({height:t.win.innerHeight()}),t.railh&&t.railh.css({width:t.win.innerWidth()});else{var b=t.getOffset(),c=b.top,d=b.left,c=c+q(t.win,"border-top-width",!0);t.win.outerWidth(),t.win.innerWidth();var d=d+(t.rail.align?t.win.outerWidth()-q(t.win,"border-right-width")-t.rail.width:q(t.win,"border-left-width")),e=t.opt.railoffset;e&&(e.top&&(c+=e.top),t.rail.align&&e.left&&(d+=e.left)),t.locked||t.rail.css({top:c,left:d,height:a?a.h:t.win.innerHeight()}),t.zoom&&t.zoom.css({top:c+1,left:1==t.rail.align?d-20:d+t.rail.width+4}),t.railh&&!t.locked&&(c=b.top,d=b.left,a=t.railh.align?c+q(t.win,"border-top-width",!0)+t.win.innerHeight()-t.railh.height:c+q(t.win,"border-top-width",!0),d+=q(t.win,"border-left-width"),t.railh.css({top:a,left:d,width:t.railh.width}))}},this.doRailClick=function(a,b,c){var d;t.locked||(t.cancelEvent(a),b?(b=c?t.doScrollLeft:t.doScrollTop,d=c?(a.pageX-t.railh.offset().left-t.cursorwidth/2)*t.scrollratio.x:(a.pageY-t.rail.offset().top-t.cursorheight/2)*t.scrollratio.y,b(d)):(b=c?t.doScrollLeftBy:t.doScrollBy,d=c?t.scroll.x:t.scroll.y,a=c?a.pageX-t.railh.offset().left:a.pageY-t.rail.offset().top,c=c?t.view.w:t.view.h,d>=a?b(c):b(-c)))},t.hasanimationframe=j,t.hascancelanimationframe=k,t.hasanimationframe?t.hascancelanimationframe||(k=function(){t.cancelAnimationFrame=!0}):(j=function(a){return setTimeout(a,15-Math.floor(+new Date/1e3)%16)},k=clearInterval),this.init=function(){if(t.saved.css=[],A.isie7mobile)return!0;if(A.hasmstouch&&t.css(t.ispage?b("html"):t.win,{"-ms-touch-action":"none"}),t.zindex="auto",t.zindex=t.ispage||"auto"!=t.opt.zindex?t.opt.zindex:o()||"auto",!t.ispage&&"auto"!=t.zindex&&t.zindex>h&&(h=t.zindex),t.isie&&0==t.zindex&&"auto"==t.opt.zindex&&(t.zindex="auto"),!t.ispage||!A.cantouch&&!A.isieold&&!A.isie9mobile){var a=t.docscroll;t.ispage&&(a=t.haswrapper?t.win:t.doc),A.isie9mobile||t.css(a,{"overflow-y":"hidden"}),t.ispage&&A.isie7&&("BODY"==t.doc[0].nodeName?t.css(b("html"),{"overflow-y":"hidden"}):"HTML"==t.doc[0].nodeName&&t.css(b("body"),{"overflow-y":"hidden"})),A.isios&&!t.ispage&&!t.haswrapper&&t.css(b("body"),{"-webkit-overflow-scrolling":"touch"});var g=b(document.createElement("div"));g.css({position:"relative",top:0,"float":"right",width:t.opt.cursorwidth,height:"0px","background-color":t.opt.cursorcolor,border:t.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":t.opt.cursorborderradius,"-moz-border-radius":t.opt.cursorborderradius,"border-radius":t.opt.cursorborderradius}),g.hborder=parseFloat(g.outerHeight()-g.innerHeight()),t.cursor=g;var i=b(document.createElement("div"));i.attr("id",t.id),i.addClass("nicescroll-rails");var j,k,m,n=["left","right"];for(m in n)k=n[m],(j=t.opt.railpadding[k])?i.css("padding-"+k,j+"px"):t.opt.railpadding[k]=0;if(i.append(g),i.width=Math.max(parseFloat(t.opt.cursorwidth),g.outerWidth())+t.opt.railpadding.left+t.opt.railpadding.right,i.css({width:i.width+"px",zIndex:t.zindex,background:t.opt.background,cursor:"default"}),i.visibility=!0,i.scrollable=!0,i.align="left"==t.opt.railalign?0:1,t.rail=i,g=t.rail.drag=!1,t.opt.boxzoom&&!t.ispage&&!A.isieold&&(g=document.createElement("div"),t.bind(g,"click",t.doZoom),t.zoom=b(g),t.zoom.css({cursor:"pointer","z-index":t.zindex,backgroundImage:"url("+c+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),t.opt.dblclickzoom&&t.bind(t.win,"dblclick",t.doZoom),A.cantouch&&t.opt.gesturezoom&&(t.ongesturezoom=function(a){return 1.5a.scale&&t.doZoomOut(a),t.cancelEvent(a)},t.bind(t.win,"gestureend",t.ongesturezoom))),t.railh=!1,t.opt.horizrailenabled){t.css(a,{"overflow-x":"hidden"}),g=b(document.createElement("div")),g.css({position:"relative",top:0,height:t.opt.cursorwidth,width:"0px","background-color":t.opt.cursorcolor,border:t.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":t.opt.cursorborderradius,"-moz-border-radius":t.opt.cursorborderradius,"border-radius":t.opt.cursorborderradius}),g.wborder=parseFloat(g.outerWidth()-g.innerWidth()),t.cursorh=g;var q=b(document.createElement("div"));q.attr("id",t.id+"-hr"),q.addClass("nicescroll-rails"),q.height=Math.max(parseFloat(t.opt.cursorwidth),g.outerHeight()),q.css({height:q.height+"px",zIndex:t.zindex,background:t.opt.background}),q.append(g),q.visibility=!0,q.scrollable=!0,q.align="top"==t.opt.railvalign?0:1,t.railh=q,t.railh.drag=!1}if(t.ispage?(i.css({position:"fixed",top:"0px",height:"100%"}),i.align?i.css({right:"0px"}):i.css({left:"0px"}),t.body.append(i),t.railh&&(q.css({position:"fixed",left:"0px",width:"100%"}),q.align?q.css({bottom:"0px"}):q.css({top:"0px"}),t.body.append(q))):(t.ishwscroll?("static"==t.win.css("position")&&t.css(t.win,{position:"relative"}),a="HTML"==t.win[0].nodeName?t.body:t.win,t.zoom&&(t.zoom.css({position:"absolute",top:1,right:0,"margin-right":i.width+4}),a.append(t.zoom)),i.css({position:"absolute",top:0}),i.align?i.css({right:0}):i.css({left:0}),a.append(i),q&&(q.css({position:"absolute",left:0,bottom:0}),q.align?q.css({bottom:0}):q.css({top:0}),a.append(q))):(t.isfixed="fixed"==t.win.css("position"),a=t.isfixed?"fixed":"absolute",t.isfixed||(t.viewport=t.getViewport(t.win[0])),t.viewport&&(t.body=t.viewport,0==/relative|absolute/.test(t.viewport.css("position"))&&t.css(t.viewport,{position:"relative"})),i.css({position:a}),t.zoom&&t.zoom.css({position:a}),t.updateScrollBar(),t.body.append(i),t.zoom&&t.body.append(t.zoom),t.railh&&(q.css({position:a}),t.body.append(q))),A.isios&&t.css(t.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),A.isie&&t.opt.disableoutline&&t.win.attr("hideFocus","true"),A.iswebkit&&t.opt.disableoutline&&t.win.css({outline:"none"})),!1===t.opt.autohidemode?(t.autohidedom=!1,t.rail.css({opacity:t.opt.cursoropacitymax}),t.railh&&t.railh.css({opacity:t.opt.cursoropacitymax})):!0===t.opt.autohidemode?(t.autohidedom=b().add(t.rail),A.isie8&&(t.autohidedom=t.autohidedom.add(t.cursor)),t.railh&&(t.autohidedom=t.autohidedom.add(t.railh)),t.railh&&A.isie8&&(t.autohidedom=t.autohidedom.add(t.cursorh))):"scroll"==t.opt.autohidemode?(t.autohidedom=b().add(t.rail),t.railh&&(t.autohidedom=t.autohidedom.add(t.railh))):"cursor"==t.opt.autohidemode?(t.autohidedom=b().add(t.cursor),t.railh&&(t.autohidedom=t.autohidedom.add(t.cursorh))):"hidden"==t.opt.autohidemode&&(t.autohidedom=!1,t.hide(),t.locked=!1),A.isie9mobile)t.scrollmom=new p(t),t.onmangotouch=function(){var a=t.getScrollTop(),b=t.getScrollLeft();if(a==t.scrollmom.lastscrolly&&b==t.scrollmom.lastscrollx)return!0;var c=a-t.mangotouch.sy,d=b-t.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(d,2)+Math.pow(c,2)))){var e=0>c?-1:1,f=0>d?-1:1,g=+new Date;t.mangotouch.lazy&&clearTimeout(t.mangotouch.lazy),802&&(t.mangotouch.lazy=setTimeout(function(){t.mangotouch.lazy=!1,t.mangotouch.dry=0,t.mangotouch.drx=0,t.mangotouch.tm=0,t.scrollmom.doMomentum(30)},100)))}},i=t.getScrollTop(),q=t.getScrollLeft(),t.mangotouch={sy:i,ly:i,dry:0,sx:q,lx:q,drx:0,lazy:!1,tm:0},t.bind(t.docscroll,"scroll",t.onmangotouch);else{if(A.cantouch||t.istouchcapable||t.opt.touchbehavior||A.hasmstouch){t.scrollmom=new p(t),t.ontouchstart=function(a){if(a.pointerType&&2!=a.pointerType)return!1;if(!t.locked){if(A.hasmstouch)for(var c=a.target?a.target:!1;c;){var d=b(c).getNiceScroll();if(00?"v":!1:t.rail.scrollable&&!t.railh.scrollable?d>0?"h":!1:!1,t.rail.drag.ck||(t.rail.drag.dl="f")}if(t.opt.touchbehavior&&t.isiframe&&A.isie&&(d=t.win.position(),t.rail.drag.x+=d.left,t.rail.drag.y+=d.top),t.hasmoving=!1,t.lastmouseup=!1,t.scrollmom.reset(a.clientX,a.clientY),!A.cantouch&&!this.istouchcapable&&!A.hasmstouch){if(!c||!/INPUT|SELECT|TEXTAREA/i.test(c.nodeName))return!t.ispage&&A.hasmousecapture&&c.setCapture(),t.cancelEvent(a);/SUBMIT|CANCEL|BUTTON/i.test(b(c).attr("type"))&&(pc={tg:c,click:!1},t.preventclick=pc)}}},t.ontouchend=function(a){return a.pointerType&&2!=a.pointerType?!1:t.rail.drag&&2==t.rail.drag.pt&&(t.scrollmom.doMomentum(),t.rail.drag=!1,t.hasmoving&&(t.hasmoving=!1,t.lastmouseup=!0,t.hideCursor(),A.hasmousecapture&&document.releaseCapture(),!A.cantouch))?t.cancelEvent(a):void 0};var r=t.opt.touchbehavior&&t.isiframe&&!A.hasmousecapture;t.ontouchmove=function(a,c){if(a.pointerType&&2!=a.pointerType)return!1;if(t.rail.drag&&2==t.rail.drag.pt){if(A.cantouch&&"undefined"==typeof a.original)return!0;if(t.hasmoving=!0,t.preventclick&&!t.preventclick.click&&(t.preventclick.click=t.preventclick.tg.onclick||!1,t.preventclick.tg.onclick=t.onpreventclick),a=b.extend({original:a},a),"changedTouches"in a&&(a.clientX=a.changedTouches[0].clientX,a.clientY=a.changedTouches[0].clientY),t.forcescreen){var d=a;a={original:a.original?a.original:a},a.clientX=d.screenX,a.clientY=d.screenY}if(d=ofy=0,r&&!c){var e=t.win.position(),d=-e.left;ofy=-e.top}var f=a.clientY+ofy,e=f-t.rail.drag.y,g=a.clientX+d,h=g-t.rail.drag.x,i=t.rail.drag.st-e;if(t.ishwscroll&&t.opt.bouncescroll?0>i?i=Math.round(i/2):i>t.page.maxh&&(i=t.page.maxh+Math.round((i-t.page.maxh)/2)):(0>i&&(f=i=0),i>t.page.maxh&&(i=t.page.maxh,f=0)),t.railh&&t.railh.scrollable){var j=t.rail.drag.sl-h;t.ishwscroll&&t.opt.bouncescroll?0>j?j=Math.round(j/2):j>t.page.maxw&&(j=t.page.maxw+Math.round((j-t.page.maxw)/2)):(0>j&&(g=j=0),j>t.page.maxw&&(j=t.page.maxw,g=0))}if(d=!1,t.rail.drag.dl)d=!0,"v"==t.rail.drag.dl?j=t.rail.drag.sl:"h"==t.rail.drag.dl&&(i=t.rail.drag.st);else{var e=Math.abs(e),h=Math.abs(h),k=t.opt.directionlockdeadzone;if("v"==t.rail.drag.ck){if(e>k&&.3*e>=h)return t.rail.drag=!1,!0;h>k&&(t.rail.drag.dl="f",b("body").scrollTop(b("body").scrollTop()))}else if("h"==t.rail.drag.ck){if(h>k&&.3*az>=e)return t.rail.drag=!1,!0;e>k&&(t.rail.drag.dl="f",b("body").scrollLeft(b("body").scrollLeft()))}}if(t.synched("touchmove",function(){t.rail.drag&&2==t.rail.drag.pt&&(t.prepareTransition&&t.prepareTransition(0),t.rail.scrollable&&t.setScrollTop(i),t.scrollmom.update(g,f),t.railh&&t.railh.scrollable?(t.setScrollLeft(j),t.showCursor(i,j)):t.showCursor(i),A.isie10&&document.selection.clear())}),A.ischrome&&t.istouchcapable&&(d=!1),d)return t.cancelEvent(a)}}}if(t.onmousedown=function(a,b){if(!t.rail.drag||1==t.rail.drag.pt){if(t.locked)return t.cancelEvent(a);t.cancelScroll(),t.rail.drag={x:a.clientX,y:a.clientY,sx:t.scroll.x,sy:t.scroll.y,pt:1,hr:!!b};var c=t.getTarget(a);return!t.ispage&&A.hasmousecapture&&c.setCapture(),t.isiframe&&!A.hasmousecapture&&(t.saved.csspointerevents=t.doc.css("pointer-events"),t.css(t.doc,{"pointer-events":"none"})),t.cancelEvent(a)}},t.onmouseup=function(a){return t.rail.drag&&(A.hasmousecapture&&document.releaseCapture(),t.isiframe&&!A.hasmousecapture&&t.doc.css("pointer-events",t.saved.csspointerevents),1==t.rail.drag.pt)?(t.rail.drag=!1,t.cancelEvent(a)):void 0},t.onmousemove=function(a){if(t.rail.drag&&1==t.rail.drag.pt){if(A.ischrome&&0==a.which)return t.onmouseup(a);if(t.cursorfreezed=!0,t.rail.drag.hr){t.scroll.x=t.rail.drag.sx+(a.clientX-t.rail.drag.x),0>t.scroll.x&&(t.scroll.x=0);var b=t.scrollvaluemaxw;t.scroll.x>b&&(t.scroll.x=b)}else t.scroll.y=t.rail.drag.sy+(a.clientY-t.rail.drag.y),0>t.scroll.y&&(t.scroll.y=0),b=t.scrollvaluemax,t.scroll.y>b&&(t.scroll.y=b);return t.synched("mousemove",function(){t.rail.drag&&1==t.rail.drag.pt&&(t.showCursor(),t.rail.drag.hr?t.doScrollLeft(Math.round(t.scroll.x*t.scrollratio.x),t.opt.cursordragspeed):t.doScrollTop(Math.round(t.scroll.y*t.scrollratio.y),t.opt.cursordragspeed))}),t.cancelEvent(a)}},A.cantouch||t.opt.touchbehavior)t.onpreventclick=function(a){return t.preventclick?(t.preventclick.tg.onclick=t.preventclick.click,t.preventclick=!1,t.cancelEvent(a)):void 0},t.bind(t.win,"mousedown",t.ontouchstart),t.onclick=A.isios?!1:function(a){return t.lastmouseup?(t.lastmouseup=!1,t.cancelEvent(a)):!0},t.opt.grabcursorenabled&&A.cursorgrabvalue&&(t.css(t.ispage?t.doc:t.win,{cursor:A.cursorgrabvalue}),t.css(t.rail,{cursor:A.cursorgrabvalue}));else{var s=function(a){if(t.selectiondrag){if(a){var b=t.win.outerHeight();a=a.pageY-t.selectiondrag.top,a>0&&b>a&&(a=0),a>=b&&(a-=b),t.selectiondrag.df=a}0!=t.selectiondrag.df&&(t.doScrollBy(2*-Math.floor(t.selectiondrag.df/6)),t.debounced("doselectionscroll",function(){s()},50))}};t.hasTextSelected="getSelection"in document?function(){return 0t.page.maxh?t.doScrollTop(t.page.maxh):(t.scroll.y=Math.round(t.getScrollTop()*(1/t.scrollratio.y)),t.scroll.x=Math.round(t.getScrollLeft()*(1/t.scrollratio.x)),t.cursoractive&&t.noticeCursor()),t.scroll.y&&0==t.getScrollTop()&&t.doScrollTo(Math.floor(t.scroll.y*t.scrollratio.y)),t)},this.resize=t.onResize,this.lazyResize=function(a){return a=isNaN(a)?30:a,t.delayed("resize",t.resize,a),t},this._bind=function(a,b,c,d){t.events.push({e:a,n:b,f:c,b:d,q:!1}),a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},this.jqbind=function(a,c,d){t.events.push({e:a,n:c,f:d,q:!0}),b(a).bind(c,d)},this.bind=function(a,b,c,d){var e="jquery"in a?a[0]:a;"mousewheel"==b?"onwheel"in t.win?t._bind(e,"wheel",c,d||!1):(a="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",r(e,a,c,d||!1),"DOMMouseScroll"==a&&r(e,"MozMousePixelScroll",c,d||!1)):e.addEventListener?(A.cantouch&&/mouseup|mousedown|mousemove/.test(b)&&t._bind(e,"mousedown"==b?"touchstart":"mouseup"==b?"touchend":"touchmove",function(a){if(a.touches){if(2>a.touches.length){var b=a.touches.length?a.touches[0]:a; +b.original=a,c.call(this,b)}}else a.changedTouches&&(b=a.changedTouches[0],b.original=a,c.call(this,b))},d||!1),t._bind(e,b,c,d||!1),A.cantouch&&"mouseup"==b&&t._bind(e,"touchcancel",c,d||!1)):t._bind(e,b,function(a){return(a=a||window.event||!1)&&a.srcElement&&(a.target=a.srcElement),"pageY"in a||(a.pageX=a.clientX+document.documentElement.scrollLeft,a.pageY=a.clientY+document.documentElement.scrollTop),!1===c.call(e,a)||!1===d?t.cancelEvent(a):!0})},this._unbind=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=!1},this.unbindAll=function(){for(var a=0;a20?a:0},t.opt.smoothscroll?t.ishwscroll&&A.hastransition&&t.opt.usetransition?(this.prepareTransition=function(a,b){var c=b?a>20?a:0:t.getTransitionSpeed(a),d=c?A.prefixstyle+"transform "+c+"ms ease-out":"";return t.lasttransitionstyle&&t.lasttransitionstyle==d||(t.lasttransitionstyle=d,t.doc.css(A.transitionstyle,d)),c},this.doScrollLeft=function(a,b){var c=t.scrollrunning?t.newscrolly:t.getScrollTop();t.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=t.scrollrunning?t.newscrollx:t.getScrollLeft();t.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){var d=t.getScrollTop(),e=t.getScrollLeft();return(0>(t.newscrolly-d)*(b-d)||0>(t.newscrollx-e)*(a-e))&&t.cancelScroll(),0==t.opt.bouncescroll&&(0>b?b=0:b>t.page.maxh&&(b=t.page.maxh),0>a?a=0:a>t.page.maxw&&(a=t.page.maxw)),t.scrollrunning&&a==t.newscrollx&&b==t.newscrolly?!1:(t.newscrolly=b,t.newscrollx=a,t.newscrollspeed=c||!1,t.timer?!1:(t.timer=setTimeout(function(){var c,d,e=t.getScrollTop(),f=t.getScrollLeft();c=a-f,d=b-e,c=Math.round(Math.sqrt(Math.pow(c,2)+Math.pow(d,2))),c=t.newscrollspeed&&1=t.newscrollspeed&&(c*=t.newscrollspeed),t.prepareTransition(c,!0),t.timerscroll&&t.timerscroll.tm&&clearInterval(t.timerscroll.tm),c>0&&(!t.scrollrunning&&t.onscrollstart&&t.onscrollstart.call(t,{type:"scrollstart",current:{x:f,y:e},request:{x:a,y:b},end:{x:t.newscrollx,y:t.newscrolly},speed:c}),A.transitionend?t.scrollendtrapped||(t.scrollendtrapped=!0,t.bind(t.doc,A.transitionend,t.onScrollEnd,!1)):(t.scrollendtrapped&&clearTimeout(t.scrollendtrapped),t.scrollendtrapped=setTimeout(t.onScrollEnd,c)),t.timerscroll={bz:new BezierClass(e,t.newscrolly,c,0,0,.58,1),bh:new BezierClass(f,t.newscrollx,c,0,0,.58,1)},t.cursorfreezed||(t.timerscroll.tm=setInterval(function(){t.showCursor(t.getScrollTop(),t.getScrollLeft())},60))),t.synched("doScroll-set",function(){t.timer=0,t.scrollendtrapped&&(t.scrollrunning=!0),t.setScrollTop(t.newscrolly),t.setScrollLeft(t.newscrollx),t.scrollendtrapped||t.onScrollEnd()})},50),void 0))},this.cancelScroll=function(){if(!t.scrollendtrapped)return!0;var a=t.getScrollTop(),b=t.getScrollLeft();return t.scrollrunning=!1,A.transitionend||clearTimeout(A.transitionend),t.scrollendtrapped=!1,t._unbind(t.doc,A.transitionend,t.onScrollEnd),t.prepareTransition(0),t.setScrollTop(a),t.railh&&t.setScrollLeft(b),t.timerscroll&&t.timerscroll.tm&&clearInterval(t.timerscroll.tm),t.timerscroll=!1,t.cursorfreezed=!1,t.showCursor(a,b),t},this.onScrollEnd=function(){t.scrollendtrapped&&t._unbind(t.doc,A.transitionend,t.onScrollEnd),t.scrollendtrapped=!1,t.prepareTransition(0),t.timerscroll&&t.timerscroll.tm&&clearInterval(t.timerscroll.tm),t.timerscroll=!1;var a=t.getScrollTop(),b=t.getScrollLeft();return t.setScrollTop(a),t.railh&&t.setScrollLeft(b),t.noticeCursor(!1,a,b),t.cursorfreezed=!1,0>a?a=0:a>t.page.maxh&&(a=t.page.maxh),0>b?b=0:b>t.page.maxw&&(b=t.page.maxw),a!=t.newscrolly||b!=t.newscrollx?t.doScrollPos(b,a,t.opt.snapbackspeed):(t.onscrollend&&t.scrollrunning&&t.onscrollend.call(t,{type:"scrollend",current:{x:b,y:a},end:{x:t.newscrollx,y:t.newscrolly}}),t.scrollrunning=!1,void 0)}):(this.doScrollLeft=function(a,b){var c=t.scrollrunning?t.newscrolly:t.getScrollTop();t.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=t.scrollrunning?t.newscrollx:t.getScrollLeft();t.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){function d(){if(t.cancelAnimationFrame)return!0;if(t.scrollrunning=!0,l=1-l)return t.timer=j(d)||1;var a=0,b=sy=t.getScrollTop();if(t.dst.ay){var b=t.bzscroll?t.dst.py+t.bzscroll.getNow()*t.dst.ay:t.newscrolly,c=b-sy;(0>c&&b0&&b>t.newscrolly)&&(b=t.newscrolly),t.setScrollTop(b),b==t.newscrolly&&(a=1)}else a=1;var e=sx=t.getScrollLeft();t.dst.ax?(e=t.bzscroll?t.dst.px+t.bzscroll.getNow()*t.dst.ax:t.newscrollx,c=e-sx,(0>c&&e0&&e>t.newscrollx)&&(e=t.newscrollx),t.setScrollLeft(e),e==t.newscrollx&&(a+=1)):a+=1,2==a?(t.timer=0,t.cursorfreezed=!1,t.bzscroll=!1,t.scrollrunning=!1,0>b?b=0:b>t.page.maxh&&(b=t.page.maxh),0>e?e=0:e>t.page.maxw&&(e=t.page.maxw),e!=t.newscrollx||b!=t.newscrolly?t.doScrollPos(e,b):t.onscrollend&&t.onscrollend.call(t,{type:"scrollend",current:{x:sx,y:sy},end:{x:t.newscrollx,y:t.newscrolly}})):t.timer=j(d)||1}if(b="undefined"==typeof b||!1===b?t.getScrollTop(!0):b,t.timer&&t.newscrolly==b&&t.newscrollx==a)return!0;t.timer&&k(t.timer),t.timer=0;var e=t.getScrollTop(),f=t.getScrollLeft();(0>(t.newscrolly-e)*(b-e)||0>(t.newscrollx-f)*(a-f))&&t.cancelScroll(),t.newscrolly=b,t.newscrollx=a,t.bouncescroll&&t.rail.visibility||(0>t.newscrolly?t.newscrolly=0:t.newscrolly>t.page.maxh&&(t.newscrolly=t.page.maxh)),t.bouncescroll&&t.railh.visibility||(0>t.newscrollx?t.newscrollx=0:t.newscrollx>t.page.maxw&&(t.newscrollx=t.page.maxw)),t.dst={},t.dst.x=a-f,t.dst.y=b-e,t.dst.px=f,t.dst.py=e;var g=Math.round(Math.sqrt(Math.pow(t.dst.x,2)+Math.pow(t.dst.y,2)));t.dst.ax=t.dst.x/g,t.dst.ay=t.dst.y/g;var h=0,i=g;if(0==t.dst.x?(h=e,i=b,t.dst.ay=1,t.dst.py=0):0==t.dst.y&&(h=f,i=a,t.dst.ax=1,t.dst.px=0),g=t.getTransitionSpeed(g),c&&1>=c&&(g*=c),t.bzscroll=g>0?t.bzscroll?t.bzscroll.update(i,g):new BezierClass(h,i,g,0,1,0,1):!1,!t.timer){(e==t.page.maxh&&b>=t.page.maxh||f==t.page.maxw&&a>=t.page.maxw)&&t.checkContentSize();var l=1;t.cancelAnimationFrame=!1,t.timer=1,t.onscrollstart&&!t.scrollrunning&&t.onscrollstart.call(t,{type:"scrollstart",current:{x:f,y:e},request:{x:a,y:b},end:{x:t.newscrollx,y:t.newscrolly},speed:g}),d(),(e==t.page.maxh&&b>=e||f==t.page.maxw&&a>=f)&&t.checkContentSize(),t.noticeCursor()}},this.cancelScroll=function(){return t.timer&&k(t.timer),t.timer=0,t.bzscroll=!1,t.scrollrunning=!1,t}):(this.doScrollLeft=function(a,b){var c=t.getScrollTop();t.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=t.getScrollLeft();t.doScrollPos(c,a,b)},this.doScrollPos=function(a,b){var c=a>t.page.maxw?t.page.maxw:a;0>c&&(c=0);var d=b>t.page.maxh?t.page.maxh:b;0>d&&(d=0),t.synched("scroll",function(){t.setScrollTop(d),t.setScrollLeft(c)})},this.cancelScroll=function(){}),this.doScrollBy=function(a,b){var c=0,c=b?Math.floor((t.scroll.y-a)*t.scrollratio.y):(t.timer?t.newscrolly:t.getScrollTop(!0))-a;if(t.bouncescroll){var d=Math.round(t.view.h/2);-d>c?c=-d:c>t.page.maxh+d&&(c=t.page.maxh+d)}return t.cursorfreezed=!1,py=t.getScrollTop(!0),0>c&&0>=py?t.noticeCursor():c>t.page.maxh&&py>=t.page.maxh?(t.checkContentSize(),t.noticeCursor()):(t.doScrollTop(c),void 0)},this.doScrollLeftBy=function(a,b){var c=0,c=b?Math.floor((t.scroll.x-a)*t.scrollratio.x):(t.timer?t.newscrollx:t.getScrollLeft(!0))-a;if(t.bouncescroll){var d=Math.round(t.view.w/2);-d>c?c=-d:c>t.page.maxw+d&&(c=t.page.maxw+d)}return t.cursorfreezed=!1,px=t.getScrollLeft(!0),0>c&&0>=px||c>t.page.maxw&&px>=t.page.maxw?t.noticeCursor():(t.doScrollLeft(c),void 0)},this.doScrollTo=function(a,b){b&&Math.round(a*t.scrollratio.y),t.cursorfreezed=!1,t.doScrollTop(a)},this.checkContentSize=function(){var a=t.getContentSize();(a.h!=t.page.h||a.w!=t.page.w)&&t.resize(!1,a)},t.onscroll=function(){t.rail.drag||t.cursorfreezed||t.synched("scroll",function(){t.scroll.y=Math.round(t.getScrollTop()*(1/t.scrollratio.y)),t.railh&&(t.scroll.x=Math.round(t.getScrollLeft()*(1/t.scrollratio.x))),t.noticeCursor()})},t.bind(t.docscroll,"scroll",t.onscroll),this.doZoomIn=function(a){if(!t.zoomactive){t.zoomactive=!0,t.zoomrestore={style:{}};var c,d="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),e=t.win[0].style;for(c in d){var f=d[c];t.zoomrestore.style[f]="undefined"!=typeof e[f]?e[f]:""}return t.zoomrestore.style.width=t.win.css("width"),t.zoomrestore.style.height=t.win.css("height"),t.zoomrestore.padding={w:t.win.outerWidth()-t.win.width(),h:t.win.outerHeight()-t.win.height()},A.isios4&&(t.zoomrestore.scrollTop=b(window).scrollTop(),b(window).scrollTop(0)),t.win.css({position:A.isios4?"absolute":"fixed",top:0,left:0,"z-index":h+100,margin:"0px"}),d=t.win.css("backgroundColor"),(""==d||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(d))&&t.win.css("backgroundColor","#fff"),t.rail.css({"z-index":h+101}),t.zoom.css({"z-index":h+102}),t.zoom.css("backgroundPosition","0px -18px"),t.resizeZoom(),t.onzoomin&&t.onzoomin.call(t),t.cancelEvent(a)}},this.doZoomOut=function(a){return t.zoomactive?(t.zoomactive=!1,t.win.css("margin",""),t.win.css(t.zoomrestore.style),A.isios4&&b(window).scrollTop(t.zoomrestore.scrollTop),t.rail.css({"z-index":t.zindex}),t.zoom.css({"z-index":t.zindex}),t.zoomrestore=!1,t.zoom.css("backgroundPosition","0px 0px"),t.onResize(),t.onzoomout&&t.onzoomout.call(t),t.cancelEvent(a)):void 0},this.doZoom=function(a){return t.zoomactive?t.doZoomOut(a):t.doZoomIn(a)},this.resizeZoom=function(){if(t.zoomactive){var a=t.getScrollTop();t.win.css({width:b(window).width()-t.zoomrestore.padding.w+"px",height:b(window).height()-t.zoomrestore.padding.h+"px"}),t.onResize(),t.setScrollTop(Math.min(t.page.maxh,a))}},this.init(),b.nicescroll.push(this)},p=function(a){var b=this;this.nc=a,this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0,this.snapy=this.snapx=!1,this.demuly=this.demulx=0,this.lastscrolly=this.lastscrollx=-1,this.timer=this.chky=this.chkx=0,this.time=function(){return+new Date},this.reset=function(a,c){b.stop();var d=b.time();b.steptime=0,b.lasttime=d,b.speedx=0,b.speedy=0,b.lastx=a,b.lasty=c,b.lastscrollx=-1,b.lastscrolly=-1},this.update=function(a,c){var d=b.time();b.steptime=d-b.lasttime,b.lasttime=d;var d=c-b.lasty,e=a-b.lastx,f=b.nc.getScrollTop(),g=b.nc.getScrollLeft(),f=f+d,g=g+e;b.snapx=0>g||g>b.nc.page.maxw,b.snapy=0>f||f>b.nc.page.maxh,b.speedx=e,b.speedy=d,b.lastx=a,b.lasty=c},this.stop=function(){b.nc.unsynched("domomentum2d"),b.timer&&clearTimeout(b.timer),b.timer=0,b.lastscrollx=-1,b.lastscrolly=-1},this.doSnapy=function(a,c){var d=!1;0>c?(c=0,d=!0):c>b.nc.page.maxh&&(c=b.nc.page.maxh,d=!0),0>a?(a=0,d=!0):a>b.nc.page.maxw&&(a=b.nc.page.maxw,d=!0),d&&b.nc.doScrollPos(a,c,b.nc.opt.snapbackspeed)},this.doMomentum=function(a){var c=b.time(),d=a?c+a:b.lasttime;a=b.nc.getScrollLeft();var e=b.nc.getScrollTop(),f=b.nc.page.maxh,g=b.nc.page.maxw;if(b.speedx=g>0?Math.min(60,b.speedx):0,b.speedy=f>0?Math.min(60,b.speedy):0,d=d&&50>=c-d,(0>e||e>f||0>a||a>g)&&(d=!1),a=b.speedx&&d?b.speedx:!1,b.speedy&&d&&b.speedy||a){var h=Math.max(16,b.steptime);h>50&&(a=h/50,b.speedx*=a,b.speedy*=a,h=50),b.demulxy=0,b.lastscrollx=b.nc.getScrollLeft(),b.chkx=b.lastscrollx,b.lastscrolly=b.nc.getScrollTop(),b.chky=b.lastscrolly;var i=b.lastscrollx,j=b.lastscrolly,k=function(){var a=600i||i>g)&&(a=.1),b.speedy&&(j=Math.floor(b.lastscrolly-b.speedy*(1-b.demulxy)),b.lastscrolly=j,0>j||j>f)&&(a=.1),b.demulxy=Math.min(1,b.demulxy+a),b.nc.synched("domomentum2d",function(){b.speedx&&(b.nc.getScrollLeft()!=b.chkx&&b.stop(),b.chkx=i,b.nc.setScrollLeft(i)),b.speedy&&(b.nc.getScrollTop()!=b.chky&&b.stop(),b.chky=j,b.nc.setScrollTop(j)),b.timer||(b.nc.hideCursor(),b.doSnapy(i,j))}),1>b.demulxy?b.timer=setTimeout(k,h):(b.stop(),b.nc.hideCursor(),b.doSnapy(i,j))};k()}else b.doSnapy(b.nc.getScrollLeft(),b.nc.getScrollTop())}},q=b.fn.scrollTop;b.cssHooks.pageYOffset={get:function(a){var c=b.data(a,"__nicescroll")||!1;return c&&c.ishwscroll?c.getScrollTop():q.call(a)},set:function(a,c){var d=b.data(a,"__nicescroll")||!1;return d&&d.ishwscroll?d.setScrollTop(parseInt(c)):q.call(a,c),this}},b.fn.scrollTop=function(a){if("undefined"==typeof a){var c=this[0]?b.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollTop():q.call(this)}return this.each(function(){var c=b.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollTop(parseInt(a)):q.call(b(this),a)})};var r=b.fn.scrollLeft;b.cssHooks.pageXOffset={get:function(a){var c=b.data(a,"__nicescroll")||!1;return c&&c.ishwscroll?c.getScrollLeft():r.call(a)},set:function(a,c){var d=b.data(a,"__nicescroll")||!1;return d&&d.ishwscroll?d.setScrollLeft(parseInt(c)):r.call(a,c),this}},b.fn.scrollLeft=function(a){if("undefined"==typeof a){var c=this[0]?b.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollLeft():r.call(this)}return this.each(function(){var c=b.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollLeft(parseInt(a)):r.call(b(this),a)})};for(var s=function(c){var d=this;if(this.length=0,this.name="nicescrollarray",this.each=function(a){for(var b=0,c=0;c0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("
          - + acl->isAllowed('administer mlpma songs')): ?> @@ -37,14 +37,14 @@
          artist ?>
          title ?>
          album ?>genre): ?> • genre ?>
          title ?>title ?> artist ?> album ?> genre ?>