Browse Source

commit last months modifications ...

root 5 years ago
parent
commit
c5ce4d4d3c
47 changed files with 22919 additions and 2832 deletions
  1. 1 0
      .gitignore
  2. 11 0
      app/AppKernel.php
  3. 1 1
      app/config/config_dev.yml
  4. 1 1
      app/config/parameters.ini~
  5. 1 1
      composer.json
  6. 0 2798
      composer.lock
  7. BIN
      composer.phar
  8. 1 2
      src/Muzich/CoreBundle/Factory/Elements/Soundcloudcom.php
  9. 1 3
      src/Muzich/CoreBundle/Resources/views/layout.html.twig
  10. 2 2
      src/Muzich/CoreBundle/Resources/views/layout_iframe.html.twig
  11. 3 0
      src/Muzich/CoreBundle/lib/Api/Connector.php
  12. 1 1
      src/Muzich/UserBundle/Resources/views/Info/bar.html.twig
  13. 9 2
      web/app_dev.php
  14. 37 0
      web/bundles/muzichcore/css/main.css
  15. 23 5
      web/bundles/muzichcore/js/autoplay.js
  16. 10 0
      web/bundles/muzichcore/js/muzich.js
  17. 4 2
      web/bundles/muzichcore/js/play2.js
  18. 19 4
      web/bundles/muzichcore/js/player/GenericStreamingPlayer.js
  19. 10 2
      web/bundles/muzichcore/js/player/JamendoPlayer.js
  20. 16 2
      web/bundles/muzichcore/js/player/SoundCloudPlayer.js
  21. 25 5
      web/bundles/muzichcore/js/player/YoutubePlayer.js
  22. 4868 0
      web/css/b83c572.css
  23. 89 0
      web/css/b83c572_base_2.css
  24. 640 0
      web/css/b83c572_jplayer.blue.monday_1.css
  25. 2745 0
      web/css/b83c572_main_4.css
  26. 1393 0
      web/css/b83c572_old_3.css
  27. 6505 0
      web/js/1ae784e.js
  28. 652 0
      web/js/1ae784e_TagPrompt_11.js
  29. 187 0
      web/js/1ae784e_autoplay_14.js
  30. 61 0
      web/js/1ae784e_jconfirmaction.jquery_7.js
  31. 30 0
      web/js/1ae784e_jplayer.playlist.min_5.js
  32. 2 0
      web/js/1ae784e_jquery-1.8.2.prod_1.js
  33. 6 0
      web/js/1ae784e_jquery-ui-1.10.1.custom.min_2.js
  34. 980 0
      web/js/1ae784e_jquery.form-2.14_6.js
  35. 97 0
      web/js/1ae784e_jquery.jplayer.min_4.js
  36. 7 0
      web/js/1ae784e_jquery.scrollTo.min_8.js
  37. 129 0
      web/js/1ae784e_jquery.sticky_10.js
  38. 153 0
      web/js/1ae784e_jquery.stickysidebar_9.js
  39. 3614 0
      web/js/1ae784e_muzich_15.js
  40. 25 0
      web/js/1ae784e_part_12_GenericPlayer_1.js
  41. 146 0
      web/js/1ae784e_part_12_GenericStreamingPlayer_2.js
  42. 71 0
      web/js/1ae784e_part_12_JamendoPlayer_3.js
  43. 138 0
      web/js/1ae784e_part_12_SoundCloudPlayer_4.js
  44. 128 0
      web/js/1ae784e_part_12_YoutubePlayer_5.js
  45. 72 0
      web/js/1ae784e_play2_13.js
  46. 4 0
      web/js/1ae784e_swfobject_3.js
  47. 1 1
      web/sitemap.xml

+ 1 - 0
.gitignore View File

@@ -14,3 +14,4 @@ web/files/avatars/*
14 14
 web/cache/*
15 15
 vendor/
16 16
 app/bootstrap.php.cache
17
+web/sitemap.xml

+ 11 - 0
app/AppKernel.php View File

@@ -62,4 +62,15 @@ class AppKernel extends Kernel
62 62
     {
63 63
         $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
64 64
     }
65
+    
66
+    public function init()
67
+    {
68
+      if ($this->debug) {
69
+        ini_set('display_errors', 1);
70
+        error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
71
+      } else {
72
+        ini_set('display_errors', 0);
73
+      }
74
+    }
75
+    
65 76
 }

+ 1 - 1
app/config/config_dev.yml View File

@@ -12,7 +12,7 @@ web_profiler:
12 12
 swiftmailer:
13 13
     #transport:  smtp
14 14
     #username:   contact@muzi.ch
15
-    #password:   ***REMOVED***
15
+    #password:   secret
16 16
     #host:       mx.muzi.ch
17 17
     #port:       587
18 18
     #encryption: tls

+ 1 - 1
app/config/parameters.ini~ View File

@@ -13,4 +13,4 @@
13 13
     mailer_user=""
14 14
     mailer_password=""
15 15
     locale="fr"
16
-    secret="***REMOVED***"
16
+    secret="secret"

+ 1 - 1
composer.json View File

@@ -1,5 +1,5 @@
1 1
 {
2
-    "minimum-stability": "stable",
2
+    "minimum-stability": "dev",
3 3
     "name": "symfony/framework-standard-edition",
4 4
     "description": "The \"Symfony Standard Edition\" distribution",
5 5
     "autoload": {

File diff suppressed because it is too large
+ 0 - 2798
composer.lock


BIN
composer.phar View File


+ 1 - 2
src/Muzich/CoreBundle/Factory/Elements/Soundcloudcom.php View File

@@ -53,14 +53,13 @@ class Soundcloudcom extends ElementFactory
53 53
   
54 54
   protected function getApiDatasResponse()
55 55
   {
56
-    if (($response = $this->getApiConnector()->getResponseForUrl('http://api.soundcloud.com/resolve.json?url='.$this->element->getUrl().'&client_id=39946ea18e3d78d64c0ac95a025794e1')))
56
+    if (($response = $this->getApiConnector()->getResponseForUrl('https://api.soundcloud.com.bux.fr/resolve.json?url='.$this->element->getUrl().'&client_id=39946ea18e3d78d64c0ac95a025794e1')))
57 57
     {
58 58
       if ($response->haveNot('errors') && $response->have('location'))
59 59
       {
60 60
         return $this->getApiConnector()->getResponseForUrl($response->get('location'));
61 61
       }
62 62
     }
63
-    
64 63
     return null;
65 64
   }
66 65
   

+ 1 - 3
src/Muzich/CoreBundle/Resources/views/layout.html.twig View File

@@ -57,7 +57,6 @@
57 57
     
58 58
   </div>
59 59
     
60
-    {% if not app.request.secure %}
61 60
       {% if  app.environment == 'prod' %} 
62 61
         <!-- Piwik -->
63 62
         <script type="text/javascript"> 
@@ -65,8 +64,8 @@
65 64
           _paq.push(['trackPageView']);
66 65
           _paq.push(['enableLinkTracking']);
67 66
           (function() {
68
-            //var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//"; # pas de certif sur analytics.muzi.ch pour le moment
69 67
             var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//";
68
+            //var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//";
70 69
             _paq.push(['setTrackerUrl', u+'piwik.php']);
71 70
             _paq.push(['setSiteId', 1]);
72 71
             var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
@@ -77,6 +76,5 @@
77 76
         <noscript><p><img src="https://analytics.muzi.ch/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
78 77
         <!-- End Piwik Code -->
79 78
       {% endif %}
80
-    {% endif %}
81 79
   </body>
82 80
 </html>

+ 2 - 2
src/Muzich/CoreBundle/Resources/views/layout_iframe.html.twig View File

@@ -43,8 +43,8 @@
43 43
         _paq.push(['trackPageView']);
44 44
         _paq.push(['enableLinkTracking']);
45 45
         (function() {
46
-          //var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//"; # pas de certif sur analytics.muzi.ch pour le moment
47
-          var u=(("https:" == document.location.protocol) ? "http" : "http") + "://analytics.muzi.ch//";
46
+          var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//"; # pas de certif sur analytics.muzi.ch pour le moment
47
+          //var u=(("https:" == document.location.protocol) ? "http" : "http") + "://analytics.muzi.ch//";
48 48
           _paq.push(['setTrackerUrl', u+'piwik.php']);
49 49
           _paq.push(['setSiteId', 1]);
50 50
           var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';

+ 3 - 0
src/Muzich/CoreBundle/lib/Api/Connector.php View File

@@ -24,6 +24,9 @@ class Connector
24 24
     );
25 25
       
26 26
     curl_setopt_array($api_url, $options);
27
+    //exit($url);
28
+    //var_dump(json_decode(curl_exec($api_url), true));
29
+    //exit(1);
27 30
     return new Response(json_decode(curl_exec($api_url), true));
28 31
   }
29 32
   

+ 1 - 1
src/Muzich/UserBundle/Resources/views/Info/bar.html.twig View File

@@ -2,7 +2,7 @@
2 2
 <div class="user_score">
3 3
   <div class="user_avatar">
4 4
     {% if app.user.avatar_path %}
5
-      <img alt="avatar" src="{{ image(app.user.avatarWebPath).resize(130,137,'#000000') }}" />
5
+      <img alt="avatar" src="{{ image(app.user.avatarWebPath).resize(130,137,'#000000').jpeg() }}" />
6 6
     {% else %}
7 7
       <img alt="default_avatar" src="{{ asset('/img/1360770994_user.png') }}" />
8 8
     {% endif %}

+ 9 - 2
web/app_dev.php View File

@@ -1,5 +1,10 @@
1 1
 <?php
2
-die();
2
+//echo 'Hello world';
3
+error_reporting(E_ALL);
4
+ini_set('display_errors', 1);
5
+//phpinfo();
6
+//die();
7
+//error_reporting(E_ERROR);
3 8
 use Symfony\Component\HttpFoundation\Request;
4 9
 
5 10
 // If you don't want to setup permissions the proper way, just uncomment the following PHP line
@@ -13,12 +18,14 @@ if (isset($_SERVER['HTTP_CLIENT_IP'])
13 18
     || !in_array(@$_SERVER['REMOTE_ADDR'], array(
14 19
         '127.0.0.1',
15 20
         '::1',
21
+        '109.190.39.74',
16 22
     ))
17
-&& false) {
23
+&& False) {
18 24
     header('HTTP/1.0 403 Forbidden');
19 25
     exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
20 26
 }
21 27
 
28
+
22 29
 $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
23 30
 require_once __DIR__.'/../app/AppKernel.php';
24 31
 

+ 37 - 0
web/bundles/muzichcore/css/main.css View File

@@ -2705,4 +2705,41 @@ div.private_links textarea
2705 2705
   animation-name: clignote;
2706 2706
   animation-duration: 1s;
2707 2707
   animation-iteration-count:infinite;
2708
+}
2709
+
2710
+ul.elements li.inline_actions {
2711
+    float: right;
2712
+    text-align: right;
2713
+}
2714
+
2715
+ul.elements li.inline_actions a.button {
2716
+    margin-left: -30px;
2717
+    margin-top: -15px;
2718
+    position: absolute;
2719
+}
2720
+
2721
+#full_screen_toggle {
2722
+  font-size: 70%;
2723
+  text-align: right;
2724
+}
2725
+
2726
+.full_screen {
2727
+  position: fixed;
2728
+  width: 90%;
2729
+  height: 95%;
2730
+  left: 0;
2731
+  top: 0;
2732
+  z-index: 99;
2733
+  margin-left: 5%;
2734
+  margin-top: 1%;
2735
+}
2736
+
2737
+#close_full_screen {
2738
+  position: fixed;
2739
+  right: 0;
2740
+  top: 0;
2741
+  z-index: 1000000000;
2742
+  font-weight: bolder;
2743
+  font-size: 70px;
2744
+  margin-right: 12px;
2708 2745
 }

+ 23 - 5
web/bundles/muzichcore/js/autoplay.js View File

@@ -5,6 +5,7 @@ function Autoplay()
5 5
   var _player = null;
6 6
   var _current_index = 0;
7 7
   var _link = null;
8
+  var _full_screen = false;
8 9
   
9 10
   this.start = function(link)
10 11
   {
@@ -93,17 +94,23 @@ function Autoplay()
93 94
   var createPlayer = function(play_data, finish_callback)
94 95
   {
95 96
     $('#autoplay_loader').show();
96
-    if ((player = window.dynamic_player.play(
97
+    if ((_player = window.dynamic_player.play(
97 98
       $('#autoplay_player'),
98 99
       play_data.element_type,
99 100
       play_data.element_ref_id,
100 101
       play_data.element_id,
101 102
       true,
102
-      finish_callback
103
+      finish_callback,
104
+      function(player) {
105
+        if (!_player || !_full_screen) {
106
+          return;
107
+        }
108
+        player.enableFullScreen();
109
+      }
103 110
     )))
104 111
     {
105 112
       $('#autoplay_loader').hide();
106
-      window.players_manager.add(player, 'autoplay_'+play_data.element_id);
113
+      window.players_manager.add(_player, 'autoplay_'+play_data.element_id);
107 114
       return true;
108 115
     }
109 116
     else
@@ -135,6 +142,13 @@ function Autoplay()
135 142
     $('#autoplay iframe').hide();
136 143
     $('#autoplay img[alt="loader"]').hide();
137 144
   }
145
+
146
+  this.setFullScreen = function(status) {
147
+    _full_screen = status;
148
+    if (status) {
149
+      _player.enableFullScreen();
150
+    }
151
+  }
138 152
   
139 153
 }
140 154
 
@@ -148,7 +162,7 @@ $(document).ready(function() {
148 162
     return false;
149 163
   });
150 164
   
151
-  $('a.autoplay_playlist').live('click', function(){
165
+  $('a.autoplay_playlist, a.autoplay_favshow').live('click', function(){
152 166
     window.autoplay.start($(this));
153 167
     $('html, body').animate({ scrollTop: 0 }, 'fast');
154 168
     return false;
@@ -165,5 +179,9 @@ $(document).ready(function() {
165 179
     $('#autoplay').hide();
166 180
     window.autoplay.stopAndClearAllPlayers();
167 181
   });
168
-  
182
+
183
+  $('#full_screen_toggle input[name="full_screen_toggle"]').on('change', function(){
184
+    window.autoplay.setFullScreen($(this).is(':checked'));
185
+  });
186
+
169 187
 });

+ 10 - 0
web/bundles/muzichcore/js/muzich.js View File

@@ -3601,4 +3601,14 @@ function reload_top_and_side()
3601 3601
 function scrollTo(element)
3602 3602
 {
3603 3603
   $('html, body').animate({ scrollTop: element.offset().top }, 'fast');
3604
+}
3605
+
3606
+function set_full_screen_on(element) {
3607
+    $(element).addClass('full_screen');
3608
+    $('#close_full_screen').remove();
3609
+    $('body').append($('<a id="close_full_screen" href="#">X</a>'));
3610
+    $('#close_full_screen').on('click', function(){
3611
+        $(element).removeClass('full_screen');
3612
+        this.remove();
3613
+    });
3604 3614
 }

+ 4 - 2
web/bundles/muzichcore/js/play2.js View File

@@ -1,13 +1,15 @@
1 1
 function DynamicPlayer()
2 2
 {
3 3
   
4
-  this.play = function(object_for_player, player_type, ref_id, element_id, autoplay, finish_callback)
4
+  this.play = function(object_for_player, player_type, ref_id, element_id, autoplay, finish_callback, play_callback)
5 5
   {
6 6
     autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
7 7
     finish_callback = typeof finish_callback !== 'undefined' ? finish_callback : $.noop;
8
+    play_callback = typeof play_callback !== 'undefined' ? play_callback : $.noop;
9
+
8 10
     if ((player = getPlayerObjectForElementType(object_for_player, player_type, ref_id, element_id, autoplay, finish_callback)))
9 11
     {
10
-      player.play();
12
+      player.play(play_callback);
11 13
       return player;
12 14
     }
13 15
     

+ 19 - 4
web/bundles/muzichcore/js/player/GenericStreamingPlayer.js View File

@@ -18,11 +18,16 @@ function GenericStreamingPlayer(ref_id, object_for_player,
18 18
   
19 19
   var _current_index = 0;
20 20
   
21
-  this.create_player = function()
21
+  this.create_player = function(play_callback)
22 22
   {
23 23
     var jplayer_player  = $('#jquery_jplayer_1').clone();
24 24
     var jplayer_content = $('#jp_container_1').clone();
25
-    
25
+
26
+    var event_play_callback = function(event) {
27
+      event_play(event);
28
+      play_callback();
29
+    };
30
+
26 31
     jplayer_player.attr ('id', 'jplayer_player_element_'+ref_id);
27 32
     jplayer_content.attr('id', 'jplayer_content_element_'+ref_id);
28 33
     
@@ -61,7 +66,7 @@ function GenericStreamingPlayer(ref_id, object_for_player,
61 66
           );
62 67
           
63 68
           var _player_dom = $('#jplayer_player_element_'+ref_id);
64
-          _player_dom.bind($.jPlayer.event.play, event_play);
69
+          _player_dom.bind($.jPlayer.event.play, event_play_callback);
65 70
           _player_dom.bind($.jPlayer.event.ended, event_end);
66 71
           _player_dom.bind($.jPlayer.event.error, event_error);
67 72
         }
@@ -103,9 +108,10 @@ function GenericStreamingPlayer(ref_id, object_for_player,
103 108
     _callback_event_finish_playlist(event);
104 109
   }
105 110
   
106
-  this.play = function()
111
+  this.play = function(play_callback)
107 112
   {
108 113
     _player_dom.jPlayer("play");
114
+    play_callback();
109 115
   }
110 116
   
111 117
   this.stop = function()
@@ -122,6 +128,15 @@ function GenericStreamingPlayer(ref_id, object_for_player,
122 128
   {
123 129
     _object_for_player.html('');
124 130
   }
131
+
132
+  this.enableFullScreen = function() {
133
+
134
+  }
135
+
136
+  this.disableFullScreen = function() {
137
+
138
+  }
139
+
125 140
 }
126 141
 
127 142
 function GenericSong(title, mp3)

+ 10 - 2
web/bundles/muzichcore/js/player/JamendoPlayer.js View File

@@ -5,14 +5,14 @@ function JamendoPlayer(ref_id, object_for_player, finish_callback)
5 5
   var _player = null;
6 6
   var _finish_callback = finish_callback;
7 7
   
8
-  this.play = function()
8
+  this.play = function(play_callback)
9 9
   {
10 10
     _player = new GenericStreamingPlayer(_ref_id, _object_for_player,
11 11
       event_play,
12 12
       event_end,
13 13
       event_error,
14 14
       event_finish_playlist);
15
-    _player.create_player();
15
+    _player.create_player(play_callback);
16 16
   }
17 17
   
18 18
   var event_play = function()
@@ -60,4 +60,12 @@ function JamendoPlayer(ref_id, object_for_player, finish_callback)
60 60
   {
61 61
     this.stopAndDestroy();
62 62
   }
63
+
64
+  this.enableFullScreen = function() {
65
+
66
+  }
67
+
68
+  this.disableFullScreen = function() {
69
+
70
+  }
63 71
 }

+ 16 - 2
web/bundles/muzichcore/js/player/SoundCloudPlayer.js View File

@@ -19,11 +19,17 @@ function SoundCloudPlayer(ref_id, object_for_player, finish_callback, autoplay)
19 19
   var _current_sound_index = 0;
20 20
   var _finish_callback = finish_callback;
21 21
   
22
-  this.play = function()
22
+  this.play = function(play_callback)
23 23
   {
24
+
25
+    var event_play_callback = function() {
26
+      event_play();
27
+      play_callback();
28
+    }
29
+
24 30
     createPlayer(
25 31
       event_ready,
26
-      event_play,
32
+      event_play_callback,
27 33
       event_finish
28 34
     );
29 35
   }
@@ -121,4 +127,12 @@ function SoundCloudPlayer(ref_id, object_for_player, finish_callback, autoplay)
121 127
   {
122 128
     this.destroy(true);
123 129
   }
130
+
131
+  this.enableFullScreen = function() {
132
+
133
+  }
134
+
135
+  this.disableFullScreen = function() {
136
+
137
+  }
124 138
 }

+ 25 - 5
web/bundles/muzichcore/js/player/YoutubePlayer.js View File

@@ -4,27 +4,35 @@ function YoutubePlayer(ref_id, object_for_player, finish_callback)
4 4
   var _object_for_player = object_for_player;
5 5
   var _yt_player;
6 6
   var _finish_callback = finish_callback;
7
+  var that = this;
7 8
   
8
-  this.play = function()
9
+  this.play = function(play_callback)
9 10
   { 
10
-    create_player();
11
+    create_player(play_callback);
11 12
   }
12 13
   
13
-  var create_player = function()
14
+  var create_player = function(play_callback)
14 15
   {
15 16
     var div_for_iframe = $('<div>').attr('id', _object_for_player.attr('id')+'_iframe_'+ref_id);
16 17
     _object_for_player.append(div_for_iframe);
17
-    
18
+
19
+    var onPlayerReady_callback = function(){
20
+      onPlayerReady();
21
+      play_callback(that);
22
+    };
23
+
18 24
     _yt_player = new YT.Player(_object_for_player.attr('id')+'_iframe_'+ref_id, {
19 25
       height  : config_player_youtube_height,
20 26
       width   : '100%',
21 27
       videoId : _ref_id,
22 28
       events  : {
23
-        'onReady': onPlayerReady,
29
+        'onReady': onPlayerReady_callback,
24 30
         'onStateChange': onPlayerStateChange,
25 31
         'onError': onError
26 32
       }
27 33
     });
34
+
35
+
28 36
   }
29 37
   
30 38
   var onPlayerReady = function(event)
@@ -99,10 +107,22 @@ function YoutubePlayer(ref_id, object_for_player, finish_callback)
99 107
   {
100 108
     this.stop();
101 109
     this.destroy();
110
+    this.disableFullScreen();
102 111
   }
103 112
   
104 113
   this.close = function()
105 114
   {
106 115
     this.stopAndDestroy();
107 116
   }
117
+
118
+  this.enableFullScreen = function() {
119
+    var iframe = $('#'+_object_for_player.attr('id')+'_iframe_'+_ref_id);
120
+    set_full_screen_on(iframe);
121
+  }
122
+
123
+  this.disableFullScreen = function() {
124
+    $('#close_full_screen').remove();
125
+  }
126
+
127
+
108 128
 }

File diff suppressed because it is too large
+ 4868 - 0
web/css/b83c572.css


+ 89 - 0
web/css/b83c572_base_2.css View File

@@ -0,0 +1,89 @@
1
+/* --- STYLES DE BASE --- */
2
+
3
+/* Page */
4
+html {
5
+  font-size: 100%; /* Évite un bug d'IE 6-7. (1) */
6
+}
7
+body {
8
+  margin: 0;
9
+  padding: 0; /* Remettre à zéro si nécessaire. */
10
+  /* Pensez à utiliser une collection de polices (2), par ex:
11
+  font-family: Arial, Helvetica, FreeSans, sans-serif; */
12
+  /*font-size: .8em;*/ /* À adapter pour la police choisie. (3) */
13
+  color: black;
14
+  /*background-color: #9AE4E8;*/
15
+  font: 13.34px helvetica,arial,freesans,clean,sans-serif;
16
+  line-height: 1.4;
17
+}
18
+
19
+/* Titres */
20
+h1, h2, h3, h4, h5, h6 {
21
+  margin: 1em 0 .5em 0; /* Rapproche le titre du texte. (5) */
22
+  line-height: 1.2;
23
+  font-weight: bold; /* Valeur par défaut. (6) */
24
+  font-style: normal;
25
+}
26
+h1 {
27
+  font-size: 1.75em;
28
+}
29
+h2 {
30
+  font-size: 1.5em;
31
+}
32
+h3 {
33
+  font-size: 1.25em;
34
+}
35
+h4 {
36
+  font-size: 1em;
37
+}
38
+
39
+/* Listes */
40
+ul, ol {
41
+  margin: .75em 0 .75em 32px;
42
+  padding: 0;
43
+}
44
+
45
+/* Paragraphes */
46
+p {
47
+  margin: .75em 0; /* Marges plus faibles que par défaut. (7) */
48
+}
49
+address {
50
+  margin: .75em 0;
51
+  font-style: normal;
52
+}
53
+
54
+/* Liens */
55
+a {
56
+  text-decoration: underline;
57
+}
58
+a:link {
59
+  /*color: #11C;*/
60
+}
61
+a:visited {
62
+  color: #339;
63
+}
64
+/*a:hover, a:focus, a:active {
65
+  color: #00F;
66
+}*/
67
+
68
+/* Pas de bordure autour des images dans les liens */
69
+a img {
70
+  border: none;
71
+}
72
+
73
+/* Divers éléments de type en-ligne (8) */
74
+em {
75
+  font-style: italic;
76
+}
77
+strong {
78
+  font-weight: bold;
79
+}
80
+
81
+/* Formulaires */
82
+form, fieldset {
83
+  margin: 0;
84
+  padding: 0;
85
+  border: none;
86
+}
87
+input, button, select {
88
+  vertical-align: middle; /* Solution pb. d'alignement. (9) */
89
+}

+ 640 - 0
web/css/b83c572_jplayer.blue.monday_1.css View File

@@ -0,0 +1,640 @@
1
+/*
2
+ * Skin for jPlayer Plugin (jQuery JavaScript Library)
3
+ * http://www.jplayer.org
4
+ *
5
+ * Skin Name: Blue Monday
6
+ *
7
+ * Copyright (c) 2010-2012 Happyworm Ltd
8
+ * Dual licensed under the MIT and GPL licenses.
9
+ *  - http://www.opensource.org/licenses/mit-license.php
10
+ *  - http://www.gnu.org/copyleft/gpl.html
11
+ *
12
+ * Author: Silvia Benvenuti
13
+ * Skin Version: 4.2 (jPlayer 2.2.0)
14
+ * Date: 22nd October 2012
15
+ */
16
+
17
+div.jp-audio,
18
+div.jp-audio-stream,
19
+div.jp-video {
20
+
21
+	/* Edit the font-size to counteract inherited font sizing.
22
+	 * Eg. 1.25em = 1 / 0.8em
23
+	 */
24
+
25
+	font-size:1.25em; /* 1.25em for testing in site pages */ /* No parent CSS that can effect the size in the demos ZIP */
26
+
27
+	font-family:Verdana, Arial, sans-serif;
28
+	line-height:1.6;
29
+	color: #666;
30
+	/*border:1px solid #009be3;*/
31
+	background-color:#eee;
32
+}
33
+div.jp-audio {
34
+	width:100%;
35
+}
36
+div.jp-audio-stream {
37
+	width:182px;
38
+}
39
+div.jp-video-270p {
40
+	width:480px;
41
+}
42
+div.jp-video-360p {
43
+	width:640px;
44
+}
45
+div.jp-video-full {
46
+	/* Rules for IE6 (full-screen) */
47
+	width:480px;
48
+	height:270px;
49
+	/* Rules for IE7 (full-screen) - Otherwise the relative container causes other page items that are not position:static (default) to appear over the video/gui. */
50
+	position:static !important; position:relative
51
+}
52
+
53
+/* The z-index rule is defined in this manner to enable Popcorn plugins that add overlays to video area. EG. Subtitles. */
54
+div.jp-video-full div div {
55
+	z-index:1000;
56
+}
57
+
58
+div.jp-video-full div.jp-jplayer {
59
+	top: 0;
60
+	left: 0;
61
+	position: fixed !important; position: relative; /* Rules for IE6 (full-screen) */
62
+	overflow: hidden;
63
+}
64
+
65
+div.jp-video-full div.jp-gui {
66
+	position: fixed !important; position: static; /* Rules for IE6 (full-screen) */
67
+	top: 0;
68
+	left: 0;
69
+	width:100%;
70
+	height:100%;
71
+	z-index:1001; /* 1 layer above the others. */
72
+}
73
+
74
+div.jp-video-full div.jp-interface {
75
+	position: absolute !important; position: relative; /* Rules for IE6 (full-screen) */
76
+	bottom: 0;
77
+	left: 0;
78
+}
79
+
80
+div.jp-interface {
81
+	position: relative;
82
+	background-color:#eee;
83
+	width:100%;
84
+}
85
+
86
+div.jp-audio div.jp-type-single div.jp-interface {
87
+	height:80px;
88
+}
89
+div.jp-audio div.jp-type-playlist div.jp-interface {
90
+	height:80px;
91
+}
92
+
93
+div.jp-audio-stream div.jp-type-single div.jp-interface {
94
+	height:80px;
95
+}
96
+
97
+div.jp-video div.jp-interface {
98
+	/*border-top:1px solid #009be3;*/
99
+}
100
+
101
+/* @group CONTROLS */
102
+
103
+div.jp-controls-holder {
104
+	clear: both;
105
+	width:440px;
106
+	margin:0 auto;
107
+	position: relative;
108
+	overflow:hidden;
109
+	top:-8px; /* This negative value depends on the size of the text in jp-currentTime and jp-duration */
110
+}
111
+
112
+div.jp-interface ul.jp-controls {
113
+	list-style-type:none;
114
+	margin:0;
115
+	padding: 0;
116
+	overflow:hidden;
117
+}
118
+
119
+div.jp-audio ul.jp-controls {
120
+	width: 380px;
121
+	padding:20px 20px 0 20px;
122
+}
123
+
124
+div.jp-audio-stream ul.jp-controls {
125
+	width: 142px;
126
+	padding:20px 20px 0 20px;
127
+}
128
+
129
+div.jp-video div.jp-type-single ul.jp-controls {
130
+	width: 78px;
131
+	margin-left: 200px;
132
+}
133
+
134
+div.jp-video div.jp-type-playlist ul.jp-controls {
135
+	width: 134px;
136
+	margin-left: 172px;
137
+}
138
+div.jp-video ul.jp-controls,
139
+div.jp-interface ul.jp-controls li {
140
+	display:inline;
141
+	float: left;
142
+}
143
+
144
+div.jp-interface ul.jp-controls a {
145
+	display:block;
146
+	overflow:hidden;
147
+	text-indent:-9999px;
148
+}
149
+a.jp-play,
150
+a.jp-pause {
151
+	width:40px;
152
+	height:40px;
153
+}
154
+
155
+a.jp-play {
156
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 0 no-repeat;
157
+}
158
+a.jp-play:hover {
159
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -41px 0 no-repeat;
160
+}
161
+a.jp-pause {
162
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -42px no-repeat;
163
+	display: none;
164
+}
165
+a.jp-pause:hover {
166
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -41px -42px no-repeat;
167
+}
168
+
169
+a.jp-stop, a.jp-previous, a.jp-next {
170
+	width:28px;
171
+	height:28px;
172
+	margin-top:6px;
173
+}
174
+
175
+a.jp-stop {
176
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -83px no-repeat;
177
+	margin-left:10px;
178
+}
179
+
180
+a.jp-stop:hover {
181
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -29px -83px no-repeat;
182
+}
183
+
184
+a.jp-previous {
185
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -112px no-repeat;
186
+}
187
+a.jp-previous:hover {
188
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -29px -112px no-repeat;
189
+}
190
+
191
+a.jp-next {
192
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -141px no-repeat;
193
+}
194
+a.jp-next:hover {
195
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -29px -141px no-repeat;
196
+}
197
+
198
+/* @end */
199
+
200
+/* @group progress bar */
201
+
202
+div.jp-progress {
203
+	overflow:hidden;
204
+	background-color: #ddd;
205
+}
206
+div.jp-audio div.jp-progress {
207
+	position: absolute;
208
+	top:32px;
209
+	height:15px;
210
+}
211
+div.jp-audio div.jp-type-single div.jp-progress {
212
+	left:110px;
213
+	width:186px;
214
+}
215
+div.jp-audio div.jp-type-playlist div.jp-progress {
216
+	left:166px;
217
+	width:130px;
218
+}
219
+div.jp-video div.jp-progress {
220
+	top:0px;
221
+	left:0px;
222
+	width:100%;
223
+	height:10px;
224
+}
225
+div.jp-seek-bar {
226
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -202px repeat-x;
227
+	width:0px;
228
+	height:100%;
229
+	cursor: pointer;
230
+}
231
+div.jp-play-bar {
232
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -218px repeat-x ;
233
+	width:0px;
234
+	height:100%;
235
+}
236
+
237
+/* The seeking class is added/removed inside jPlayer */
238
+div.jp-seeking-bg {
239
+	background: url("jplayer.blue.monday.seeking.gif");
240
+}
241
+
242
+/* @end */
243
+
244
+/* @group volume controls */
245
+
246
+
247
+a.jp-mute,
248
+a.jp-unmute,
249
+a.jp-volume-max {
250
+	width:18px;
251
+	height:15px;
252
+	margin-top:12px;
253
+}
254
+
255
+div.jp-audio div.jp-type-single a.jp-mute,
256
+div.jp-audio div.jp-type-single a.jp-unmute {
257
+	margin-left: 210px;	
258
+}
259
+div.jp-audio div.jp-type-playlist a.jp-mute,
260
+div.jp-audio div.jp-type-playlist a.jp-unmute {
261
+	margin-left: 154px;
262
+}
263
+
264
+div.jp-audio-stream div.jp-type-single a.jp-mute,
265
+div.jp-audio-stream div.jp-type-single a.jp-unmute {
266
+	margin-left:10px;
267
+}
268
+
269
+div.jp-audio a.jp-volume-max,
270
+div.jp-audio-stream a.jp-volume-max {
271
+	margin-left: 56px;	
272
+}
273
+
274
+div.jp-video a.jp-mute,
275
+div.jp-video a.jp-unmute,
276
+div.jp-video a.jp-volume-max {
277
+	position: absolute;
278
+	top:12px;
279
+	margin-top:0;
280
+}
281
+
282
+div.jp-video a.jp-mute,
283
+div.jp-video a.jp-unmute {
284
+	left: 50px;
285
+}
286
+
287
+div.jp-video a.jp-volume-max {
288
+	left: 134px;
289
+}
290
+
291
+a.jp-mute {
292
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -170px no-repeat;
293
+}
294
+a.jp-mute:hover {
295
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -19px -170px no-repeat;
296
+}
297
+a.jp-unmute {
298
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -60px -170px no-repeat;
299
+	display: none;
300
+}
301
+a.jp-unmute:hover {
302
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -79px -170px no-repeat;
303
+}
304
+a.jp-volume-max {
305
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -186px no-repeat;
306
+}
307
+a.jp-volume-max:hover {
308
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -19px -186px no-repeat;
309
+}
310
+
311
+div.jp-volume-bar {
312
+	position: absolute;
313
+	overflow:hidden;
314
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -250px repeat-x;
315
+	width:46px;
316
+	height:5px;
317
+	cursor: pointer;
318
+}
319
+div.jp-audio div.jp-volume-bar {
320
+	top:37px;
321
+	left:330px;
322
+}
323
+div.jp-audio-stream div.jp-volume-bar {
324
+	top:37px;
325
+	left:92px;
326
+}
327
+div.jp-video div.jp-volume-bar {
328
+	top:17px;
329
+	left:72px;
330
+}
331
+div.jp-volume-bar-value {
332
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -256px repeat-x;
333
+	width:0px;
334
+	height:5px;
335
+}
336
+
337
+/* @end */
338
+
339
+/* @group current time and duration */
340
+
341
+div.jp-audio div.jp-time-holder {
342
+	position:absolute;
343
+	top:50px;
344
+}
345
+div.jp-audio div.jp-type-single div.jp-time-holder {
346
+	left:110px;
347
+	width:186px;
348
+}
349
+div.jp-audio div.jp-type-playlist div.jp-time-holder {
350
+	left:166px;
351
+	width:130px;
352
+}
353
+
354
+div.jp-current-time,
355
+div.jp-duration {
356
+	width:60px;
357
+	font-size:.64em;
358
+	font-style:oblique;
359
+}
360
+div.jp-current-time {
361
+	float: left;
362
+	display:inline;
363
+}
364
+div.jp-duration {
365
+	float: right;
366
+	display:inline;
367
+	text-align: right;
368
+}
369
+
370
+div.jp-video div.jp-current-time {
371
+	margin-left:20px;
372
+}
373
+div.jp-video div.jp-duration {
374
+	margin-right:20px;
375
+}
376
+
377
+/* @end */
378
+
379
+/* @group playlist */
380
+
381
+div.jp-title {
382
+	font-weight:bold;
383
+	text-align:center;
384
+}
385
+
386
+div.jp-title,
387
+div.jp-playlist {
388
+	width:100%;
389
+	background-color:#ccc;
390
+	/*border-top:1px solid #009be3;*/
391
+}
392
+div.jp-type-single div.jp-title,
393
+div.jp-type-playlist div.jp-title,
394
+div.jp-type-single div.jp-playlist {
395
+	border-top:none;
396
+}
397
+div.jp-title ul,
398
+div.jp-playlist ul {
399
+	list-style-type:none;
400
+	margin:0;
401
+	padding:0 20px;
402
+	font-size:.72em;
403
+}
404
+
405
+div.jp-title li {
406
+	padding:5px 0;
407
+	font-weight:bold;
408
+}
409
+div.jp-playlist li {
410
+	padding:5px 0 4px 20px;
411
+	/*border-bottom:1px solid #eee;*/
412
+}
413
+
414
+div.jp-playlist li div {
415
+	display:inline;
416
+}
417
+
418
+/* Note that the first-child (IE6) and last-child (IE6/7/8) selectors do not work on IE */
419
+
420
+div.jp-type-playlist div.jp-playlist li:last-child {
421
+	padding:5px 0 5px 20px;
422
+	border-bottom:none;
423
+}
424
+div.jp-type-playlist div.jp-playlist li.jp-playlist-current {
425
+	list-style-type:square;
426
+	list-style-position:inside;
427
+	padding-left:7px;
428
+}
429
+div.jp-type-playlist div.jp-playlist a {
430
+	color: #333;
431
+	text-decoration: none;
432
+}
433
+div.jp-type-playlist div.jp-playlist a:hover {
434
+	color:#0d88c1;
435
+}
436
+div.jp-type-playlist div.jp-playlist a.jp-playlist-current {
437
+	color:#0d88c1;
438
+}
439
+
440
+div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove {
441
+	float:right;
442
+	display:inline;
443
+	text-align:right;
444
+	margin-right:10px;
445
+	font-weight:bold;
446
+	color:#666;
447
+}
448
+div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover {
449
+	color:#0d88c1;
450
+}
451
+div.jp-type-playlist div.jp-playlist span.jp-free-media {
452
+	float:right;
453
+	display:inline;
454
+	text-align:right;
455
+	margin-right:10px;
456
+}
457
+div.jp-type-playlist div.jp-playlist span.jp-free-media a{
458
+	color:#666;
459
+}
460
+div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{
461
+	color:#0d88c1;
462
+}
463
+span.jp-artist {
464
+	font-size:.8em;
465
+	color:#666;
466
+}
467
+
468
+/* @end */
469
+
470
+div.jp-video-play {
471
+	width:100%;
472
+	overflow:hidden; /* Important for nested negative margins to work in modern browsers */
473
+	cursor:pointer;
474
+	background-color:rgba(0,0,0,0); /* Makes IE9 work with the active area over the whole video area. IE6/7/8 only have the button as active area. */
475
+}
476
+div.jp-video-270p div.jp-video-play {
477
+	margin-top:-270px;
478
+	height:270px;
479
+}
480
+div.jp-video-360p div.jp-video-play {
481
+	margin-top:-360px;
482
+	height:360px;
483
+}
484
+div.jp-video-full div.jp-video-play {
485
+	height:100%;
486
+}
487
+a.jp-video-play-icon {
488
+	position:relative;
489
+	display:block;
490
+	width: 112px;
491
+	height: 100px;
492
+
493
+	margin-left:-56px;
494
+	margin-top:-50px;
495
+	left:50%;
496
+	top:50%;
497
+
498
+	background: url("jplayer.blue.monday.video.play.png") 0 0 no-repeat;
499
+	text-indent:-9999px;
500
+}
501
+div.jp-video-play:hover a.jp-video-play-icon {
502
+	background: url("jplayer.blue.monday.video.play.png") 0 -100px no-repeat;
503
+}
504
+
505
+
506
+
507
+
508
+
509
+div.jp-jplayer audio,
510
+div.jp-jplayer {
511
+	width:0px;
512
+	height:0px;
513
+}
514
+
515
+div.jp-jplayer {
516
+	background-color: #000000;
517
+}
518
+
519
+
520
+
521
+
522
+
523
+/* @group TOGGLES */
524
+
525
+/* The audio toggles are nested inside jp-time-holder */
526
+
527
+ul.jp-toggles {
528
+	list-style-type:none;
529
+	padding:0;
530
+	margin:0 auto;
531
+	overflow:hidden;
532
+}
533
+
534
+div.jp-audio .jp-type-single ul.jp-toggles {
535
+	width:25px;
536
+}
537
+div.jp-audio .jp-type-playlist ul.jp-toggles {
538
+	width:55px;
539
+	margin: 0;
540
+	position: absolute;
541
+	left: 325px;
542
+	top: 50px;
543
+}
544
+
545
+div.jp-video ul.jp-toggles {
546
+	margin-top:10px;
547
+	width:100px;
548
+}
549
+
550
+ul.jp-toggles li {
551
+	display:block;
552
+	float:right;
553
+}
554
+
555
+ul.jp-toggles li a {
556
+	display:block;
557
+	width:25px;
558
+	height:18px;
559
+	text-indent:-9999px;
560
+	line-height:100%; /* need this for IE6 */
561
+}
562
+
563
+a.jp-full-screen {
564
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -310px no-repeat;
565
+	margin-left: 20px;
566
+}
567
+
568
+a.jp-full-screen:hover {
569
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -30px -310px no-repeat;
570
+}
571
+
572
+a.jp-restore-screen {
573
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -60px -310px no-repeat;
574
+	margin-left: 20px;
575
+}
576
+
577
+a.jp-restore-screen:hover {
578
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -90px -310px no-repeat;
579
+}
580
+
581
+a.jp-repeat {
582
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -290px no-repeat;
583
+}
584
+
585
+a.jp-repeat:hover {
586
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -30px -290px no-repeat;
587
+}
588
+
589
+a.jp-repeat-off {
590
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -60px -290px no-repeat;
591
+}
592
+
593
+a.jp-repeat-off:hover {
594
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -90px -290px no-repeat;
595
+}
596
+
597
+a.jp-shuffle {
598
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") 0 -270px no-repeat;
599
+	margin-left: 5px;
600
+}
601
+
602
+a.jp-shuffle:hover {
603
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -30px -270px no-repeat;
604
+}
605
+
606
+a.jp-shuffle-off {
607
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -60px -270px no-repeat;
608
+	margin-left: 5px;
609
+}
610
+
611
+a.jp-shuffle-off:hover {
612
+	background: url("/jplayer/skin/blue.monday/jplayer.blue.monday.jpg") -90px -270px no-repeat;
613
+}
614
+
615
+
616
+/* @end */
617
+
618
+/* @group NO SOLUTION error feedback */
619
+
620
+.jp-no-solution {
621
+	padding:5px;
622
+	font-size:.8em;
623
+	background-color:#eee;
624
+	border:2px solid #009be3;
625
+	color:#000;
626
+	display:none;
627
+}
628
+
629
+.jp-no-solution a {
630
+	color:#000;
631
+}
632
+
633
+.jp-no-solution span {
634
+	font-size:1em;
635
+	display:block;
636
+	text-align:center;
637
+	font-weight:bold;
638
+}
639
+
640
+/* @end */

File diff suppressed because it is too large
+ 2745 - 0
web/css/b83c572_main_4.css


File diff suppressed because it is too large
+ 1393 - 0
web/css/b83c572_old_3.css


File diff suppressed because it is too large
+ 6505 - 0
web/js/1ae784e.js


+ 652 - 0
web/js/1ae784e_TagPrompt_11.js View File

@@ -0,0 +1,652 @@
1
+function TagPrompt(select_tag_callback, tag_prompt_connector)
2
+{
3
+  // En plus je change une ligne !
4
+  /* @var tags_selected array of Tag */
5
+  var tags_selected = [];
6
+  /* @var tags_proposed array of Tag */
7
+  var tags_proposed = [];
8
+  var _select_tag_callback = select_tag_callback;
9
+  var _tag_prompt_connector = tag_prompt_connector;
10
+  
11
+  this.getProposedTagsForString = function(search_string, callback_success, callback_error)
12
+  {
13
+    tags_proposed = [];
14
+    JQueryJson(url_search_tag, {'string_search': search_string}, function(response){
15
+      if (response.status == 'error')
16
+      {
17
+        callback_error(response.error);
18
+      }
19
+      else if (response.status == 'success')
20
+      {
21
+        for (i in response.data)
22
+        {
23
+          var tag = new Tag(
24
+            response.data[i].id,
25
+            response.data[i].name
26
+          );
27
+          tags_proposed.push(tag);
28
+        }
29
+        callback_success(tags_proposed, search_string, response.message, response.same_found);
30
+      }
31
+    });
32
+  }
33
+  
34
+  this.selectProposedTag = function (tag_id, tag_name)
35
+  {
36
+    if (!tag_id)
37
+    {
38
+      if (!visitor)
39
+      {
40
+        openTagSubmission(tag_name);
41
+      }
42
+      else
43
+      {
44
+        open_connection_or_subscription_window();
45
+      }
46
+    }
47
+    else
48
+    {
49
+      addTagToSelectedTags(findTagInProposedList(tag_id));
50
+      _select_tag_callback(tags_selected);
51
+    }
52
+  }
53
+  
54
+  var openTagSubmission = function (tag_name)
55
+  {
56
+    // TODO : Cette partie du code n'est pas encore refactorisé
57
+    
58
+    // Effet fade-in du fond opaque
59
+    $('body').append($('<div>').attr('id', 'fade')); 
60
+    //Apparition du fond - .css({'filter' : 'alpha(opacity=80)'}) pour corriger les bogues de IE
61
+    $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn();
62
+    
63
+    // En premier lieux on fait apparaître la fenêtre de confirmation
64
+    var popup = $('<div>')
65
+    .attr('id', 'add_tag')
66
+    .addClass('popin_block')
67
+    .css('width', '400px')
68
+      //.append($('<h2>').append(string_tag_add_title))
69
+    .append($('<form>')
70
+      .attr('action', url_add_tag)
71
+      .attr('method', 'post')
72
+      .attr('name', 'add_tag')
73
+      .ajaxForm(function(response) {
74
+       
75
+        window.ResponseController.execute(
76
+          response,
77
+          function(){},
78
+          function(response){
79
+            $('form[name="add_tag"]').find('ul.error_list').remove();
80
+            var ul_errors = $('<ul>').addClass('error_list');
81
+
82
+            for (i in response.errors)
83
+            {
84
+              ul_errors.append($('<li>').append(response.errors[i]));
85
+            }
86
+
87
+            $('form[name="add_tag"]').prepend(ul_errors);
88
+          }
89
+        );
90
+  
91
+        if (response.status === 'success')
92
+        {
93
+          var tag = new Tag(response.tag_id, response.tag_name);
94
+          addTagToProposedTags(tag);
95
+          addTagToSelectedTags(tag);
96
+          _tag_prompt_connector.updateOutput(tags_selected);
97
+
98
+          $('#fade').fadeOut(400, function(){$('#fade').remove();});
99
+          $('#add_tag').remove();
100
+        }
101
+  
102
+        return false;
103
+      })
104
+  
105
+      .append($('<div>').addClass('tag')
106
+        .append($('<ul>')
107
+          .append($('<li>').addClass('button')
108
+            .append(tag_name))))
109
+      .append($('<p>').append(string_tag_add_text))
110
+      .append($('<p>').append(string_tag_add_argument))
111
+      .append($('<textarea>').attr('name', 'argument'))
112
+      .append($('<div>').addClass('inputs')
113
+        .append($('<input>')
114
+          .attr('type', 'button')
115
+          .attr('value', string_tag_add_inputs_cancel)
116
+          .addClass('button')
117
+          .click(function(){
118
+            $('#fade').fadeOut(1000, function(){$('#fade').remove();});
119
+            $('#add_tag').remove();
120
+  
121
+            return false;
122
+          })
123
+        )
124
+        .append($('<input>')
125
+          .attr('type', 'submit')
126
+          .attr('value', string_tag_add_inputs_submit)
127
+          .addClass('button')
128
+          .click(function(){
129
+  
130
+            // TODO: loader gif
131
+  
132
+          })
133
+        )
134
+        .append($('<input>').attr('type', 'hidden').attr('name', 'tag_name').val(tag_name))
135
+      ))
136
+    ;
137
+  
138
+    // Il faut ajouter le popup au dom avant de le positionner en css
139
+    // Sinon la valeur height n'est pas encore calculable
140
+    $('body').prepend(popup);
141
+  
142
+    //Récupération du margin, qui permettra de centrer la fenêtre - on ajuste de 80px en conformité avec le CSS
143
+    var popMargTop = (popup.height() + 50) / 2;
144
+    var popMargLeft = (popup.width() + 50) / 2;
145
+  
146
+    //On affecte le margin
147
+    $(popup).css({
148
+      'margin-top' : -popMargTop,
149
+      'margin-left' : -popMargLeft
150
+    });
151
+  
152
+    return false;
153
+  }
154
+  
155
+  this.openTagSubmission = function (tag_name)
156
+  {
157
+    // TODO : Cette partie du code n'est pas encore refactorisé
158
+    
159
+    // Effet fade-in du fond opaque
160
+    $('body').append($('<div>').attr('id', 'fade')); 
161
+    //Apparition du fond - .css({'filter' : 'alpha(opacity=80)'}) pour corriger les bogues de IE
162
+    $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn();
163
+    
164
+    // En premier lieux on fait apparaître la fenêtre de confirmation
165
+    var popup = $('<div>')
166
+    .attr('id', 'add_tag')
167
+    .addClass('popin_block')
168
+    .css('width', '400px')
169
+      //.append($('<h2>').append(string_tag_add_title))
170
+    .append($('<form>')
171
+      .attr('action', url_add_tag)
172
+      .attr('method', 'post')
173
+      .attr('name', 'add_tag')
174
+      .ajaxForm(function(response) {
175
+        /*
176
+        *
177
+        */
178
+  
179
+        window.ResponseController.execute(
180
+          response,
181
+          function(){},
182
+          function(){}
183
+        );
184
+  
185
+        if (response.status == 'success')
186
+        {
187
+          var tag = new Tag(response.tag_id, response.tag_name);
188
+          addTagToProposedTags(tag);
189
+          addTagToSelectedTags(tag);
190
+          _tag_prompt_connector.updateOutput(tags_selected);
191
+  
192
+          $('#fade').fadeOut(400, function(){$('#fade').remove();});
193
+          $('#add_tag').remove();
194
+        }
195
+  
196
+        if (response.status == 'error')
197
+        {
198
+          $('form[name="add_tag"]').find('ul.error_list').remove();
199
+          var ul_errors = $('<ul>').addClass('error_list');
200
+  
201
+          for (i in response.errors)
202
+          {
203
+            ul_errors.append($('<li>').append(response.errors[i]));
204
+          }
205
+  
206
+          $('form[name="add_tag"]').prepend(ul_errors);
207
+        }
208
+  
209
+        return false;
210
+      })
211
+  
212
+      .append($('<div>').addClass('tag')
213
+        .append($('<ul>')
214
+          .append($('<li>').addClass('button')
215
+            .append(tag_name))))
216
+      .append($('<p>').append(string_tag_add_text))
217
+      .append($('<p>').append(string_tag_add_argument))
218
+      .append($('<textarea>').attr('name', 'argument'))
219
+      .append($('<div>').addClass('inputs')
220
+        .append($('<input>')
221
+          .attr('type', 'button')
222
+          .attr('value', string_tag_add_inputs_cancel)
223
+          .addClass('button')
224
+          .click(function(){
225
+            $('#fade').fadeOut(1000, function(){$('#fade').remove();});
226
+            $('#add_tag').remove();
227
+  
228
+            return false;
229
+          })
230
+        )
231
+        .append($('<input>')
232
+          .attr('type', 'submit')
233
+          .attr('value', string_tag_add_inputs_submit)
234
+          .addClass('button')
235
+          .click(function(){
236
+  
237
+            // TODO: loader gif
238
+  
239
+          })
240
+        )
241
+        .append($('<input>').attr('type', 'hidden').attr('name', 'tag_name').val(tag_name))
242
+      ))
243
+    ;
244
+  
245
+    // Il faut ajouter le popup au dom avant de le positionner en css
246
+    // Sinon la valeur height n'est pas encore calculable
247
+    $('body').prepend(popup);
248
+  
249
+    //Récupération du margin, qui permettra de centrer la fenêtre - on ajuste de 80px en conformité avec le CSS
250
+    var popMargTop = (popup.height() + 50) / 2;
251
+    var popMargLeft = (popup.width() + 50) / 2;
252
+  
253
+    //On affecte le margin
254
+    $(popup).css({
255
+      'margin-top' : -popMargTop,
256
+      'margin-left' : -popMargLeft
257
+    });
258
+  
259
+    return false;
260
+  }
261
+  
262
+  var addTagToSelectedTags = function(tag)
263
+  {
264
+    var found = false;
265
+    for (i in tags_selected)
266
+    {
267
+      if (tags_selected[i].id == tag.id)
268
+      {
269
+        found = true;
270
+      }
271
+    }
272
+    if (!found)
273
+    {
274
+      tags_selected.push(tag);
275
+    }
276
+  }
277
+  
278
+  var addTagToProposedTags = function(tag)
279
+  {
280
+    var found = false;
281
+    for (i in tags_proposed)
282
+    {
283
+      if (tags_proposed[i].id == tag.id)
284
+      {
285
+        found = true;
286
+      }
287
+    }
288
+    if (!found)
289
+    {
290
+      tags_proposed.push(tag);
291
+    }
292
+  }
293
+  
294
+  this.addTag = function(tag)
295
+  {
296
+    addTagToSelectedTags(tag);
297
+    addTagToProposedTags(tag);
298
+  }
299
+  
300
+  var findTagInProposedList = function(tag_id)
301
+  {
302
+    for (i in tags_proposed)
303
+    {
304
+      if (tags_proposed[i].id == tag_id)
305
+      {
306
+        return tags_proposed[i];
307
+      }
308
+    }
309
+    throw new Error("Unable to find the tag !")
310
+  }
311
+  
312
+  this.removeSelectedTag = function(tag_id)
313
+  {
314
+    var new_tags_selected = [];
315
+    for (i in tags_selected)
316
+    {
317
+      if (tags_selected[i].id != tag_id)
318
+      {
319
+        new_tags_selected.push(tags_selected[i]);
320
+      }
321
+    }
322
+    tags_selected = new_tags_selected;
323
+  }
324
+  
325
+  this.getSelectedTags = function()
326
+  {
327
+    return tags_selected;
328
+  }
329
+  
330
+  this.setSelectedTags = function(tags)
331
+  {
332
+    tags_selected = tags;
333
+  }
334
+  
335
+}
336
+
337
+function TagPromptConnector(input, output, proposition_list, tag_box, prompt_loader)
338
+{
339
+  var _input = input;
340
+  var _output = output;
341
+  var _tag_box_manager = new TagBoxManager(tag_box, this);
342
+  var _prompt_loader = prompt_loader;
343
+  
344
+  var updateHelpDisplay = function()
345
+  {
346
+    if (_tag_prompt.getSelectedTags())
347
+    {
348
+      if (_tag_prompt.getSelectedTags().length)
349
+      {
350
+        $('#tags_prompt_search p.help_notags').hide();
351
+      }
352
+      else
353
+      {
354
+        $('#tags_prompt_search p.help_notags').show();
355
+      }
356
+    }
357
+  }
358
+  
359
+  this.updateOutput = function(tags)
360
+  {
361
+    _output.val(array2json(tagsToArrayIds(tags)));
362
+    _tag_proposition_list.hide();
363
+    _tag_box_manager.update(tags);
364
+    cleanInput();
365
+    updateHelpDisplay();
366
+  }
367
+  
368
+  var _tag_prompt = new TagPrompt(this.updateOutput, this);
369
+  var _tag_proposition_list = new TagPromptPropositionList(proposition_list, _tag_prompt.selectProposedTag, this);
370
+  
371
+  var cleanInput = function()
372
+  {
373
+    // hack pour ie < 10 ne supportant pas le placeholder
374
+    if ($.browser.version < 10 && $.browser.msie)
375
+    {
376
+      _input.addClass('placeholder');
377
+      _input.val(_input.attr('placeholder'));
378
+    }
379
+    else
380
+    {
381
+      _input.val('');
382
+    }
383
+  }
384
+  
385
+  var showPromptLoader = function()
386
+  {
387
+    _prompt_loader.show();
388
+  }
389
+  
390
+  this.hidePromptLoader = function()
391
+  {
392
+    _prompt_loader.hide();
393
+  }
394
+  
395
+  var launchSearchTagsIdLastKeystroke = function(search_string)
396
+  {
397
+    if (search_string == _input.val())
398
+    {
399
+      displayTagsProposedSearchTags();
400
+    }
401
+  }
402
+  
403
+  var displayTagsProposedSearchTags = function()
404
+  {
405
+    var string_search = _input.val();
406
+    _tag_prompt.getProposedTagsForString(
407
+      string_search,
408
+      _tag_proposition_list.displayTagsPropositions,
409
+      _tag_proposition_list.displayError
410
+    );
411
+  }
412
+  
413
+  $(_input).bind('keyup', function() {
414
+    if ($(this).val().length > 0)
415
+    {
416
+      showPromptLoader();
417
+      var input_value = _input.val();
418
+      window.setTimeout(function(){
419
+        launchSearchTagsIdLastKeystroke(input_value);
420
+      }, 1000);
421
+    }
422
+  });
423
+  
424
+  var tagsToArrayIds = function(tags)
425
+  {
426
+    var tags_ids = [];
427
+    for (i in tags)
428
+    {
429
+      tags_ids.push(tags[i].id);
430
+    }
431
+    return tags_ids;
432
+  }
433
+  
434
+  this.removeSelectedTag = function(tag_id)
435
+  {
436
+    _tag_prompt.removeSelectedTag(tag_id);
437
+    this.updateOutput(_tag_prompt.getSelectedTags());
438
+  }
439
+  
440
+  this.initializeTags = function(tags)
441
+  {
442
+    _tag_prompt.setSelectedTags(tags);
443
+    this.updateOutput(_tag_prompt.getSelectedTags());
444
+  }
445
+  
446
+  this.addTagToTagPrompt = function(tag)
447
+  {
448
+    _tag_prompt.addTag(tag);
449
+    this.updateOutput(_tag_prompt.getSelectedTags());
450
+  }
451
+  
452
+  this.openTagSubmission = function(tag_name)
453
+  {
454
+    _tag_prompt.openTagSubmission(tag_name);
455
+  }
456
+  
457
+}
458
+
459
+function TagBoxManager(tag_box, tag_prompt_connector)
460
+{
461
+  var _tag_prompt_connector = tag_prompt_connector;
462
+  var _tag_box = tag_box;
463
+  
464
+  this.update = function(tags)
465
+  {
466
+    _tag_box.find('li').remove();
467
+    for (i in tags)
468
+    {
469
+      _tag_box.append(getTagLine(tags[i]));
470
+    }
471
+  }
472
+  
473
+  var getTagLine = function (tag)
474
+  {
475
+    var line = $('<li>');
476
+    line.addClass('tag');
477
+    line.text(tag.name);
478
+    line.append(getCloseLink(tag));
479
+    
480
+    return line;
481
+  }
482
+  
483
+  var getCloseLink = function(tag)
484
+  {
485
+    var close_link = $('<a>');
486
+    close_link.addClass('close');
487
+    close_link.attr('href', '#');
488
+    close_link.data('tag_id', tag.id);
489
+    close_link.data('tag_name', tag.name);
490
+    close_link.text('close');
491
+    close_link.bind('click', function(){
492
+      _tag_prompt_connector.removeSelectedTag($(this).data('tag_id'));
493
+      return false;
494
+    });
495
+    
496
+    return close_link;
497
+  }
498
+  
499
+}
500
+
501
+function TagPromptPropositionList(proposition_list, click_tag_callback, tag_prompt_connector)
502
+{
503
+  var _proposition_list = proposition_list;
504
+  var _list;
505
+  var _limit_display_tags = 30;
506
+  var _click_tag_callback = click_tag_callback;
507
+  var _tag_prompt_connector = tag_prompt_connector;
508
+  
509
+  this.displayError = function(error_string)
510
+  {
511
+    initializeList();
512
+    var span_info = _proposition_list.find('span.info');
513
+    span_info.text(error_string);
514
+  }
515
+  
516
+  this.displayTagsPropositions = function(tags, search_string, message, same_found)
517
+  {
518
+    initializeList();
519
+    displayMessage(message);
520
+    for (i in tags)
521
+    {
522
+      addTagToList(tags[i], search_string);
523
+    }
524
+    if (!same_found)
525
+    {
526
+      addTagPropositionToList(new Tag(null, search_string));
527
+    }
528
+  }
529
+  
530
+  var initializeList = function()
531
+  {
532
+    _tag_prompt_connector.hidePromptLoader();
533
+    $(_proposition_list).show();
534
+    _list = _proposition_list.find('ul.search_tag_list');
535
+    _list.find('li').remove();
536
+    _proposition_list.find('a.more').hide();
537
+  }
538
+  
539
+  var displayMessage = function(message)
540
+  {
541
+    var span_info = _proposition_list.find('span.info');
542
+    span_info.text(message);
543
+  }
544
+  
545
+  var addTagToList = function(tag, search_string)
546
+  {
547
+    var line = '';
548
+    if (_list.find('li').length > _limit_display_tags)
549
+    {
550
+      line = getListLine(tag, true);
551
+      _proposition_list.find('a.more').show();
552
+    }
553
+    else
554
+    {
555
+      line = getListLine(tag, false);
556
+    }
557
+    
558
+    line = strongifySearchedLetters(line, search_string);
559
+    _list.append(line);
560
+  }
561
+  
562
+  var getListLine = function(tag, hide)
563
+  {
564
+    if (hide)
565
+    {
566
+      var line = $('<li style="display: none;">');
567
+    }
568
+    else
569
+    {
570
+      var line = $('<li>');
571
+    }
572
+    
573
+    return line.append(getTagLink(tag));
574
+  }
575
+  
576
+  var getTagLink = function(tag)
577
+  {
578
+    link = $('<a>');
579
+    link.attr('href', '#');
580
+    link.data('tag_id', tag.id);
581
+    link.data('tag_name', tag.name);
582
+    link.text(tag.name);
583
+    link.bind('click', function(){
584
+      _click_tag_callback($(this).data('tag_id'), $(this).data('tag_name'));
585
+      return false;
586
+    });
587
+    return link;
588
+  }
589
+  
590
+  var strongifySearchedLetters = function(line, search_string)
591
+  {
592
+    var name = line.find('a').text();
593
+    line.find('a').html(name.replace(new RegExp(search_string, "i"), "<strong>" + search_string + "</strong>"));
594
+    return line;
595
+  }
596
+  
597
+  var addTagPropositionToList = function(tag)
598
+  {
599
+    var line = getListLine(tag);
600
+    line.addClass('new');
601
+    _list.append(line);
602
+  }
603
+  
604
+  this.hide = function()
605
+  {
606
+    _proposition_list.hide();
607
+  }
608
+  
609
+}
610
+
611
+function Tag(id, name)
612
+{
613
+  /* @var _id int */
614
+  this.id = id;
615
+  /* @var _name string */
616
+  this.name = name;
617
+}
618
+
619
+Tag.prototype =
620
+{
621
+  isKnew: function()
622
+  {
623
+    if (this.id)
624
+    {
625
+      return true;
626
+    }
627
+    return false;
628
+  }
629
+}
630
+
631
+$(document).ready(function(){
632
+  // Ce code permet la fermeture de la propositions de tags lors d'un click sur la page
633
+  $('html').click(function() {
634
+    if ($("div.search_tag_list").is(':visible'))
635
+    {
636
+      $("div.search_tag_list").hide();
637
+    }
638
+  });
639
+  $("div.search_tag_list, div.search_tag_list a.more").live('click', function(event){
640
+    event.stopPropagation();
641
+    $("div.search_tag_list").show();
642
+  });
643
+  
644
+  $('div.search_tag_list a.more').live('click', function(){
645
+    $(this).parents('div.search_tag_list ').find('ul.search_tag_list li').show();
646
+    $(this).hide();
647
+    return false;
648
+  });
649
+  
650
+});
651
+
652
+// loaders

+ 187 - 0
web/js/1ae784e_autoplay_14.js View File

@@ -0,0 +1,187 @@
1
+function Autoplay()
2
+{
3
+  
4
+  var _playlist = new Array();
5
+  var _player = null;
6
+  var _current_index = 0;
7
+  var _link = null;
8
+  var _full_screen = false;
9
+  
10
+  this.start = function(link)
11
+  {
12
+    _link = link;
13
+    open_popin_dialog('autoplay');
14
+    initializePlaylist(this.play);
15
+  }
16
+  
17
+  var initializePlaylist = function(callback)
18
+  {
19
+    JQueryJson(_link.attr('href'), {}, function(response){
20
+      if (response.status == 'success')
21
+      {
22
+        if (response.data.length)
23
+        {
24
+          _playlist = response.data;
25
+        }
26
+      }
27
+      callback(0);
28
+    });
29
+  }
30
+  
31
+  this.play = function(index_to_play, timed)
32
+  {
33
+    window.autoplay.stopAndClearAllPlayers();
34
+    if (array_key_exists(index_to_play, _playlist))
35
+    {
36
+      if (!timed)
37
+      {
38
+        _current_index = index_to_play;
39
+        $('#autoplay_element_loader').show();
40
+        window.setTimeout(function(){
41
+          window.autoplay.play(index_to_play, true);
42
+        });
43
+      }
44
+      else if (_current_index == index_to_play)
45
+      {
46
+        loadAndDisplayInfos(_playlist[index_to_play].element_id);
47
+        if (!createPlayer(_playlist[index_to_play], window.autoplay.playNext))
48
+        {
49
+          this.play(index_to_play+1);
50
+        }
51
+        else
52
+        {
53
+          _current_index = index_to_play;
54
+        }
55
+      }
56
+    }
57
+    else
58
+    {
59
+      window.autoplay.nothingToPlay();
60
+    }
61
+  }
62
+  
63
+  this.stopAndClearAllPlayers = function()
64
+  {
65
+    players = window.players_manager.getAll();
66
+    for (var i in players)
67
+    {
68
+      if (i in players)
69
+      {
70
+        players[i].stopAndDestroy();
71
+        window.players_manager.remove(i);
72
+      }
73
+    }
74
+  }
75
+  
76
+  var loadAndDisplayInfos = function(element_id)
77
+  {
78
+    $('#autoplay_element_loader').show();
79
+    JQueryJson(url_element_dom_get_one_autoplay+'/'+element_id, {}, function(response){
80
+      
81
+      $('#autoplay_element_loader').hide();
82
+      if (response.status == 'success')
83
+      {
84
+        $('li#autoplay_element_container').html(response.data);
85
+        refresh_social_buttons(true);
86
+      }
87
+      else
88
+      {
89
+        $('li#autoplay_element_container').html('');
90
+      }
91
+    });
92
+  }
93
+  
94
+  var createPlayer = function(play_data, finish_callback)
95
+  {
96
+    $('#autoplay_loader').show();
97
+    if ((_player = window.dynamic_player.play(
98
+      $('#autoplay_player'),
99
+      play_data.element_type,
100
+      play_data.element_ref_id,
101
+      play_data.element_id,
102
+      true,
103
+      finish_callback,
104
+      function(player) {
105
+        if (!_player || !_full_screen) {
106
+          return;
107
+        }
108
+        player.enableFullScreen();
109
+      }
110
+    )))
111
+    {
112
+      $('#autoplay_loader').hide();
113
+      window.players_manager.add(_player, 'autoplay_'+play_data.element_id);
114
+      return true;
115
+    }
116
+    else
117
+    {
118
+      return false;
119
+    }
120
+  }
121
+  
122
+  this.playNext = function()
123
+  {
124
+    window.autoplay.play(_current_index+1);
125
+  }
126
+  
127
+  this.playPrevious = function()
128
+  {
129
+    if (array_key_exists(_current_index-1, _playlist))
130
+    {
131
+      window.autoplay.play(_current_index-1);
132
+    }
133
+    return false;
134
+  }
135
+  
136
+  this.nothingToPlay = function()
137
+  {
138
+    this.stopAndClearAllPlayers();
139
+    $('#autoplay_noelements_text').show();
140
+    $('div#autoplay_player_container').html('<div id="autoplay_player"></div>');
141
+    $('li#autoplay_element_container').html('');
142
+    $('#autoplay iframe').hide();
143
+    $('#autoplay img[alt="loader"]').hide();
144
+  }
145
+
146
+  this.setFullScreen = function(status) {
147
+    _full_screen = status;
148
+    if (status) {
149
+      _player.enableFullScreen();
150
+    }
151
+  }
152
+  
153
+}
154
+
155
+$(document).ready(function() {
156
+  
157
+  window.autoplay = new Autoplay();
158
+  
159
+  $('a.autoplay_link').live('click', function(){
160
+    window.autoplay.start($(this));
161
+    $('html, body').animate({ scrollTop: 0 }, 'fast');
162
+    return false;
163
+  });
164
+  
165
+  $('a.autoplay_playlist, a.autoplay_favshow').live('click', function(){
166
+    window.autoplay.start($(this));
167
+    $('html, body').animate({ scrollTop: 0 }, 'fast');
168
+    return false;
169
+  });
170
+  
171
+  $('a#autoplay_previous').click(function(){window.autoplay.playPrevious()});
172
+  
173
+  $('a#autoplay_next').click(function(){window.autoplay.playNext()});
174
+  
175
+  $('a#autoplay_close').click(function(){
176
+    // Fond gris
177
+    $('#fade').fadeOut(1000, function(){$('#fade').remove();});
178
+    // On cache le lecteur
179
+    $('#autoplay').hide();
180
+    window.autoplay.stopAndClearAllPlayers();
181
+  });
182
+
183
+  $('#full_screen_toggle input[name="full_screen_toggle"]').on('change', function(){
184
+    window.autoplay.setFullScreen($(this).is(':checked'));
185
+  });
186
+
187
+});

+ 61 - 0
web/js/1ae784e_jconfirmaction.jquery_7.js View File

@@ -0,0 +1,61 @@
1
+/*
2
+ * jQuery Plugin : jConfirmAction
3
+ * 
4
+ * by Hidayat Sagita, modified by Sevajol Bastien (http://blog.bux.fr/tag/jconfirmaction/)
5
+ * http://www.webstuffshare.com
6
+ * Licensed Under GPL version 2 license.
7
+ *
8
+ */
9
+(function($){
10
+
11
+	jQuery.fn.jConfirmAction = function (options) {
12
+		
13
+		// Some jConfirmAction options (limited to customize language) :
14
+		// question : a text for your question.
15
+		// yesAnswer : a text for Yes answer.
16
+		// cancelAnswer : a text for Cancel/No answer.
17
+		var theOptions = jQuery.extend ({
18
+			question: "Are You Sure ?",
19
+			yesAnswer: "Yes",
20
+			cancelAnswer: "Cancel",
21
+      onYes: function(){},
22
+      onOpen: function(){},
23
+      onClose: function(){},
24
+      justOneAtTime: true
25
+		}, options);
26
+					
27
+			$(this).live('click', function(e) {
28
+
29
+        if (theOptions.justOneAtTime)
30
+        {
31
+          $('div.question').remove();
32
+        }
33
+
34
+        theOptions.onOpen($(this));
35
+
36
+				e.preventDefault();
37
+				
38
+				if($(this).next('.question').length <= 0)
39
+					$(this).after(
40
+            '<div class="question">'+theOptions.question
41
+            +'<br/> <span class="yes">'+theOptions.yesAnswer
42
+            +'</span><span class="cancel">'+theOptions.cancelAnswer
43
+            +'</span></div>'
44
+          );
45
+				
46
+				$(this).next('.question').animate({opacity: 1}, 300);
47
+				
48
+				$(this).next('.question').find('.yes').bind('click', function(){
49
+					theOptions.onYes($(this).parents('div.question').prev('a'));
50
+				});
51
+		
52
+				$(this).next('.question').find('.cancel').bind('click', function(){
53
+					$(this).parents('.question').fadeOut(300, function() {
54
+            theOptions.onClose($(this).parents('div.question').prev('a'));
55
+					});
56
+				});
57
+				
58
+			});
59
+	}
60
+	
61
+})(jQuery);

+ 30 - 0
web/js/1ae784e_jplayer.playlist.min_5.js View File

@@ -0,0 +1,30 @@
1
+/*
2
+ * Playlist Object for the jPlayer Plugin
3
+ * http://www.jplayer.org
4
+ *
5
+ * Copyright (c) 2009 - 2011 Happyworm Ltd
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ *  - http://www.opensource.org/licenses/mit-license.php
8
+ *  - http://www.gnu.org/copyleft/gpl.html
9
+ *
10
+ * Author: Mark J Panaghiston
11
+ * Version: 2.1.0 (jPlayer 2.1.0)
12
+ * Date: 1st September 2011
13
+ */
14
+
15
+(function(b,f){jPlayerPlaylist=function(a,c,d){var e=this;this.current=0;this.removing=this.shuffled=this.loop=!1;this.cssSelector=b.extend({},this._cssSelector,a);this.options=b.extend(!0,{},this._options,d);this.playlist=[];this.original=[];this._initPlaylist(c);this.cssSelector.title=this.cssSelector.cssSelectorAncestor+" .jp-title";this.cssSelector.playlist=this.cssSelector.cssSelectorAncestor+" .jp-playlist";this.cssSelector.next=this.cssSelector.cssSelectorAncestor+" .jp-next";this.cssSelector.previous=
16
+this.cssSelector.cssSelectorAncestor+" .jp-previous";this.cssSelector.shuffle=this.cssSelector.cssSelectorAncestor+" .jp-shuffle";this.cssSelector.shuffleOff=this.cssSelector.cssSelectorAncestor+" .jp-shuffle-off";this.options.cssSelectorAncestor=this.cssSelector.cssSelectorAncestor;this.options.repeat=function(a){e.loop=a.jPlayer.options.loop};b(this.cssSelector.jPlayer).bind(b.jPlayer.event.ready,function(){e._init()});b(this.cssSelector.jPlayer).bind(b.jPlayer.event.ended,function(){e.next()});
17
+b(this.cssSelector.jPlayer).bind(b.jPlayer.event.play,function(){b(this).jPlayer("pauseOthers")});b(this.cssSelector.jPlayer).bind(b.jPlayer.event.resize,function(a){a.jPlayer.options.fullScreen?b(e.cssSelector.title).show():b(e.cssSelector.title).hide()});b(this.cssSelector.previous).click(function(){e.previous();b(this).blur();return!1});b(this.cssSelector.next).click(function(){e.next();b(this).blur();return!1});b(this.cssSelector.shuffle).click(function(){e.shuffle(!0);return!1});b(this.cssSelector.shuffleOff).click(function(){e.shuffle(!1);
18
+return!1}).hide();this.options.fullScreen||b(this.cssSelector.title).hide();b(this.cssSelector.playlist+" ul").empty();this._createItemHandlers();b(this.cssSelector.jPlayer).jPlayer(this.options)};jPlayerPlaylist.prototype={_cssSelector:{jPlayer:"#jquery_jplayer_1",cssSelectorAncestor:"#jp_container_1"},_options:{playlistOptions:{autoPlay:!1,loopOnPrevious:!1,shuffleOnLoop:!0,enableRemoveControls:!1,displayTime:"slow",addTime:"fast",removeTime:"fast",shuffleTime:"slow",itemClass:"jp-playlist-item",
19
+freeGroupClass:"jp-free-media",freeItemClass:"jp-playlist-item-free",removeItemClass:"jp-playlist-item-remove"}},option:function(a,b){if(b===f)return this.options.playlistOptions[a];this.options.playlistOptions[a]=b;switch(a){case "enableRemoveControls":this._updateControls();break;case "itemClass":case "freeGroupClass":case "freeItemClass":case "removeItemClass":this._refresh(!0),this._createItemHandlers()}return this},_init:function(){var a=this;this._refresh(function(){a.options.playlistOptions.autoPlay?
20
+a.play(a.current):a.select(a.current)})},_initPlaylist:function(a){this.current=0;this.removing=this.shuffled=!1;this.original=b.extend(!0,[],a);this._originalPlaylist()},_originalPlaylist:function(){var a=this;this.playlist=[];b.each(this.original,function(b){a.playlist[b]=a.original[b]})},_refresh:function(a){var c=this;if(a&&!b.isFunction(a))b(this.cssSelector.playlist+" ul").empty(),b.each(this.playlist,function(a){b(c.cssSelector.playlist+" ul").append(c._createListItem(c.playlist[a]))}),this._updateControls();
21
+else{var d=b(this.cssSelector.playlist+" ul").children().length?this.options.playlistOptions.displayTime:0;b(this.cssSelector.playlist+" ul").slideUp(d,function(){var d=b(this);b(this).empty();b.each(c.playlist,function(a){d.append(c._createListItem(c.playlist[a]))});c._updateControls();b.isFunction(a)&&a();c.playlist.length?b(this).slideDown(c.options.playlistOptions.displayTime):b(this).show()})}},_createListItem:function(a){var c=this,d="<li><div>";d+="<a href='javascript:;' class='"+this.options.playlistOptions.removeItemClass+
22
+"'>&times;</a>";if(a.free){var e=!0;d+="<span class='"+this.options.playlistOptions.freeGroupClass+"'>(";b.each(a,function(a,f){b.jPlayer.prototype.format[a]&&(e?e=!1:d+=" | ",d+="<a class='"+c.options.playlistOptions.freeItemClass+"' href='"+f+"' tabindex='1'>"+a+"</a>")});d+=")</span>"}d+="<a href='javascript:;' class='"+this.options.playlistOptions.itemClass+"' tabindex='1'>"+a.title+(a.artist?" <span class='jp-artist'>by "+a.artist+"</span>":"")+"</a>";d+="</div></li>";return d},_createItemHandlers:function(){var a=
23
+this;b(this.cssSelector.playlist+" a."+this.options.playlistOptions.itemClass).die("click").live("click",function(){var c=b(this).parent().parent().index();a.current!==c?a.play(c):b(a.cssSelector.jPlayer).jPlayer("play");b(this).blur();return!1});b(a.cssSelector.playlist+" a."+this.options.playlistOptions.freeItemClass).die("click").live("click",function(){b(this).parent().parent().find("."+a.options.playlistOptions.itemClass).click();b(this).blur();return!1});b(a.cssSelector.playlist+" a."+this.options.playlistOptions.removeItemClass).die("click").live("click",
24
+function(){var c=b(this).parent().parent().index();a.remove(c);b(this).blur();return!1})},_updateControls:function(){this.options.playlistOptions.enableRemoveControls?b(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).show():b(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).hide();this.shuffled?(b(this.cssSelector.shuffleOff).show(),b(this.cssSelector.shuffle).hide()):(b(this.cssSelector.shuffleOff).hide(),b(this.cssSelector.shuffle).show())},
25
+_highlight:function(a){this.playlist.length&&a!==f&&(b(this.cssSelector.playlist+" .jp-playlist-current").removeClass("jp-playlist-current"),b(this.cssSelector.playlist+" li:nth-child("+(a+1)+")").addClass("jp-playlist-current").find(".jp-playlist-item").addClass("jp-playlist-current"),b(this.cssSelector.title+" li").html(this.playlist[a].title+(this.playlist[a].artist?" <span class='jp-artist'>by "+this.playlist[a].artist+"</span>":"")))},setPlaylist:function(a){this._initPlaylist(a);this._init()},
26
+add:function(a,c){b(this.cssSelector.playlist+" ul").append(this._createListItem(a)).find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime);this._updateControls();this.original.push(a);this.playlist.push(a);c?this.play(this.playlist.length-1):this.original.length===1&&this.select(0)},remove:function(a){var c=this;if(a===f)return this._initPlaylist([]),this._refresh(function(){b(c.cssSelector.jPlayer).jPlayer("clearMedia")}),!0;else if(this.removing)return!1;else{a=a<0?c.original.length+
27
+a:a;if(0<=a&&a<this.playlist.length)this.removing=!0,b(this.cssSelector.playlist+" li:nth-child("+(a+1)+")").slideUp(this.options.playlistOptions.removeTime,function(){b(this).remove();if(c.shuffled){var d=c.playlist[a];b.each(c.original,function(a){if(c.original[a]===d)return c.original.splice(a,1),!1})}else c.original.splice(a,1);c.playlist.splice(a,1);c.original.length?a===c.current?(c.current=a<c.original.length?c.current:c.original.length-1,c.select(c.current)):a<c.current&&c.current--:(b(c.cssSelector.jPlayer).jPlayer("clearMedia"),
28
+c.current=0,c.shuffled=!1,c._updateControls());c.removing=!1});return!0}},select:function(a){a=a<0?this.original.length+a:a;0<=a&&a<this.playlist.length?(this.current=a,this._highlight(a),b(this.cssSelector.jPlayer).jPlayer("setMedia",this.playlist[this.current])):this.current=0},play:function(a){a=a<0?this.original.length+a:a;0<=a&&a<this.playlist.length?this.playlist.length&&(this.select(a),b(this.cssSelector.jPlayer).jPlayer("play")):a===f&&b(this.cssSelector.jPlayer).jPlayer("play")},pause:function(){b(this.cssSelector.jPlayer).jPlayer("pause")},
29
+next:function(){var a=this.current+1<this.playlist.length?this.current+1:0;this.loop?a===0&&this.shuffled&&this.options.playlistOptions.shuffleOnLoop&&this.playlist.length>1?this.shuffle(!0,!0):this.play(a):a>0&&this.play(a)},previous:function(){var a=this.current-1>=0?this.current-1:this.playlist.length-1;(this.loop&&this.options.playlistOptions.loopOnPrevious||a<this.playlist.length-1)&&this.play(a)},shuffle:function(a,c){var d=this;a===f&&(a=!this.shuffled);(a||a!==this.shuffled)&&b(this.cssSelector.playlist+
30
+" ul").slideUp(this.options.playlistOptions.shuffleTime,function(){(d.shuffled=a)?d.playlist.sort(function(){return 0.5-Math.random()}):d._originalPlaylist();d._refresh(!0);c||!b(d.cssSelector.jPlayer).data("jPlayer").status.paused?d.play(0):d.select(0);b(this).slideDown(d.options.playlistOptions.shuffleTime)})}}})(jQuery);

File diff suppressed because it is too large
+ 2 - 0
web/js/1ae784e_jquery-1.8.2.prod_1.js


File diff suppressed because it is too large
+ 6 - 0
web/js/1ae784e_jquery-ui-1.10.1.custom.min_2.js


+ 980 - 0
web/js/1ae784e_jquery.form-2.14_6.js View File

@@ -0,0 +1,980 @@
1
+/*!
2
+ * jQuery Form Plugin
3
+ * version: 2.94 (13-DEC-2011)
4
+ * @requires jQuery v1.3.2 or later
5
+ *
6
+ * Examples and documentation at: http://malsup.com/jquery/form/
7
+ * Dual licensed under the MIT and GPL licenses:
8
+ *	http://www.opensource.org/licenses/mit-license.php
9
+ *	http://www.gnu.org/licenses/gpl.html
10
+ */
11
+;(function($) {
12
+
13
+/*
14
+	Usage Note:
15
+	-----------
16
+	Do not use both ajaxSubmit and ajaxForm on the same form.  These
17
+	functions are intended to be exclusive.  Use ajaxSubmit if you want
18
+	to bind your own submit handler to the form.  For example,
19
+
20
+	$(document).ready(function() {
21
+		$('#myForm').bind('submit', function(e) {
22
+			e.preventDefault(); // <-- important
23
+			$(this).ajaxSubmit({
24
+				target: '#output'
25
+			});
26
+		});
27
+	});
28
+
29
+	Use ajaxForm when you want the plugin to manage all the event binding
30
+	for you.  For example,
31
+
32
+	$(document).ready(function() {
33
+		$('#myForm').ajaxForm({
34
+			target: '#output'
35
+		});
36
+	});
37
+
38
+	When using ajaxForm, the ajaxSubmit function will be invoked for you
39
+	at the appropriate time.
40
+*/
41
+
42
+/**
43
+ * ajaxSubmit() provides a mechanism for immediately submitting
44
+ * an HTML form using AJAX.
45
+ */
46
+$.fn.ajaxSubmit = function(options) {
47
+	// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
48
+	if (!this.length) {
49
+		log('ajaxSubmit: skipping submit process - no element selected');
50
+		return this;
51
+	}
52
+	
53
+	var method, action, url, $form = this;
54
+
55
+	if (typeof options == 'function') {
56
+		options = { success: options };
57
+	}
58
+
59
+	method = this.attr('method');
60
+	action = this.attr('action');
61
+	url = (typeof action === 'string') ? $.trim(action) : '';
62
+	url = url || window.location.href || '';
63
+	if (url) {
64
+		// clean url (don't include hash vaue)
65
+		url = (url.match(/^([^#]+)/)||[])[1];
66
+	}
67
+
68
+	options = $.extend(true, {
69
+		url:  url,
70
+		success: $.ajaxSettings.success,
71
+		type: method || 'GET',
72
+		iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
73
+	}, options);
74
+
75
+	// hook for manipulating the form data before it is extracted;
76
+	// convenient for use with rich editors like tinyMCE or FCKEditor
77
+	var veto = {};
78
+	this.trigger('form-pre-serialize', [this, options, veto]);
79
+	if (veto.veto) {
80
+		log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
81
+		return this;
82
+	}
83
+
84
+	// provide opportunity to alter form data before it is serialized
85
+	if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
86
+		log('ajaxSubmit: submit aborted via beforeSerialize callback');
87
+		return this;
88
+	}
89
+
90
+	var traditional = options.traditional;
91
+	if ( traditional === undefined ) {
92
+		traditional = $.ajaxSettings.traditional;
93
+	}
94
+	
95
+	var qx,n,v,a = this.formToArray(options.semantic);
96
+	if (options.data) {
97
+		options.extraData = options.data;
98
+		qx = $.param(options.data, traditional);
99
+	}
100
+
101
+	// give pre-submit callback an opportunity to abort the submit
102
+	if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
103
+		log('ajaxSubmit: submit aborted via beforeSubmit callback');
104
+		return this;
105
+	}
106
+
107
+	// fire vetoable 'validate' event
108
+	this.trigger('form-submit-validate', [a, this, options, veto]);
109
+	if (veto.veto) {
110
+		log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
111
+		return this;
112
+	}
113
+
114
+	var q = $.param(a, traditional);
115
+	if (qx) {
116
+		q = ( q ? (q + '&' + qx) : qx );
117
+	}	
118
+	if (options.type.toUpperCase() == 'GET') {
119
+		options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
120
+		options.data = null;  // data is null for 'get'
121
+	}
122
+	else {
123
+		options.data = q; // data is the query string for 'post'
124
+	}
125
+
126
+	var callbacks = [];
127
+	if (options.resetForm) {
128
+		callbacks.push(function() { $form.resetForm(); });
129
+	}
130
+	if (options.clearForm) {
131
+		callbacks.push(function() { $form.clearForm(options.includeHidden); });
132
+	}
133
+
134
+	// perform a load on the target only if dataType is not provided
135
+	if (!options.dataType && options.target) {
136
+		var oldSuccess = options.success || function(){};
137
+		callbacks.push(function(data) {
138
+			var fn = options.replaceTarget ? 'replaceWith' : 'html';
139
+			$(options.target)[fn](data).each(oldSuccess, arguments);
140
+		});
141
+	}
142
+	else if (options.success) {
143
+		callbacks.push(options.success);
144
+	}
145
+
146
+	options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
147
+		var context = options.context || options;	// jQuery 1.4+ supports scope context 
148
+		for (var i=0, max=callbacks.length; i < max; i++) {
149
+			callbacks[i].apply(context, [data, status, xhr || $form, $form]);
150
+		}
151
+	};
152
+
153
+	// are there files to upload?
154
+	var fileInputs = $('input:file:enabled[value]', this); // [value] (issue #113)
155
+	var hasFileInputs = fileInputs.length > 0;
156
+	var mp = 'multipart/form-data';
157
+	var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
158
+
159
+	var fileAPI = !!(hasFileInputs && fileInputs.get(0).files && window.FormData);
160
+	log("fileAPI :" + fileAPI);
161
+	var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI;
162
+
163
+	// options.iframe allows user to force iframe mode
164
+	// 06-NOV-09: now defaulting to iframe mode if file input is detected
165
+	if (options.iframe !== false && (options.iframe || shouldUseFrame)) {
166
+		// hack to fix Safari hang (thanks to Tim Molendijk for this)
167
+		// see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
168
+		if (options.closeKeepAlive) {
169
+			$.get(options.closeKeepAlive, function() {
170
+				fileUploadIframe(a);
171
+			});
172
+		}
173
+  		else {
174
+			fileUploadIframe(a);
175
+  		}
176
+	}
177
+	else if ((hasFileInputs || multipart) && fileAPI) {
178
+		options.progress = options.progress || $.noop;
179
+		fileUploadXhr(a);
180
+	}
181
+	else {
182
+		$.ajax(options);
183
+	}
184
+
185
+	 // fire 'notify' event
186
+	 this.trigger('form-submit-notify', [this, options]);
187
+	 return this;
188
+
189
+	 // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz)
190
+	function fileUploadXhr(a) {
191
+		var formdata = new FormData();
192
+
193
+		for (var i=0; i < a.length; i++) {
194
+			if (a[i].type == 'file')
195
+				continue;
196
+			formdata.append(a[i].name, a[i].value);
197
+		}
198
+
199
+		$form.find('input:file:enabled').each(function(){
200
+			var name = $(this).attr('name'), files = this.files;
201
+			if (name) {
202
+				for (var i=0; i < files.length; i++)
203
+					formdata.append(name, files[i]);
204
+			}
205
+		});
206
+
207
+		if (options.extraData) {
208
+			for (var k in options.extraData)
209
+				formdata.append(k, options.extraData[k])
210
+		}
211
+
212
+		options.data = null;
213
+
214
+		var s = $.extend(true, {}, $.ajaxSettings, options, {
215
+			contentType: false,
216
+			processData: false,
217
+			cache: false,
218
+			type: 'POST'
219
+		});
220
+
221
+      s.context = s.context || s;
222
+
223
+      s.data = null;
224
+      var beforeSend = s.beforeSend;
225
+      s.beforeSend = function(xhr, o) {
226
+          o.data = formdata;
227
+          if(xhr.upload) { // unfortunately, jQuery doesn't expose this prop (http://bugs.jquery.com/ticket/10190)
228
+              xhr.upload.onprogress = function(event) {
229
+                  o.progress(event.position, event.total);
230
+              };
231
+          }
232
+          if(beforeSend)
233
+              beforeSend.call(o, xhr, options);
234
+      };
235
+      $.ajax(s);
236
+   }
237
+
238
+	// private function for handling file uploads (hat tip to YAHOO!)
239
+	function fileUploadIframe(a) {
240
+		var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
241
+		var useProp = !!$.fn.prop;
242
+
243
+		if (a) {
244
+			if ( useProp ) {
245
+				// ensure that every serialized input is still enabled
246
+				for (i=0; i < a.length; i++) {
247
+					el = $(form[a[i].name]);
248
+					el.prop('disabled', false);
249
+				}
250
+			} else {
251
+				for (i=0; i < a.length; i++) {
252
+					el = $(form[a[i].name]);
253
+					el.removeAttr('disabled');
254
+				}
255
+			};
256
+		}
257
+
258
+		if ($(':input[name=submit],:input[id=submit]', form).length) {
259
+			// if there is an input with a name or id of 'submit' then we won't be
260
+			// able to invoke the submit fn on the form (at least not x-browser)
261
+			alert('Error: Form elements must not have name or id of "submit".');
262
+			return;
263
+		}
264
+		
265
+		s = $.extend(true, {}, $.ajaxSettings, options);
266
+		s.context = s.context || s;
267
+		id = 'jqFormIO' + (new Date().getTime());
268
+		if (s.iframeTarget) {
269
+			$io = $(s.iframeTarget);
270
+			n = $io.attr('name');
271
+			if (n == null)
272
+			 	$io.attr('name', id);
273
+			else
274
+				id = n;
275
+		}
276
+		else {
277
+			$io = $('<iframe name="' + id + '" src="'+ s.iframeSrc +'" />');
278
+			$io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
279
+		}
280
+		io = $io[0];
281
+
282
+
283
+		xhr = { // mock object
284
+			aborted: 0,
285
+			responseText: null,
286
+			responseXML: null,
287
+			status: 0,
288
+			statusText: 'n/a',
289
+			getAllResponseHeaders: function() {},
290
+			getResponseHeader: function() {},
291
+			setRequestHeader: function() {},
292
+			abort: function(status) {
293
+				var e = (status === 'timeout' ? 'timeout' : 'aborted');
294
+				log('aborting upload... ' + e);
295
+				this.aborted = 1;
296
+				$io.attr('src', s.iframeSrc); // abort op in progress
297
+				xhr.error = e;
298
+				s.error && s.error.call(s.context, xhr, e, status);
299
+				g && $.event.trigger("ajaxError", [xhr, s, e]);
300
+				s.complete && s.complete.call(s.context, xhr, e);
301
+			}
302
+		};
303
+
304
+		g = s.global;
305
+		// trigger ajax global events so that activity/block indicators work like normal
306
+		if (g && ! $.active++) {
307
+			$.event.trigger("ajaxStart");
308
+		}
309
+		if (g) {
310
+			$.event.trigger("ajaxSend", [xhr, s]);
311
+		}
312
+
313
+		if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
314
+			if (s.global) {
315
+				$.active--;
316
+			}
317
+			return;
318
+		}
319
+		if (xhr.aborted) {
320
+			return;
321
+		}
322
+
323
+		// add submitting element to data if we know it
324
+		sub = form.clk;
325
+		if (sub) {
326
+			n = sub.name;
327
+			if (n && !sub.disabled) {
328
+				s.extraData = s.extraData || {};
329
+				s.extraData[n] = sub.value;
330
+				if (sub.type == "image") {
331
+					s.extraData[n+'.x'] = form.clk_x;
332
+					s.extraData[n+'.y'] = form.clk_y;
333
+				}
334
+			}
335
+		}
336
+		
337
+		var CLIENT_TIMEOUT_ABORT = 1;
338
+		var SERVER_ABORT = 2;
339
+
340
+		function getDoc(frame) {
341
+			var doc = frame.contentWindow ? frame.contentWindow.document : frame.contentDocument ? frame.contentDocument : frame.document;
342
+			return doc;
343
+		}
344
+		
345
+		// Rails CSRF hack (thanks to Yvan Barthelemy)
346
+		var csrf_token = $('meta[name=csrf-token]').attr('content');
347
+		var csrf_param = $('meta[name=csrf-param]').attr('content');
348
+		if (csrf_param && csrf_token) {
349
+			s.extraData = s.extraData || {};
350
+			s.extraData[csrf_param] = csrf_token;
351
+		}
352
+
353
+		// take a breath so that pending repaints get some cpu time before the upload starts
354
+		function doSubmit() {
355
+			// make sure form attrs are set
356
+			var t = $form.attr('target'), a = $form.attr('action');
357
+
358
+			// update form attrs in IE friendly way
359
+			form.setAttribute('target',id);
360
+			if (!method) {
361
+				form.setAttribute('method', 'POST');
362
+			}
363
+			if (a != s.url) {
364
+				form.setAttribute('action', s.url);
365
+			}
366
+
367
+			// ie borks in some cases when setting encoding
368
+			if (! s.skipEncodingOverride && (!method || /post/i.test(method))) {
369
+				$form.attr({
370
+					encoding: 'multipart/form-data',
371
+					enctype:  'multipart/form-data'
372
+				});
373
+			}
374
+
375
+			// support timout
376
+			if (s.timeout) {
377
+				timeoutHandle = setTimeout(function() { timedOut = true; cb(CLIENT_TIMEOUT_ABORT); }, s.timeout);
378
+			}
379
+			
380
+			// look for server aborts
381
+			function checkState() {
382
+				try {
383
+					var state = getDoc(io).readyState;
384
+					log('state = ' + state);
385
+					if (state.toLowerCase() == 'uninitialized')
386
+						setTimeout(checkState,50);
387
+				}
388
+				catch(e) {
389
+					log('Server abort: ' , e, ' (', e.name, ')');
390
+					cb(SERVER_ABORT);
391
+					timeoutHandle && clearTimeout(timeoutHandle);
392
+					timeoutHandle = undefined;
393
+				}
394
+			}
395
+
396
+			// add "extra" data to form if provided in options
397
+			var extraInputs = [];
398
+			try {
399
+				if (s.extraData) {
400
+					for (var n in s.extraData) {
401
+						extraInputs.push(
402
+							$('<input type="hidden" name="'+n+'">').attr('value',s.extraData[n])
403
+								.appendTo(form)[0]);
404
+					}
405
+				}
406
+
407
+				if (!s.iframeTarget) {
408
+					// add iframe to doc and submit the form
409
+					$io.appendTo('body');
410
+					io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
411
+				}
412
+				setTimeout(checkState,15);
413
+				form.submit();
414
+			}
415
+			finally {
416
+				// reset attrs and remove "extra" input elements
417
+				form.setAttribute('action',a);
418
+				if(t) {
419
+					form.setAttribute('target', t);
420
+				} else {
421
+					$form.removeAttr('target');
422
+				}
423
+				$(extraInputs).remove();
424
+			}
425
+		}
426
+
427
+		if (s.forceSync) {
428
+			doSubmit();
429
+		}
430
+		else {
431
+			setTimeout(doSubmit, 10); // this lets dom updates render
432
+		}
433
+
434
+		var data, doc, domCheckCount = 50, callbackProcessed;
435
+
436
+		function cb(e) {
437
+			if (xhr.aborted || callbackProcessed) {
438
+				return;
439
+			}
440
+			try {
441
+				doc = getDoc(io);
442
+			}
443
+			catch(ex) {
444
+				log('cannot access response document: ', ex);
445
+				e = SERVER_ABORT;
446
+			}
447
+			if (e === CLIENT_TIMEOUT_ABORT && xhr) {
448
+				xhr.abort('timeout');
449
+				return;
450
+			}
451
+			else if (e == SERVER_ABORT && xhr) {
452
+				xhr.abort('server abort');
453
+				return;
454
+			}
455
+
456
+			if (!doc || doc.location.href == s.iframeSrc) {
457
+				// response not received yet
458
+				if (!timedOut)
459
+					return;
460
+			}
461
+			io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
462
+
463
+			var status = 'success', errMsg;
464
+			try {
465
+				if (timedOut) {
466
+					throw 'timeout';
467
+				}
468
+
469
+				var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
470
+				log('isXml='+isXml);
471
+				if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) {
472
+					if (--domCheckCount) {
473
+						// in some browsers (Opera) the iframe DOM is not always traversable when
474
+						// the onload callback fires, so we loop a bit to accommodate
475
+						log('requeing onLoad callback, DOM not available');
476
+						setTimeout(cb, 250);
477
+						return;
478
+					}
479
+					// let this fall through because server response could be an empty document
480
+					//log('Could not access iframe DOM after mutiple tries.');
481
+					//throw 'DOMException: not available';
482
+				}
483
+
484
+				//log('response detected');
485
+				var docRoot = doc.body ? doc.body : doc.documentElement;
486
+				xhr.responseText = docRoot ? docRoot.innerHTML : null;
487
+				xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
488
+				if (isXml)
489
+					s.dataType = 'xml';
490
+				xhr.getResponseHeader = function(header){
491
+					var headers = {'content-type': s.dataType};
492
+					return headers[header];
493
+				};
494
+				// support for XHR 'status' & 'statusText' emulation :
495
+				if (docRoot) {
496
+					xhr.status = Number( docRoot.getAttribute('status') ) || xhr.status;
497
+					xhr.statusText = docRoot.getAttribute('statusText') || xhr.statusText;
498
+				}
499
+
500
+				var dt = (s.dataType || '').toLowerCase();
501
+				var scr = /(json|script|text)/.test(dt);
502
+				if (scr || s.textarea) {
503
+					// see if user embedded response in textarea
504
+					var ta = doc.getElementsByTagName('textarea')[0];
505
+					if (ta) {
506
+						xhr.responseText = ta.value;
507
+						// support for XHR 'status' & 'statusText' emulation :
508
+						xhr.status = Number( ta.getAttribute('status') ) || xhr.status;
509
+						xhr.statusText = ta.getAttribute('statusText') || xhr.statusText;
510
+					}
511
+					else if (scr) {
512
+						// account for browsers injecting pre around json response
513
+						var pre = doc.getElementsByTagName('pre')[0];
514
+						var b = doc.getElementsByTagName('body')[0];
515
+						if (pre) {
516
+							xhr.responseText = pre.textContent ? pre.textContent : pre.innerText;
517
+						}
518
+						else if (b) {
519
+							xhr.responseText = b.textContent ? b.textContent : b.innerText;
520
+						}
521
+					}
522
+				}
523
+				else if (dt == 'xml' && !xhr.responseXML && xhr.responseText != null) {
524
+					xhr.responseXML = toXml(xhr.responseText);
525
+				}
526
+
527
+				try {
528
+					data = httpData(xhr, dt, s);
529
+				}
530
+				catch (e) {
531
+					status = 'parsererror';
532
+					xhr.error = errMsg = (e || status);
533
+				}
534
+			}
535
+			catch (e) {
536
+				log('error caught: ',e);
537
+				status = 'error';
538
+				xhr.error = errMsg = (e || status);
539
+			}
540
+
541
+			if (xhr.aborted) {
542
+				log('upload aborted');
543
+				status = null;
544
+			}
545
+
546
+			if (xhr.status) { // we've set xhr.status
547
+				status = (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) ? 'success' : 'error';
548
+			}
549
+
550
+			// ordering of these callbacks/triggers is odd, but that's how $.ajax does it
551
+			if (status === 'success') {
552
+				s.success && s.success.call(s.context, data, 'success', xhr);
553
+				g && $.event.trigger("ajaxSuccess", [xhr, s]);
554
+			}
555
+			else if (status) {
556
+				if (errMsg == undefined)
557
+					errMsg = xhr.statusText;
558
+				s.error && s.error.call(s.context, xhr, status, errMsg);
559
+				g && $.event.trigger("ajaxError", [xhr, s, errMsg]);
560
+			}
561
+
562
+			g && $.event.trigger("ajaxComplete", [xhr, s]);
563
+
564
+			if (g && ! --$.active) {
565
+				$.event.trigger("ajaxStop");
566
+			}
567
+
568
+			s.complete && s.complete.call(s.context, xhr, status);
569
+
570
+			callbackProcessed = true;
571
+			if (s.timeout)
572
+				clearTimeout(timeoutHandle);
573
+
574
+			// clean up
575
+			setTimeout(function() {
576
+				if (!s.iframeTarget)
577
+					$io.remove();
578
+				xhr.responseXML = null;
579
+			}, 100);
580
+		}
581
+
582
+		var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
583
+			if (window.ActiveXObject) {
584
+				doc = new ActiveXObject('Microsoft.XMLDOM');
585
+				doc.async = 'false';
586
+				doc.loadXML(s);
587
+			}
588
+			else {
589
+				doc = (new DOMParser()).parseFromString(s, 'text/xml');
590
+			}
591
+			return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
592
+		};
593
+		var parseJSON = $.parseJSON || function(s) {
594
+			return window['eval']('(' + s + ')');
595
+		};
596
+
597
+		var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
598
+
599
+			var ct = xhr.getResponseHeader('content-type') || '',
600
+				xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
601
+				data = xml ? xhr.responseXML : xhr.responseText;
602
+
603
+			if (xml && data.documentElement.nodeName === 'parsererror') {
604
+				$.error && $.error('parsererror');
605
+			}
606
+			if (s && s.dataFilter) {
607
+				data = s.dataFilter(data, type);
608
+			}
609
+			if (typeof data === 'string') {
610
+				if (type === 'json' || !type && ct.indexOf('json') >= 0) {
611
+					data = parseJSON(data);
612
+				} else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
613
+					$.globalEval(data);
614
+				}
615
+			}
616
+			return data;
617
+		};
618
+	}
619
+};
620
+
621
+/**
622
+ * ajaxForm() provides a mechanism for fully automating form submission.
623
+ *
624
+ * The advantages of using this method instead of ajaxSubmit() are:
625
+ *
626
+ * 1: This method will include coordinates for <input type="image" /> elements (if the element
627
+ *	is used to submit the form).
628
+ * 2. This method will include the submit element's name/value data (for the element that was
629
+ *	used to submit the form).
630
+ * 3. This method binds the submit() method to the form for you.
631
+ *
632
+ * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
633
+ * passes the options argument along after properly binding events for submit elements and
634
+ * the form itself.
635
+ */
636
+$.fn.ajaxForm = function(options) {
637
+	// in jQuery 1.3+ we can fix mistakes with the ready state
638
+	if (this.length === 0) {
639
+		var o = { s: this.selector, c: this.context };
640
+		if (!$.isReady && o.s) {
641
+			log('DOM not ready, queuing ajaxForm');
642
+			$(function() {
643
+				$(o.s,o.c).ajaxForm(options);
644
+			});
645
+			return this;
646
+		}
647
+		// is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
648
+		log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
649
+		return this;
650
+	}
651
+
652
+	return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) {
653
+		if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
654
+			e.preventDefault();
655
+			$(this).ajaxSubmit(options);
656
+		}
657
+	}).bind('click.form-plugin', function(e) {
658
+		var target = e.target;
659
+		var $el = $(target);
660
+		if (!($el.is(":submit,input:image"))) {
661
+			// is this a child element of the submit el?  (ex: a span within a button)
662
+			var t = $el.closest(':submit');
663
+			if (t.length == 0) {
664
+				return;
665
+			}
666
+			target = t[0];
667
+		}
668
+		var form = this;
669
+		form.clk = target;
670
+		if (target.type == 'image') {
671
+			if (e.offsetX != undefined) {
672
+				form.clk_x = e.offsetX;
673
+				form.clk_y = e.offsetY;
674
+			} else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
675
+				var offset = $el.offset();
676
+				form.clk_x = e.pageX - offset.left;
677
+				form.clk_y = e.pageY - offset.top;
678
+			} else {
679
+				form.clk_x = e.pageX - target.offsetLeft;
680
+				form.clk_y = e.pageY - target.offsetTop;
681
+			}
682
+		}
683
+		// clear form vars
684
+		setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
685
+	});
686
+};
687
+
688
+// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
689
+$.fn.ajaxFormUnbind = function() {
690
+	return this.unbind('submit.form-plugin click.form-plugin');
691
+};
692
+
693
+/**
694
+ * formToArray() gathers form element data into an array of objects that can
695
+ * be passed to any of the following ajax functions: $.get, $.post, or load.
696
+ * Each object in the array has both a 'name' and 'value' property.  An example of
697
+ * an array for a simple login form might be:
698
+ *
699
+ * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
700
+ *
701
+ * It is this array that is passed to pre-submit callback functions provided to the
702
+ * ajaxSubmit() and ajaxForm() methods.
703
+ */
704
+$.fn.formToArray = function(semantic) {
705
+	var a = [];
706
+	if (this.length === 0) {
707
+		return a;
708
+	}
709
+
710
+	var form = this[0];
711
+	var els = semantic ? form.getElementsByTagName('*') : form.elements;
712
+	if (!els) {
713
+		return a;
714
+	}
715
+
716
+	var i,j,n,v,el,max,jmax;
717
+	for(i=0, max=els.length; i < max; i++) {
718
+		el = els[i];
719
+		n = el.name;
720
+		if (!n) {
721
+			continue;
722
+		}
723
+
724
+		if (semantic && form.clk && el.type == "image") {
725
+			// handle image inputs on the fly when semantic == true
726
+			if(!el.disabled && form.clk == el) {
727
+				a.push({name: n, value: $(el).val(), type: el.type });
728
+				a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
729
+			}
730
+			continue;
731
+		}
732
+
733
+		v = $.fieldValue(el, true);
734
+		if (v && v.constructor == Array) {
735
+			for(j=0, jmax=v.length; j < jmax; j++) {
736
+				a.push({name: n, value: v[j]});
737
+			}
738
+		}
739
+		else if (v !== null && typeof v != 'undefined') {
740
+			a.push({name: n, value: v, type: el.type});
741
+		}
742
+	}
743
+
744
+	if (!semantic && form.clk) {
745
+		// input type=='image' are not found in elements array! handle it here
746
+		var $input = $(form.clk), input = $input[0];
747
+		n = input.name;
748
+		if (n && !input.disabled && input.type == 'image') {
749
+			a.push({name: n, value: $input.val()});
750
+			a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
751
+		}
752
+	}
753
+	return a;
754
+};
755
+
756
+/**
757
+ * Serializes form data into a 'submittable' string. This method will return a string
758
+ * in the format: name1=value1&amp;name2=value2
759
+ */
760
+$.fn.formSerialize = function(semantic) {
761
+	//hand off to jQuery.param for proper encoding
762
+	return $.param(this.formToArray(semantic));
763
+};
764
+
765
+/**
766
+ * Serializes all field elements in the jQuery object into a query string.
767
+ * This method will return a string in the format: name1=value1&amp;name2=value2
768
+ */
769
+$.fn.fieldSerialize = function(successful) {
770
+	var a = [];
771
+	this.each(function() {
772
+		var n = this.name;
773
+		if (!n) {
774
+			return;
775
+		}
776
+		var v = $.fieldValue(this, successful);
777
+		if (v && v.constructor == Array) {
778
+			for (var i=0,max=v.length; i < max; i++) {
779
+				a.push({name: n, value: v[i]});
780
+			}
781
+		}
782
+		else if (v !== null && typeof v != 'undefined') {
783
+			a.push({name: this.name, value: v});
784
+		}
785
+	});
786
+	//hand off to jQuery.param for proper encoding
787
+	return $.param(a);
788
+};
789
+
790
+/**
791
+ * Returns the value(s) of the element in the matched set.  For example, consider the following form:
792
+ *
793
+ *  <form><fieldset>
794
+ *	  <input name="A" type="text" />
795
+ *	  <input name="A" type="text" />
796
+ *	  <input name="B" type="checkbox" value="B1" />
797
+ *	  <input name="B" type="checkbox" value="B2"/>
798
+ *	  <input name="C" type="radio" value="C1" />
799
+ *	  <input name="C" type="radio" value="C2" />
800
+ *  </fieldset></form>
801
+ *
802
+ *  var v = $(':text').fieldValue();
803
+ *  // if no values are entered into the text inputs
804
+ *  v == ['','']
805
+ *  // if values entered into the text inputs are 'foo' and 'bar'
806
+ *  v == ['foo','bar']
807
+ *
808
+ *  var v = $(':checkbox').fieldValue();
809
+ *  // if neither checkbox is checked
810
+ *  v === undefined
811
+ *  // if both checkboxes are checked
812
+ *  v == ['B1', 'B2']
813
+ *
814
+ *  var v = $(':radio').fieldValue();
815
+ *  // if neither radio is checked
816
+ *  v === undefined
817
+ *  // if first radio is checked
818
+ *  v == ['C1']
819
+ *
820
+ * The successful argument controls whether or not the field element must be 'successful'
821
+ * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
822
+ * The default value of the successful argument is true.  If this value is false the value(s)
823
+ * for each element is returned.
824
+ *
825
+ * Note: This method *always* returns an array.  If no valid value can be determined the
826
+ *	array will be empty, otherwise it will contain one or more values.
827
+ */
828
+$.fn.fieldValue = function(successful) {
829
+	for (var val=[], i=0, max=this.length; i < max; i++) {
830
+		var el = this[i];
831
+		var v = $.fieldValue(el, successful);
832
+		if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
833
+			continue;
834
+		}
835
+		v.constructor == Array ? $.merge(val, v) : val.push(v);
836
+	}
837
+	return val;
838
+};
839
+
840
+/**
841
+ * Returns the value of the field element.
842
+ */
843
+$.fieldValue = function(el, successful) {
844
+	var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
845
+	if (successful === undefined) {
846
+		successful = true;
847
+	}
848
+
849
+	if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
850
+		(t == 'checkbox' || t == 'radio') && !el.checked ||
851
+		(t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
852
+		tag == 'select' && el.selectedIndex == -1)) {
853
+			return null;
854
+	}
855
+
856
+	if (tag == 'select') {
857
+		var index = el.selectedIndex;
858
+		if (index < 0) {
859
+			return null;
860
+		}
861
+		var a = [], ops = el.options;
862
+		var one = (t == 'select-one');
863
+		var max = (one ? index+1 : ops.length);
864
+		for(var i=(one ? index : 0); i < max; i++) {
865
+			var op = ops[i];
866
+			if (op.selected) {
867
+				var v = op.value;
868
+				if (!v) { // extra pain for IE...
869
+					v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
870
+				}
871
+				if (one) {
872
+					return v;
873
+				}
874
+				a.push(v);
875
+			}
876
+		}
877
+		return a;
878
+	}
879
+	return $(el).val();
880
+};
881
+
882
+/**
883
+ * Clears the form data.  Takes the following actions on the form's input fields:
884
+ *  - input text fields will have their 'value' property set to the empty string
885
+ *  - select elements will have their 'selectedIndex' property set to -1
886
+ *  - checkbox and radio inputs will have their 'checked' property set to false
887
+ *  - inputs of type submit, button, reset, and hidden will *not* be effected
888
+ *  - button elements will *not* be effected
889
+ */
890
+$.fn.clearForm = function(includeHidden) {
891
+	return this.each(function() {
892
+		$('input,select,textarea', this).clearFields(includeHidden);
893
+	});
894
+};
895
+
896
+/**
897
+ * Clears the selected form elements.
898
+ */
899
+$.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
900
+	var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; // 'hidden' is not in this list
901
+	return this.each(function() {
902
+		var t = this.type, tag = this.tagName.toLowerCase();
903
+		if (re.test(t) || tag == 'textarea' || (includeHidden && /hidden/.test(t)) ) {
904
+			this.value = '';
905
+		}
906
+		else if (t == 'checkbox' || t == 'radio') {
907
+			this.checked = false;
908
+		}
909
+		else if (tag == 'select') {
910
+			this.selectedIndex = -1;
911
+		}
912
+	});
913
+};
914
+
915
+/**
916
+ * Resets the form data.  Causes all form elements to be reset to their original value.
917
+ */
918
+$.fn.resetForm = function() {
919
+	return this.each(function() {
920
+		// guard against an input with the name of 'reset'
921
+		// note that IE reports the reset function as an 'object'
922
+		if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
923
+			this.reset();
924
+		}
925
+	});
926
+};
927
+
928
+/**
929
+ * Enables or disables any matching elements.
930
+ */
931
+$.fn.enable = function(b) {
932
+	if (b === undefined) {
933
+		b = true;
934
+	}
935
+	return this.each(function() {
936
+		this.disabled = !b;
937
+	});
938
+};
939
+
940
+/**
941
+ * Checks/unchecks any matching checkboxes or radio buttons and
942
+ * selects/deselects and matching option elements.
943
+ */
944
+$.fn.selected = function(select) {
945
+	if (select === undefined) {
946
+		select = true;
947
+	}
948
+	return this.each(function() {
949
+		var t = this.type;
950
+		if (t == 'checkbox' || t == 'radio') {
951
+			this.checked = select;
952
+		}
953
+		else if (this.tagName.toLowerCase() == 'option') {
954
+			var $sel = $(this).parent('select');
955
+			if (select && $sel[0] && $sel[0].type == 'select-one') {
956
+				// deselect all other options
957
+				$sel.find('option').selected(false);
958
+			}
959
+			this.selected = select;
960
+		}
961
+	});
962
+};
963
+
964
+// expose debug var
965
+$.fn.ajaxSubmit.debug = false;
966
+
967
+// helper fn for console logging
968
+function log() {
969
+	if (!$.fn.ajaxSubmit.debug) 
970
+		return;
971
+	var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
972
+	if (window.console && window.console.log) {
973
+		window.console.log(msg);
974
+	}
975
+	else if (window.opera && window.opera.postError) {
976
+		window.opera.postError(msg);
977
+	}
978
+};
979
+
980
+})(jQuery);

+ 97 - 0
web/js/1ae784e_jquery.jplayer.min_4.js View File

@@ -0,0 +1,97 @@
1
+/*
2
+ * jPlayer Plugin for jQuery JavaScript Library
3
+ * http://www.jplayer.org
4
+ *
5
+ * Copyright (c) 2009 - 2012 Happyworm Ltd
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ *  - http://www.opensource.org/licenses/mit-license.php
8
+ *  - http://www.gnu.org/copyleft/gpl.html
9
+ *
10
+ * Author: Mark J Panaghiston
11
+ * Version: 2.2.0
12
+ * Date: 13th September 2012
13
+ */
14
+
15
+(function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this,a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b.data(this,"jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b.data(this,"jPlayer");c?c.option(a||{}):b.data(this,"jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element=
16
+b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent="ready flashreset resize repeat error warning";b.jPlayer.event={ready:"jPlayer_ready",flashreset:"jPlayer_flashreset",resize:"jPlayer_resize",repeat:"jPlayer_repeat",
17
+click:"jPlayer_click",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",
18
+timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough ratechange".split(" ");b.jPlayer.pause=function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,
19
+sepHour:":",sepMin:":",sepSec:""};b.jPlayer.convertTime=function(a){var c=new Date(1E3*a),d=c.getUTCHours(),a=c.getUTCMinutes(),c=c.getUTCSeconds(),d=b.jPlayer.timeFormat.padHour&&10>d?"0"+d:d,a=b.jPlayer.timeFormat.padMin&&10>a?"0"+a:a,c=b.jPlayer.timeFormat.padSec&&10>c?"0"+c:c;return(b.jPlayer.timeFormat.showHour?d+b.jPlayer.timeFormat.sepHour:"")+(b.jPlayer.timeFormat.showMin?a+b.jPlayer.timeFormat.sepMin:"")+(b.jPlayer.timeFormat.showSec?c+b.jPlayer.timeFormat.sepSec:"")};b.jPlayer.uaBrowser=
20
+function(a){var a=a.toLowerCase(),c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/,a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),d=/(android)/,e=/(mobile)/,a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(b)||[],b=/(ipad|playbook)/.exec(b)||!e.exec(b)&&d.exec(b)||[];a[1]&&(a[1]=a[1].replace(/\s/g,
21
+"_"));return{platform:a[1]||"",tablet:b[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var i=b.jPlayer.uaBrowser(navigator.userAgent);i.browser&&(b.jPlayer.browser[i.browser]=!0,b.jPlayer.browser.version=i.version);i=b.jPlayer.uaPlatform(navigator.userAgent);i.platform&&(b.jPlayer.platform[i.platform]=!0,b.jPlayer.platform.mobile=!i.tablet,b.jPlayer.platform.tablet=!!i.tablet);b.jPlayer.prototype={count:0,version:{script:"2.2.0",needFlash:"2.2.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",
22
+supplied:"mp3",preload:"metadata",volume:0.8,muted:!1,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",currentTime:".jp-current-time",duration:".jp-duration",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",
23
+repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},fullScreen:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1E3},loop:!1,repeat:function(a){a.jPlayer.options.loop?b(this).unbind(".jPlayerRepeat").bind(b.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){b(this).jPlayer("play")}):b(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullScreen:{msie:/msie [0-6]/,ipad:/ipad.*?os [0-4]/,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3](?!.*?mobile)/,
24
+android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/,playbook:/playbook/},verticalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},
25
+optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,flash:!0},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:!0,
26
+media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},
27
+ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=b.extend({},this.status);this.internal=b.extend({},this.internal);this.internal.domNode=this.element.get(0);this.formats=[];this.solutions=[];this.require=
28
+{};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);b.each(this.options.supplied.toLowerCase().split(","),function(c,d){var e=d.replace(/^\s+|\s+$/g,"");if(a.format[e]){var f=false;b.each(a.formats,function(a,b){if(e===b){f=true;return false}});f||a.formats.push(e)}});b.each(this.options.solution.toLowerCase().split(","),function(c,d){var e=
29
+d.replace(/^\s+|\s+$/g,"");if(a.solution[e]){var f=false;b.each(a.solutions,function(a,b){if(e===b){f=true;return false}});f||a.solutions.push(e)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=b.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=b.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:f});this.internal.video=
30
+b.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:f});this.internal.flash=b.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:f,swf:this.options.swfPath+(this.options.swfPath.toLowerCase().slice(-4)!==".swf"?(this.options.swfPath&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf":"")});this.internal.poster=b.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:f});b.each(b.jPlayer.event,function(b,c){if(a.options[b]!==f){a.element.bind(c+".jPlayer",a.options[b]);
31
+a.options[b]=f}});this.require.audio=false;this.require.video=false;b.each(this.formats,function(b,c){a.require[a.format[c].media]=true});this.options=this.require.video?b.extend(true,{},this.optionsVideo,this.options):b.extend(true,{},this.optionsAudio,this.options);this._setSize();this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullScreen=this._uaBlocklist(this.options.noFullScreen);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._restrictNativeVideoControls();
32
+this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){(!a.status.video||a.status.waitForPlay)&&a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=b("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.internal.poster.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)});
33
+this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)}this.flash.available=
34
+this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};b.each(this.formats,function(b,c){a.html.canPlay[c]=a.html[a.format[c].media].available&&""!==a.htmlElement[a.format[c].media].canPlayType(a.format[c].codec);a.flash.canPlay[c]=a.format[c].flashCanPlay&&a.flash.available});this.html.desired=false;this.flash.desired=false;b.each(this.solutions,function(c,d){if(c===0)a[d].desired=true;else{var e=false,f=false;b.each(a.formats,function(b,c){a[a.solutions[0]].canPlay[c]&&(a.format[c].media===
35
+"video"?f=true:e=true)});a[d].desired=a.require.audio&&!e||a.require.video&&!f}});this.html.support={};this.flash.support={};b.each(this.formats,function(b,c){a.html.support[c]=a.html.canPlay[c]&&a.html.desired;a.flash.support[c]=a.flash.canPlay[c]&&a.flash.desired});this.html.used=false;this.flash.used=false;b.each(this.solutions,function(c,d){b.each(a.formats,function(b,c){if(a[d].support[c]){a[d].used=true;return false}})});this._resetActive();this._resetGate();this._cssSelectorAncestor(this.options.cssSelectorAncestor);
36
+if(!this.html.used&&!this.flash.used){this._error({type:b.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SOLUTION,hint:b.jPlayer.errorHint.NO_SOLUTION});this.css.jq.noSolution.length&&this.css.jq.noSolution.show()}else this.css.jq.noSolution.length&&this.css.jq.noSolution.hide();if(this.flash.used){var c,d="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+
37
+"&muted="+this.options.muted;if(b.jPlayer.browser.msie&&Number(b.jPlayer.browser.version)<=8){d=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+d+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];c=document.createElement('<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0"></object>');
38
+for(var e=0;e<d.length;e++)c.appendChild(document.createElement(d[e]))}else{e=function(a,b,c){var d=document.createElement("param");d.setAttribute("name",b);d.setAttribute("value",c);a.appendChild(d)};c=document.createElement("object");c.setAttribute("id",this.internal.flash.id);c.setAttribute("data",this.internal.flash.swf);c.setAttribute("type","application/x-shockwave-flash");c.setAttribute("width","1");c.setAttribute("height","1");e(c,"flashvars",d);e(c,"allowscriptaccess","always");e(c,"bgcolor",
39
+this.options.backgroundColor);e(c,"wmode",this.options.wmode)}this.element.append(c);this.internal.flash.jq=b(c)}if(this.html.used){if(this.html.audio.available){this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio);this.element.append(this.htmlElement.audio);this.internal.audio.jq=b("#"+this.internal.audio.id)}if(this.html.video.available){this._addHtmlEventListeners(this.htmlElement.video,this.html.video);this.element.append(this.htmlElement.video);this.internal.video.jq=b("#"+this.internal.video.id);
40
+this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):this.internal.video.jq.css({width:"0px",height:"0px"});this.internal.video.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)})}}this.options.emulateHtml&&this._emulateHtmlBridge();this.html.used&&!this.flash.used&&setTimeout(function(){a.internal.ready=true;a.version.flash="n/a";a._trigger(b.jPlayer.event.repeat);a._trigger(b.jPlayer.event.ready)},100);this._updateNativeVideoControls();
41
+this._updateInterface();this._updateButtons(false);this._updateAutohide();this._updateVolume(this.options.volume);this._updateMute(this.options.muted);this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();b.jPlayer.prototype.count++},destroy:function(){this.clearMedia();this._removeUiClass();this.css.jq.currentTime.length&&this.css.jq.currentTime.text("");this.css.jq.duration.length&&this.css.jq.duration.text("");b.each(this.css.jq,function(a,b){b.length&&b.unbind(".jPlayer")});this.internal.poster.jq.unbind(".jPlayer");
42
+this.internal.video.jq&&this.internal.video.jq.unbind(".jPlayer");this.options.emulateHtml&&this._destroyHtmlBridge();this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();delete this.instances[this.internal.instance]},enable:function(){},disable:function(){},_testCanPlayType:function(a){try{a.canPlayType(this.format.mp3.codec);return true}catch(b){return false}},_uaBlocklist:function(a){var c=navigator.userAgent.toLowerCase(),d=false;b.each(a,function(a,b){if(b&&
43
+b.test(c)){d=true;return false}});return d},_restrictNativeVideoControls:function(){if(this.require.audio&&this.status.nativeVideoControls){this.status.nativeVideoControls=false;this.status.noFullScreen=true}},_updateNativeVideoControls:function(){if(this.html.video.available&&this.html.used){this.htmlElement.video.controls=this.status.nativeVideoControls;this._updateAutohide();if(this.status.nativeVideoControls&&this.require.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,
44
+height:this.status.height})}else if(this.status.waitForPlay&&this.status.video){this.internal.poster.jq.show();this.internal.video.jq.css({width:"0px",height:"0px"})}}},_addHtmlEventListeners:function(a,c){var d=this;a.preload=this.options.preload;a.muted=this.options.muted;a.volume=this.options.volume;a.addEventListener("progress",function(){if(c.gate){d._getHtmlStatus(a);d._updateInterface();d._trigger(b.jPlayer.event.progress)}},false);a.addEventListener("timeupdate",function(){if(c.gate){d._getHtmlStatus(a);
45
+d._updateInterface();d._trigger(b.jPlayer.event.timeupdate)}},false);a.addEventListener("durationchange",function(){if(c.gate){d._getHtmlStatus(a);d._updateInterface();d._trigger(b.jPlayer.event.durationchange)}},false);a.addEventListener("play",function(){if(c.gate){d._updateButtons(true);d._html_checkWaitForPlay();d._trigger(b.jPlayer.event.play)}},false);a.addEventListener("playing",function(){if(c.gate){d._updateButtons(true);d._seeked();d._trigger(b.jPlayer.event.playing)}},false);a.addEventListener("pause",
46
+function(){if(c.gate){d._updateButtons(false);d._trigger(b.jPlayer.event.pause)}},false);a.addEventListener("waiting",function(){if(c.gate){d._seeking();d._trigger(b.jPlayer.event.waiting)}},false);a.addEventListener("seeking",function(){if(c.gate){d._seeking();d._trigger(b.jPlayer.event.seeking)}},false);a.addEventListener("seeked",function(){if(c.gate){d._seeked();d._trigger(b.jPlayer.event.seeked)}},false);a.addEventListener("volumechange",function(){if(c.gate){d.options.volume=a.volume;d.options.muted=
47
+a.muted;d._updateMute();d._updateVolume();d._trigger(b.jPlayer.event.volumechange)}},false);a.addEventListener("suspend",function(){if(c.gate){d._seeked();d._trigger(b.jPlayer.event.suspend)}},false);a.addEventListener("ended",function(){if(c.gate){if(!b.jPlayer.browser.webkit)d.htmlElement.media.currentTime=0;d.htmlElement.media.pause();d._updateButtons(false);d._getHtmlStatus(a,true);d._updateInterface();d._trigger(b.jPlayer.event.ended)}},false);a.addEventListener("error",function(){if(c.gate){d._updateButtons(false);
48
+d._seeked();if(d.status.srcSet){clearTimeout(d.internal.htmlDlyCmdId);d.status.waitForLoad=true;d.status.waitForPlay=true;d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"});d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show();d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show();d._error({type:b.jPlayer.error.URL,context:d.status.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL})}}},false);b.each(b.jPlayer.htmlEvent,
49
+function(e,g){a.addEventListener(this,function(){c.gate&&d._trigger(b.jPlayer.event[g])},false)})},_getHtmlStatus:function(a,b){var d=0,e=0,g=0,f=0;if(isFinite(a.duration))this.status.duration=a.duration;d=a.currentTime;e=this.status.duration>0?100*d/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){g=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;f=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0}else{g=
50
+100;f=e}if(b)e=f=d=0;this.status.seekPercent=g;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=e;this.status.currentTime=d;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate=a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=b.extend({},this.status,b.jPlayer.prototype.status)},_trigger:function(a,c,d){a=b.Event(a);a.jPlayer={};a.jPlayer.version=b.extend({},this.version);a.jPlayer.options=b.extend(true,
51
+{},this.options);a.jPlayer.status=b.extend(true,{},this.status);a.jPlayer.html=b.extend(true,{},this.html);a.jPlayer.flash=b.extend(true,{},this.flash);if(c)a.jPlayer.error=b.extend({},c);if(d)a.jPlayer.warning=b.extend({},d);this.element.trigger(a)},jPlayerFlashEvent:function(a,c){if(a===b.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);d>0&&(e?this.pause(d):this.play(d))}this._trigger(b.jPlayer.event.flashreset)}}else{this.internal.ready=
52
+true;this.internal.flash.jq.css({width:"0px",height:"0px"});this.version.flash=c.version;this.version.needFlash!==this.version.flash&&this._error({type:b.jPlayer.error.VERSION,context:this.version.flash,message:b.jPlayer.errorMsg.VERSION+this.version.flash,hint:b.jPlayer.errorHint.VERSION});this._trigger(b.jPlayer.event.repeat);this._trigger(a)}if(this.flash.gate)switch(a){case b.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.timeupdate:this._getFlashStatus(c);
53
+this._updateInterface();this._trigger(a);break;case b.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(a);break;case b.jPlayer.event.pause:this._updateButtons(false);this._trigger(a);break;case b.jPlayer.event.ended:this._updateButtons(false);this._trigger(a);break;case b.jPlayer.event.click:this._trigger(a);break;case b.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&
54
+this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._updateButtons(false);this._error({type:b.jPlayer.error.URL,context:c.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL});break;case b.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case b.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case b.jPlayer.event.ready:break;
55
+default:this._trigger(a)}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=false},_updateButtons:function(a){if(a!==f){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide();
56
+this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}}if(this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length)if(this.status.noFullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.hide()}else if(this.options.fullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.show()}else{this.css.jq.fullScreen.show();this.css.jq.restoreScreen.hide()}if(this.css.jq.repeat.length&&this.css.jq.repeatOff.length)if(this.options.loop){this.css.jq.repeat.hide();
57
+this.css.jq.repeatOff.show()}else{this.css.jq.repeat.show();this.css.jq.repeatOff.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(b.jPlayer.convertTime(this.status.currentTime));this.css.jq.duration.length&&this.css.jq.duration.text(b.jPlayer.convertTime(this.status.duration))},
58
+_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},_resetGate:function(){this.html.audio.gate=false;this.html.video.gate=false;this.flash.gate=false},_resetActive:function(){this.html.active=false;this.flash.active=false},setMedia:function(a){var c=this,d=false,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();b.each(this.formats,
59
+function(e,f){var i=c.format[f].media==="video";b.each(c.solutions,function(b,e){if(c[e].support[f]&&c._validString(a[f])){var g=e==="html";if(i){if(g){c.html.video.gate=true;c._html_setVideo(a);c.html.active=true}else{c.flash.gate=true;c._flash_setVideo(a);c.flash.active=true}c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show();c.status.video=true}else{if(g){c.html.audio.gate=true;c._html_setAudio(a);c.html.active=true}else{c.flash.gate=true;c._flash_setAudio(a);c.flash.active=true}c.css.jq.videoPlay.length&&
60
+c.css.jq.videoPlay.hide();c.status.video=false}d=true;return false}});if(d)return false});if(d){if((!this.status.nativeVideoControls||!this.html.video.gate)&&this._validString(a.poster))e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show();this.status.srcSet=true;this.status.media=b.extend({},a);this._updateButtons(false);this._updateInterface()}else this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,
61
+hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(false);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia();this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?
62
+this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a):this._urlNotSetError("play")},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},pauseOthers:function(){var a=
63
+this;b.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.options.muted=a;this.html.used&&this._html_mute(a);
64
+this.flash.used&&this._flash_mute(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateMute(a);this._updateVolume(this.options.volume);this._trigger(b.jPlayer.event.volumechange)}},mute:function(a){a=a===f?true:!!a;this._muted(a)},unmute:function(a){a=a===f?true:!!a;this._muted(!a)},_updateMute:function(a){if(a===f)a=this.options.muted;if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(this.status.noVolume){this.css.jq.mute.hide();this.css.jq.unmute.hide()}else if(a){this.css.jq.mute.hide();
65
+this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateVolume(a);this._trigger(b.jPlayer.event.volumechange)}},volumeBar:function(a){if(this.css.jq.volumeBar.length){var b=this.css.jq.volumeBar.offset(),d=a.pageX-b.left,e=this.css.jq.volumeBar.width(),a=this.css.jq.volumeBar.height()-
66
+a.pageY+b.top,b=this.css.jq.volumeBar.height();this.options.verticalVolume?this.volume(a/b):this.volume(d/e)}this.options.muted&&this._muted(false)},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){if(a===f)a=this.options.volume;a=this.options.muted?0:a;if(this.status.noVolume){this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide();this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide();this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()}else{this.css.jq.volumeBar.length&&
67
+this.css.jq.volumeBar.show();if(this.css.jq.volumeBarValue.length){this.css.jq.volumeBarValue.show();this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](a*100+"%")}this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show()}},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(false)},_cssSelectorAncestor:function(a){var c=this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&this.ancestorJq.length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,
68
+context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)})},_cssSelector:function(a,c){var d=this;if(typeof c==="string")if(b.jPlayer.prototype.options.cssSelector[a]){this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer");this.options.cssSelector[a]=c;this.css.cs[a]=this.options.cssSelectorAncestor+
69
+" "+c;this.css.jq[a]=c?b(this.css.cs[a]):[];this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(c){d[a](c);b(this).blur();return false});c&&this.css.jq[a].length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,
70
+hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset(),a=a.pageX-b.left,b=this.css.jq.seekBar.width();this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},repeat:function(){this._loop(true)},repeatOff:function(){this._loop(false)},_loop:function(a){if(this.options.loop!==
71
+a){this.options.loop=a;this._updateButtons();this._trigger(b.jPlayer.event.repeat)}},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(a,c){var d=a;if(arguments.length===0)return b.extend(true,{},this.options);if(typeof a==="string"){var e=a.split(".");if(c===f){for(var d=b.extend(true,{},this.options),g=0;g<e.length;g++)if(d[e[g]]!==f)d=d[e[g]];else{this._warning({type:b.jPlayer.warning.OPTION_KEY,context:a,message:b.jPlayer.warningMsg.OPTION_KEY,
72
+hint:b.jPlayer.warningHint.OPTION_KEY});return f}return d}for(var g=d={},h=0;h<e.length;h++)if(h<e.length-1){g[e[h]]={};g=g[e[h]]}else g[e[h]]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,c){var d=this;switch(a){case "volume":this.volume(c);break;case "muted":this._muted(c);break;case "cssSelectorAncestor":this._cssSelectorAncestor(c);break;case "cssSelector":b.each(c,function(a,b){d._cssSelector(a,
73
+b)});break;case "fullScreen":if(this.options[a]!==c){this._removeUiClass();this.options[a]=c;this._refreshSize()}break;case "size":!this.options.fullScreen&&this.options[a].cssClass!==c.cssClass&&this._removeUiClass();this.options[a]=b.extend({},this.options[a],c);this._refreshSize();break;case "sizeFull":this.options.fullScreen&&this.options[a].cssClass!==c.cssClass&&this._removeUiClass();this.options[a]=b.extend({},this.options[a],c);this._refreshSize();break;case "autohide":this.options[a]=b.extend({},
74
+this.options[a],c);this._updateAutohide();break;case "loop":this._loop(c);break;case "nativeVideoControls":this.options[a]=b.extend({},this.options[a],c);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this._restrictNativeVideoControls();this._updateNativeVideoControls();break;case "noFullScreen":this.options[a]=b.extend({},this.options[a],c);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullScreen=this._uaBlocklist(this.options.noFullScreen);
75
+this._restrictNativeVideoControls();this._updateButtons();break;case "noVolume":this.options[a]=b.extend({},this.options[a],c);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._updateVolume();this._updateMute();break;case "emulateHtml":if(this.options[a]!==c)(this.options[a]=c)?this._emulateHtmlBridge():this._destroyHtmlBridge()}return this},_refreshSize:function(){this._setSize();this._addUiClass();this._updateSize();this._updateButtons();this._updateAutohide();this._trigger(b.jPlayer.event.resize)},
76
+_setSize:function(){if(this.options.fullScreen){this.status.width=this.options.sizeFull.width;this.status.height=this.options.sizeFull.height;this.status.cssClass=this.options.sizeFull.cssClass}else{this.status.width=this.options.size.width;this.status.height=this.options.size.height;this.status.cssClass=this.options.size.cssClass}this.element.css({width:this.status.width,height:this.status.height})},_addUiClass:function(){this.ancestorJq.length&&this.ancestorJq.addClass(this.status.cssClass)},_removeUiClass:function(){this.ancestorJq.length&&
77
+this.ancestorJq.removeClass(this.status.cssClass)},_updateSize:function(){this.internal.poster.jq.css({width:this.status.width,height:this.status.height});!this.status.waitForPlay&&this.html.active&&this.status.video||this.html.video.available&&this.html.used&&this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):!this.status.waitForPlay&&(this.flash.active&&this.status.video)&&this.internal.flash.jq.css({width:this.status.width,height:this.status.height})},
78
+_updateAutohide:function(){var a=this,b=function(){a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId);a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},a.options.autohide.hold)})};if(this.css.jq.gui.length){this.css.jq.gui.stop(true,true);clearTimeout(this.internal.autohideId);this.element.unbind(".jPlayerAutohide");this.css.jq.gui.unbind(".jPlayerAutohide");if(this.status.nativeVideoControls)this.css.jq.gui.hide();
79
+else if(this.options.fullScreen&&this.options.autohide.full||!this.options.fullScreen&&this.options.autohide.restored){this.element.bind("mousemove.jPlayer.jPlayerAutohide",b);this.css.jq.gui.bind("mousemove.jPlayer.jPlayerAutohide",b);this.css.jq.gui.hide()}else this.css.jq.gui.show()}},fullScreen:function(){this._setOption("fullScreen",true)},restoreScreen:function(){this._setOption("fullScreen",false)},_html_initMedia:function(){this.htmlElement.media.src=this.status.src;this.options.preload!==
80
+"none"&&this._html_load();this._trigger(b.jPlayer.event.timeupdate)},_html_setAudio:function(a){var c=this;b.each(this.formats,function(b,e){if(c.html.support[e]&&a[e]){c.status.src=a[e];c.status.format[e]=true;c.status.formatType=e;return false}});this.htmlElement.media=this.htmlElement.audio;this._html_initMedia()},_html_setVideo:function(a){var c=this;b.each(this.formats,function(b,e){if(c.html.support[e]&&a[e]){c.status.src=a[e];c.status.format[e]=true;c.status.formatType=e;return false}});if(this.status.nativeVideoControls)this.htmlElement.video.poster=
81
+this._validString(a.poster)?a.poster:"";this.htmlElement.media=this.htmlElement.video;this._html_initMedia()},_html_resetMedia:function(){if(this.htmlElement.media){this.htmlElement.media.id===this.internal.video.id&&!this.status.nativeVideoControls&&this.internal.video.jq.css({width:"0px",height:"0px"});this.htmlElement.media.pause()}},_html_clearMedia:function(){if(this.htmlElement.media){this.htmlElement.media.src="";this.htmlElement.media.load()}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=
82
+false;this.htmlElement.media.load()}clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this;this._html_load();this.htmlElement.media.play();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},100);return}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this;a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime=
83
+a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime=
84
+a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume=
85
+a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4a":case "fla":c._getMovie().fl_setAudio_m4a(a[d]);break;case "mp3":c._getMovie().fl_setAudio_mp3(a[d]);break;case "rtmpa":c._getMovie().fl_setAudio_rtmp(a[d])}c.status.src=
86
+a[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4v":case "flv":c._getMovie().fl_setVideo_m4v(a[d]);break;case "rtmpv":c._getMovie().fl_setVideo_rtmp(a[d])}c.status.src=a[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload===
87
+"auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=
88
+false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();
89
+this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(e){}else if(navigator.plugins&&navigator.mimeTypes.length>
90
+0)(d=navigator.plugins["Shockwave Flash"])&&navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a&&(b=true);return b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return a<b?b:a>d?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c],
91
+context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n\n"+a.message:"")+(a.hint?
92
+"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=true;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=false});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate();
93
+var b=document.createEvent("Event");b.initEvent(c,false,true);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+" "+b.jPlayer.emulateOptions).split(/\s+/g),
94
+function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",
95
+NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",
96
+NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",
97
+CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery);

+ 7 - 0
web/js/1ae784e_jquery.scrollTo.min_8.js View File

@@ -0,0 +1,7 @@
1
+/**
2
+ * Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
3
+ * Dual licensed under MIT and GPL.
4
+ * @author Ariel Flesler
5
+ * @version 1.4.5 BETA
6
+ */
7
+;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

+ 129 - 0
web/js/1ae784e_jquery.sticky_10.js View File

@@ -0,0 +1,129 @@
1
+// Sticky Plugin v1.0.0 for jQuery
2
+// =============
3
+// Author: Anthony Garand
4
+// Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk)
5
+// Improvements by Leonardo C. Daronco (daronco)
6
+// Created: 2/14/2011
7
+// Date: 2/12/2012
8
+// Website: http://labs.anthonygarand.com/sticky
9
+// Description: Makes an element on the page stick on the screen as you scroll
10
+//       It will only set the 'top' and 'position' of your element, you
11
+//       might need to adjust the width in some cases.
12
+
13
+(function($) {
14
+  var defaults = {
15
+      topSpacing: 0,
16
+      bottomSpacing: 0,
17
+      className: 'is-sticky',
18
+      wrapperClassName: 'sticky-wrapper',
19
+      center: false,
20
+      getWidthFrom: ''
21
+    },
22
+    $window = $(window),
23
+    $document = $(document),
24
+    sticked = [],
25
+    windowHeight = $window.height(),
26
+    scroller = function() {
27
+      var scrollTop = $window.scrollTop(),
28
+        documentHeight = $document.height(),
29
+        dwh = documentHeight - windowHeight,
30
+        extra = (scrollTop > dwh) ? dwh - scrollTop : 0;
31
+
32
+      for (var i = 0; i < sticked.length; i++) {
33
+        var s = sticked[i],
34
+          elementTop = s.stickyWrapper.offset().top,
35
+          etse = elementTop - s.topSpacing - extra;
36
+
37
+        if (scrollTop <= etse) {
38
+          if (s.currentTop !== null) {
39
+            s.stickyElement
40
+              .css('position', '')
41
+              .css('top', '');
42
+            s.stickyElement.parent().removeClass(s.className);
43
+            s.currentTop = null;
44
+          }
45
+        }
46
+        else {
47
+          var newTop = documentHeight - s.stickyElement.outerHeight()
48
+            - s.topSpacing - s.bottomSpacing - scrollTop - extra;
49
+          if (newTop < 0) {
50
+            newTop = newTop + s.topSpacing;
51
+          } else {
52
+            newTop = s.topSpacing;
53
+          }
54
+          if (s.currentTop != newTop) {
55
+            s.stickyElement
56
+              .css('position', 'fixed')
57
+              .css('top', newTop);
58
+
59
+            if (typeof s.getWidthFrom !== 'undefined') {
60
+              s.stickyElement.css('width', $(s.getWidthFrom).width());
61
+            }
62
+
63
+            s.stickyElement.parent().addClass(s.className);
64
+            s.currentTop = newTop;
65
+          }
66
+        }
67
+      }
68
+    },
69
+    resizer = function() {
70
+      windowHeight = $window.height();
71
+    },
72
+    methods = {
73
+      init: function(options) {
74
+        var o = $.extend(defaults, options);
75
+        return this.each(function() {
76
+          var stickyElement = $(this);
77
+
78
+          var stickyId = stickyElement.attr('id');
79
+          var wrapper = $('<div></div>')
80
+            .attr('id', stickyId + '-sticky-wrapper')
81
+            .addClass(o.wrapperClassName);
82
+          stickyElement.wrapAll(wrapper);
83
+
84
+          if (o.center) {
85
+            stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"});
86
+          }
87
+
88
+          if (stickyElement.css("float") == "right") {
89
+            stickyElement.css({"float":"none"}).parent().css({"float":"right"});
90
+          }
91
+
92
+          var stickyWrapper = stickyElement.parent();
93
+          stickyWrapper.css('height', stickyElement.outerHeight());
94
+          sticked.push({
95
+            topSpacing: o.topSpacing,
96
+            bottomSpacing: o.bottomSpacing,
97
+            stickyElement: stickyElement,
98
+            currentTop: null,
99
+            stickyWrapper: stickyWrapper,
100
+            className: o.className,
101
+            getWidthFrom: o.getWidthFrom
102
+          });
103
+        });
104
+      },
105
+      update: scroller
106
+    };
107
+
108
+  // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer):
109
+  if (window.addEventListener) {
110
+    window.addEventListener('scroll', scroller, false);
111
+    window.addEventListener('resize', resizer, false);
112
+  } else if (window.attachEvent) {
113
+    window.attachEvent('onscroll', scroller);
114
+    window.attachEvent('onresize', resizer);
115
+  }
116
+
117
+  $.fn.sticky = function(method) {
118
+    if (methods[method]) {
119
+      return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
120
+    } else if (typeof method === 'object' || !method ) {
121
+      return methods.init.apply( this, arguments );
122
+    } else {
123
+      $.error('Method ' + method + ' does not exist on jQuery.sticky');
124
+    }
125
+  };
126
+  $(function() {
127
+    setTimeout(scroller, 0);
128
+  });
129
+})(jQuery);

+ 153 - 0
web/js/1ae784e_jquery.stickysidebar_9.js View File

@@ -0,0 +1,153 @@
1
+/*jslint browser:true */
2
+/*global jQuery*/
3
+
4
+(function ($, window, undefined) {
5
+    'use strict';
6
+
7
+    var pluginName = 'stickySidebar',
8
+        document = window.document,
9
+        defaults = {
10
+            sidebar: '.sidebar',
11
+            content: '.content',
12
+            tolerance: -25
13
+        },
14
+        clearPosition = {
15
+            position: '',
16
+            top: ''
17
+        };
18
+
19
+    function Plugin(element, options) {
20
+        this.options = $.extend({}, defaults, options);
21
+
22
+        this.defaults = defaults;
23
+        this.name = pluginName;
24
+
25
+        this.root = $(element);
26
+
27
+        this.init();
28
+    }
29
+
30
+    Plugin.prototype.init = function () {
31
+        var self = this;
32
+
33
+        this.sidebar = this.root.find(this.options.sidebar);
34
+        this.content = this.root.find(this.options.content);
35
+        this.lastScrollTop = 0;
36
+
37
+        if (this.canBeSticky() === true) {
38
+            $(window).bind('scroll.sticky_sidebar', function () {
39
+                self.setScrollDirection()
40
+                    .setBoundaries()
41
+                    .positionSidebar();
42
+            });
43
+        }
44
+    };
45
+
46
+    Plugin.prototype.canBeSticky = function () {
47
+        return this.sidebar.height() < this.content.height() &&
48
+               this.sidebar.height() > $(window).height();
49
+    };
50
+
51
+    Plugin.prototype.setBoundaries = function () {
52
+        var contentTop = this.content.offset().top,
53
+            contentHeight = this.content.outerHeight();
54
+        this.boundaries = {
55
+            contentTop: contentTop,
56
+            contentBottom: contentTop + contentHeight,
57
+            contentHeight: contentHeight,
58
+            sidebarHeight: this.sidebar.outerHeight(),
59
+            windowHeight: $(window).height()
60
+        };
61
+        return this;
62
+    };
63
+
64
+    Plugin.prototype.positionSidebar = function () {
65
+        if (this.lastScrollTop > this.boundaries.contentTop &&
66
+                this.lastScrollTop < this.boundaries.contentBottom) {
67
+            this[this.scrollDirection === 'DOWN' ? 'scrollDown' : 'scrollUp']();
68
+        } else if (this.lastScrollTop < this.boundaries.contentTop) {
69
+            this.sidebar.css('top', '').removeClass('top-fixed');
70
+        }
71
+        return this;
72
+    };
73
+
74
+    Plugin.prototype.scrollDown = function () {
75
+        var windowScroll = this.lastScrollTop + this.boundaries.windowHeight,
76
+            sidebarOffsetTop;
77
+        if (this.sidebar.hasClass('scrolling-up')) {
78
+            this.sidebar.removeClass('scrolling-up')
79
+                .addClass('scrolling-down');
80
+        } else if (this.sidebar.hasClass('top-fixed')) {
81
+            sidebarOffsetTop = this.sidebar.offset().top - this.boundaries.contentTop;
82
+            this.sidebar.removeClass('top-fixed')
83
+                .css({
84
+                    position: 'absolute',
85
+                    top: sidebarOffsetTop
86
+                })
87
+                .addClass('scrolling-down');
88
+        }
89
+        if (this.sidebar.hasClass('scrolling-down')) {
90
+            if (windowScroll > this.sidebar.offset().top + this.boundaries.sidebarHeight) {
91
+                this.sidebar.css(clearPosition)
92
+                            .addClass('bottom-fixed')
93
+                            .removeClass('scrolling-down');
94
+            }
95
+        } else {
96
+            if (windowScroll > this.boundaries.contentBottom) {
97
+                this.sidebar.removeClass('bottom-fixed').css({
98
+                    position: 'absolute',
99
+                    top: this.boundaries.contentHeight - this.boundaries.sidebarHeight
100
+                });
101
+            } else if (windowScroll + this.options.tolerance >
102
+                       this.boundaries.sidebarHeight + this.boundaries.contentTop) {
103
+                this.sidebar.css(clearPosition)
104
+                            .removeClass('top-fixed')
105
+                            .addClass('bottom-fixed');
106
+            }
107
+        }
108
+    };
109
+
110
+    Plugin.prototype.scrollUp = function () {
111
+        if (this.sidebar.hasClass('scrolling-down')) {
112
+            this.sidebar.removeClass('scrolling-down')
113
+                        .addClass('scrolling-up');
114
+        } else if (this.sidebar.hasClass('bottom-fixed')) {
115
+            this.sidebar.css({
116
+                position: 'absolute',
117
+                top: this.sidebar.offset().top - this.boundaries.contentTop
118
+            }).removeClass('bottom-fixed').addClass('scrolling-up');
119
+        }
120
+        if (this.sidebar.hasClass('scrolling-up')) {
121
+            if (this.lastScrollTop < this.sidebar.offset().top) {
122
+                this.sidebar.css(clearPosition)
123
+                            .addClass('top-fixed')
124
+                            .removeClass('scrolling-up');
125
+            }
126
+        } else {
127
+            if (this.lastScrollTop < this.boundaries.contentTop) {
128
+                this.sidebar.css('position', '').removeClass('top-fixed');
129
+            } else if (this.lastScrollTop - this.options.tolerance <
130
+                       this.boundaries.contentBottom - this.boundaries.sidebarHeight) {
131
+                this.sidebar.css(clearPosition)
132
+                            .removeClass('bottom-fixed')
133
+                            .addClass('top-fixed');
134
+            }
135
+        }
136
+    };
137
+
138
+    Plugin.prototype.setScrollDirection = function () {
139
+        var scrollTop = $(window).scrollTop();
140
+        this.scrollDirection = (scrollTop > this.lastScrollTop ? 'DOWN' : 'UP');
141
+        this.lastScrollTop = scrollTop;
142
+        return this;
143
+    };
144
+
145
+    $.fn[pluginName] = function (options) {
146
+        return this.each(function () {
147
+            if (!$.data(this, 'plugin_' + pluginName)) {
148
+                $.data(this, 'plugin_' + pluginName, new Plugin(this, options));
149
+            }
150
+        });
151
+    };
152
+
153
+}(jQuery, window));

File diff suppressed because it is too large
+ 3614 - 0
web/js/1ae784e_muzich_15.js


+ 25 - 0
web/js/1ae784e_part_12_GenericPlayer_1.js View File

@@ -0,0 +1,25 @@
1
+function GenericPlayer(ref_id, object_for_player)
2
+{
3
+  var _ref_id = ref_id;
4
+  var _object_for_player = object_for_player;
5
+  
6
+  this.play = function()
7
+  {
8
+    JQueryJson(url_get_embed_for_element+'/'+_ref_id, {}, function(response){
9
+      if (response.status == 'success')
10
+      {
11
+        object_for_player.html(response.data);
12
+      }
13
+    });
14
+  }
15
+  
16
+  this.stop = function()
17
+  {
18
+    _object_for_player.html('');
19
+  }
20
+  
21
+  this.close = function()
22
+  {
23
+    this.stop();
24
+  }
25
+}

+ 146 - 0
web/js/1ae784e_part_12_GenericStreamingPlayer_2.js View File

@@ -0,0 +1,146 @@
1
+function GenericStreamingPlayer(ref_id, object_for_player,
2
+  callback_event_play,
3
+  callback_event_end,
4
+  callback_event_error,
5
+  callback_event_finish_playlist
6
+)
7
+{
8
+  var _ref_id = ref_id;
9
+  var _object_for_player = object_for_player;
10
+  var _playlist = new Array();
11
+  var _player = null;
12
+  var _player_dom = null;
13
+  
14
+  var _callback_event_play = callback_event_play;
15
+  var _callback_event_end = callback_event_end;
16
+  var _callback_event_error = callback_event_error;
17
+  var _callback_event_finish_playlist = callback_event_finish_playlist;
18
+  
19
+  var _current_index = 0;
20
+  
21
+  this.create_player = function(play_callback)
22
+  {
23
+    var jplayer_player  = $('#jquery_jplayer_1').clone();
24
+    var jplayer_content = $('#jp_container_1').clone();
25
+
26
+    var event_play_callback = function(event) {
27
+      event_play(event);
28
+      play_callback();
29
+    };
30
+
31
+    jplayer_player.attr ('id', 'jplayer_player_element_'+ref_id);
32
+    jplayer_content.attr('id', 'jplayer_content_element_'+ref_id);
33
+    
34
+    _object_for_player.html('');
35
+    _object_for_player.append(jplayer_player);
36
+    _object_for_player.append(jplayer_content);
37
+    
38
+    JQueryJson(url_element_get_stream_data+'/'+ref_id, {}, function(response){
39
+      if (response.status == 'success')
40
+      {
41
+        if (response.data)
42
+        {
43
+          for(var i = 0; i < response.data.length; i++)
44
+          {
45
+            var song = new GenericSong(response.data[i].name, response.data[i].url);
46
+            _playlist[i] = song;
47
+          }
48
+          
49
+          _player = new jPlayerPlaylist
50
+          (
51
+            {
52
+              jPlayer: '#jplayer_player_element_'+ref_id,
53
+              cssSelectorAncestor: '#jplayer_content_element_'+ref_id
54
+            },
55
+            _playlist,
56
+            {
57
+              playlistOptions:
58
+              {
59
+                autoPlay: true,
60
+                enableRemoveControls: true
61
+              },
62
+              swfPath: "/jplayer/js",
63
+              supplied: "mp3",
64
+              wmode: "window"
65
+            }
66
+          );
67
+          
68
+          var _player_dom = $('#jplayer_player_element_'+ref_id);
69
+          _player_dom.bind($.jPlayer.event.play, event_play_callback);
70
+          _player_dom.bind($.jPlayer.event.ended, event_end);
71
+          _player_dom.bind($.jPlayer.event.error, event_error);
72
+        }
73
+        else
74
+        {
75
+          _callback_event_finish_playlist();
76
+        }
77
+      }
78
+      else
79
+      {
80
+        _callback_event_finish_playlist();
81
+      }
82
+    });
83
+  }
84
+  
85
+  var event_play = function(event)
86
+  {
87
+    _current_index = _player.current;
88
+  
89
+    _callback_event_play(event);
90
+  }
91
+  
92
+  var event_end = function(event)
93
+  {
94
+    _callback_event_end(event);
95
+    if (_current_index+1 == _playlist.length)
96
+    {
97
+      event_finish_playlist(event);
98
+    }
99
+  }
100
+  
101
+  var event_error = function(event)
102
+  {
103
+    _callback_event_error(event);
104
+  }
105
+  
106
+  var event_finish_playlist = function(event)
107
+  {
108
+    _callback_event_finish_playlist(event);
109
+  }
110
+  
111
+  this.play = function(play_callback)
112
+  {
113
+    _player_dom.jPlayer("play");
114
+    play_callback();
115
+  }
116
+  
117
+  this.stop = function()
118
+  {
119
+    //_player_dom.jPlayer("stop");
120
+  }
121
+  
122
+  this.pause = function()
123
+  {
124
+    _player_dom.jPlayer("pause");
125
+  }
126
+  
127
+  this.destroy = function()
128
+  {
129
+    _object_for_player.html('');
130
+  }
131
+
132
+  this.enableFullScreen = function() {
133
+
134
+  }
135
+
136
+  this.disableFullScreen = function() {
137
+
138
+  }
139
+
140
+}
141
+
142
+function GenericSong(title, mp3)
143
+{
144
+  this.title = title;
145
+  this.mp3   = mp3;
146
+}

+ 71 - 0
web/js/1ae784e_part_12_JamendoPlayer_3.js View File

@@ -0,0 +1,71 @@
1
+function JamendoPlayer(ref_id, object_for_player, finish_callback)
2
+{
3
+  var _ref_id = ref_id;
4
+  var _object_for_player = object_for_player;
5
+  var _player = null;
6
+  var _finish_callback = finish_callback;
7
+  
8
+  this.play = function(play_callback)
9
+  {
10
+    _player = new GenericStreamingPlayer(_ref_id, _object_for_player,
11
+      event_play,
12
+      event_end,
13
+      event_error,
14
+      event_finish_playlist);
15
+    _player.create_player(play_callback);
16
+  }
17
+  
18
+  var event_play = function()
19
+  {
20
+    
21
+  }
22
+  
23
+  var event_end = function()
24
+  {
25
+    
26
+  }
27
+  
28
+  var event_error = function()
29
+  {
30
+    _finish_callback();
31
+  }
32
+  
33
+  var event_finish_playlist = function()
34
+  {
35
+    _finish_callback();
36
+  }
37
+  
38
+  this.stop = function()
39
+  {
40
+    _player.stop();
41
+  }
42
+  
43
+  this.pause = function()
44
+  {
45
+    _player.pause();
46
+  }
47
+  
48
+  this.destroy = function()
49
+  {
50
+     _player.destroy();
51
+  }
52
+  
53
+  this.stopAndDestroy = function()
54
+  {
55
+    this.stop();
56
+    this.destroy();
57
+  }
58
+  
59
+  this.close = function()
60
+  {
61
+    this.stopAndDestroy();
62
+  }
63
+
64
+  this.enableFullScreen = function() {
65
+
66
+  }
67
+
68
+  this.disableFullScreen = function() {
69
+
70
+  }
71
+}

+ 138 - 0
web/js/1ae784e_part_12_SoundCloudPlayer_4.js View File

@@ -0,0 +1,138 @@
1
+function SoundCloudPlayer(ref_id, object_for_player, finish_callback, autoplay)
2
+{
3
+  autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
4
+  var _autoplay = autoplay;
5
+  var _iframe_id = '';
6
+  
7
+  if (typeof(ref_id) == 'string')
8
+  {
9
+    var _ref_id = ref_id.replace('http://', 'https://');
10
+  }
11
+  else
12
+  {
13
+    var _ref_id = ref_id
14
+  }
15
+  
16
+  var _object_for_player = object_for_player;
17
+  var _player = null;
18
+  var _sounds_count = 0;
19
+  var _current_sound_index = 0;
20
+  var _finish_callback = finish_callback;
21
+  
22
+  this.play = function(play_callback)
23
+  {
24
+
25
+    var event_play_callback = function() {
26
+      event_play();
27
+      play_callback();
28
+    }
29
+
30
+    createPlayer(
31
+      event_ready,
32
+      event_play_callback,
33
+      event_finish
34
+    );
35
+  }
36
+  
37
+  var createPlayer = function(callback_ready, callback_play, callback_finish)
38
+  {
39
+    _iframe_id = 'soundcloud_player_'+new Date().getTime();
40
+    if (!_autoplay)
41
+    {
42
+      _object_for_player.html('<iframe id="'+_iframe_id+'" src="https://w.soundcloud.com/player/?url='
43
+            +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
44
+            +'height="350" scrolling="no" frameborder="no"></iframe>');
45
+    }
46
+    else
47
+    {
48
+      $('#autoplay_player_soundcloud').append('<iframe id="'+_iframe_id+'" src="https://w.soundcloud.com/player/?url='
49
+        +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
50
+        +'height="350" scrolling="no" frameborder="no"></iframe>');
51
+    }
52
+    
53
+    SC.initialize({
54
+      client_id: '39946ea18e3d78d64c0ac95a025794e1'
55
+    });
56
+    SC.get(_ref_id, function(track, error)
57
+    {
58
+      if (!error)
59
+      {
60
+        _player = SC.Widget(document.getElementById(_iframe_id));
61
+        _player.bind(SC.Widget.Events.READY, callback_ready);
62
+        _player.bind(SC.Widget.Events.PLAY, callback_play);
63
+        _player.bind(SC.Widget.Events.FINISH, callback_finish);
64
+      }
65
+      else
66
+      {
67
+        _finish_callback();
68
+      }
69
+    });
70
+    
71
+  }
72
+  
73
+  var event_ready = function()
74
+  {
75
+    _player.getSounds(function(value){
76
+      _sounds_count = value.length;
77
+    });
78
+  }
79
+  
80
+  var event_play = function()
81
+  {
82
+    _player.getSounds(function(value){
83
+      _sounds_count = value.length;
84
+    });
85
+    _player.getCurrentSoundIndex(function(value){
86
+      _current_sound_index = value;
87
+    });
88
+  }
89
+  
90
+  var event_finish = function()
91
+  {
92
+    if (_sounds_count == _current_sound_index+1)
93
+    {
94
+      event_finish_playlist();
95
+    }
96
+  }
97
+  
98
+  var event_finish_playlist = function()
99
+  {
100
+    _finish_callback();
101
+  }
102
+  
103
+  this.stop = function()
104
+  {
105
+    
106
+  }
107
+  
108
+  this.destroy = function(force)
109
+  {
110
+    if (_player && !_autoplay)
111
+    {
112
+      _object_for_player.html('');
113
+    }
114
+    if (_autoplay || force)
115
+    {
116
+      $('#autoplay_player_soundcloud').html('');
117
+    }
118
+  }
119
+  
120
+  this.stopAndDestroy = function()
121
+  {
122
+    //this.stop();
123
+    this.destroy(false);
124
+  }
125
+  
126
+  this.close = function()
127
+  {
128
+    this.destroy(true);
129
+  }
130
+
131
+  this.enableFullScreen = function() {
132
+
133
+  }
134
+
135
+  this.disableFullScreen = function() {
136
+
137
+  }
138
+}

+ 128 - 0
web/js/1ae784e_part_12_YoutubePlayer_5.js View File

@@ -0,0 +1,128 @@
1
+function YoutubePlayer(ref_id, object_for_player, finish_callback)
2
+{
3
+  var _ref_id = ref_id;
4
+  var _object_for_player = object_for_player;
5
+  var _yt_player;
6
+  var _finish_callback = finish_callback;
7
+  var that = this;
8
+  
9
+  this.play = function(play_callback)
10
+  { 
11
+    create_player(play_callback);
12
+  }
13
+  
14
+  var create_player = function(play_callback)
15
+  {
16
+    var div_for_iframe = $('<div>').attr('id', _object_for_player.attr('id')+'_iframe_'+ref_id);
17
+    _object_for_player.append(div_for_iframe);
18
+
19
+    var onPlayerReady_callback = function(){
20
+      onPlayerReady();
21
+      play_callback(that);
22
+    };
23
+
24
+    _yt_player = new YT.Player(_object_for_player.attr('id')+'_iframe_'+ref_id, {
25
+      height  : config_player_youtube_height,
26
+      width   : '100%',
27
+      videoId : _ref_id,
28
+      events  : {
29
+        'onReady': onPlayerReady_callback,
30
+        'onStateChange': onPlayerStateChange,
31
+        'onError': onError
32
+      }
33
+    });
34
+
35
+
36
+  }
37
+  
38
+  var onPlayerReady = function(event)
39
+  {
40
+    _yt_player.playVideo();
41
+  }
42
+  
43
+  var onError = function(event)
44
+  {
45
+    _finish_callback();
46
+  }
47
+  
48
+  var onPlayerStateChange = function(event)
49
+  {
50
+    if (event.data == YT.PlayerState.PLAYING)
51
+    {
52
+      
53
+    }
54
+    if (event.data == YT.PlayerState.ENDED)
55
+    {
56
+      _finish_callback();
57
+    }
58
+    if (event.data == YT.PlayerState.PAUSED)
59
+    {
60
+      
61
+    }
62
+    if (event.data == YT.PlayerState.BUFFERING)
63
+    {
64
+      
65
+    }
66
+    if (event.data == YT.PlayerState.CUED)
67
+    {
68
+      
69
+    }
70
+  }
71
+  
72
+  this.pause = function()
73
+  {
74
+    if (_yt_player)
75
+    {
76
+      if(typeof(_yt_player.pauseVideo)!=='undefined')
77
+      {
78
+        _yt_player.pauseVideo();
79
+      }
80
+    }
81
+  }
82
+  
83
+  this.stop = function()
84
+  {
85
+    if (_yt_player)
86
+    {
87
+      if(typeof(_yt_player.stopVideo)!=='undefined')
88
+      {
89
+        try
90
+        {
91
+          _yt_player.stopVideo();
92
+        }
93
+        catch (e)
94
+        {
95
+          
96
+        }
97
+      }
98
+    }
99
+  }
100
+  
101
+  this.destroy = function()
102
+  {
103
+    _object_for_player.html('');
104
+  }
105
+  
106
+  this.stopAndDestroy = function()
107
+  {
108
+    this.stop();
109
+    this.destroy();
110
+    this.disableFullScreen();
111
+  }
112
+  
113
+  this.close = function()
114
+  {
115
+    this.stopAndDestroy();
116
+  }
117
+
118
+  this.enableFullScreen = function() {
119
+    var iframe = $('#'+_object_for_player.attr('id')+'_iframe_'+_ref_id);
120
+    set_full_screen_on(iframe);
121
+  }
122
+
123
+  this.disableFullScreen = function() {
124
+    $('#close_full_screen').remove();
125
+  }
126
+
127
+
128
+}

+ 72 - 0
web/js/1ae784e_play2_13.js View File

@@ -0,0 +1,72 @@
1
+function DynamicPlayer()
2
+{
3
+  
4
+  this.play = function(object_for_player, player_type, ref_id, element_id, autoplay, finish_callback, play_callback)
5
+  {
6
+    autoplay = typeof autoplay !== 'undefined' ? autoplay : false;
7
+    finish_callback = typeof finish_callback !== 'undefined' ? finish_callback : $.noop;
8
+    play_callback = typeof play_callback !== 'undefined' ? play_callback : $.noop;
9
+
10
+    if ((player = getPlayerObjectForElementType(object_for_player, player_type, ref_id, element_id, autoplay, finish_callback)))
11
+    {
12
+      player.play(play_callback);
13
+      return player;
14
+    }
15
+    
16
+    return false;
17
+  }
18
+  
19
+  var getPlayerObjectForElementType = function(object_for_player, player_type, ref_id, element_id, autoplay, finish_callback)
20
+  {
21
+    if (player_type == 'youtube.com' || player_type == 'youtu.be')
22
+    {
23
+      return new YoutubePlayer(ref_id, object_for_player, finish_callback);
24
+    }
25
+    if (player_type == 'soundcloud.com')
26
+    {
27
+      return new SoundCloudPlayer(ref_id, object_for_player, finish_callback, autoplay);
28
+    }
29
+    if (player_type == 'jamendo.com')
30
+    {
31
+      return new JamendoPlayer(element_id, object_for_player, finish_callback);
32
+    }
33
+    
34
+    if (!autoplay && element_id)
35
+    {
36
+      return new GenericPlayer(element_id, object_for_player);
37
+    }
38
+    
39
+    return false;
40
+  }
41
+  
42
+}
43
+
44
+function PlayersManager()
45
+{
46
+  var _players = new Array();
47
+  
48
+  this.add = function(player, key)
49
+  {
50
+    _players[key] = player;
51
+  }
52
+  
53
+  this.get = function(key)
54
+  {
55
+    return _players[key];
56
+  }
57
+  
58
+  this.remove = function(key)
59
+  {
60
+    delete _players[key];
61
+  }
62
+  
63
+  this.getAll = function()
64
+  {
65
+    return _players;
66
+  }
67
+}
68
+
69
+$(document).ready(function() {
70
+  window.dynamic_player = new DynamicPlayer();
71
+  window.players_manager = new PlayersManager();
72
+});

File diff suppressed because it is too large
+ 4 - 0
web/js/1ae784e_swfobject_3.js


File diff suppressed because it is too large
+ 1 - 1
web/sitemap.xml