/**
 * Unobtrusive scripting adapter for jQuery
 *
 * Requires jQuery 1.6.0 or later.
 * https://github.com/rails/jquery-ujs

 * Uploading file using rails.js
 * =============================
 *
 * By default, browsers do not allow files to be uploaded via AJAX. As a result, if there are any non-blank file fields
 * in the remote form, this adapter aborts the AJAX submission and allows the form to submit through standard means.
 *
 * The `ajax:aborted:file` event allows you to bind your own handler to process the form submission however you wish.
 *
 * Ex:
 *     $('form').live('ajax:aborted:file', function(event, elements){
 *       // Implement own remote file-transfer handler here for non-blank file inputs passed in `elements`.
 *       // Returning false in this handler tells rails.js to disallow standard form submission
 *       return false;
 *     });
 *
 * The `ajax:aborted:file` event is fired when a file-type input is detected with a non-blank value.
 *
 * Third-party tools can use this hook to detect when an AJAX file upload is attempted, and then use
 * techniques like the iframe method to upload the file instead.
 *
 * Required fields in rails.js
 * ===========================
 *
 * If any blank required inputs (required="required") are detected in the remote form, the whole form submission
 * is canceled. Note that this is unlike file inputs, which still allow standard (non-AJAX) form submission.
 *
 * The `ajax:aborted:required` event allows you to bind your own handler to inform the user of blank required inputs.
 *
 * !! Note that Opera does not fire the form's submit event if there are blank required inputs, so this event may never
 *    get fired in Opera. This event is what causes other browsers to exhibit the same submit-aborting behavior.
 *
 * Ex:
 *     $('form').live('ajax:aborted:required', function(event, elements){
 *       // Returning false in this handler tells rails.js to submit the form anyway.
 *       // The blank required inputs are passed to this function in `elements`.
 *       return ! confirm("Would you like to submit the form with missing info?");
 *     });
 */
function less_json_eval(json){return eval("("+json+")")}function jq_defined(){return typeof jQuery!="undefined"}function less_get_params(a){if(jq_defined())return a;if(a==null)return"";var b=[];for(prop in a)b.push(prop+"="+a[prop]);return b.join("&")+""}function less_merge_objects(a,b){if(b==null)return a;z=new Object;for(prop in a)z[prop]=a[prop];for(prop in b)z[prop]=b[prop];return z}function less_ajax(a,b,c,d){b==undefined&&(b="get");var e;return jq_defined()?(v=b.toLowerCase()=="get"?"GET":"POST",b.toLowerCase()=="get"||b.toLowerCase()=="post"?p=less_get_params(c):p=less_get_params(less_merge_objects({_method:b.toLowerCase()},c)),e=jQuery.ajax(less_merge_objects({async:!1,url:a,type:v,data:p},d)).responseText):new Ajax.Request(a,less_merge_objects({asynchronous:!1,method:b,parameters:less_get_params(c),onComplete:function(a){e=a.responseText}},d)),a.indexOf(".json")==a.length-5?less_json_eval(e):e}function less_ajaxx(url,verb,params,options){verb==undefined&&(verb="get"),jq_defined()?(v=verb.toLowerCase()=="get"?"GET":"POST",verb.toLowerCase()=="get"||verb.toLowerCase()=="post"?p=less_get_params(params):p=less_get_params(less_merge_objects({_method:verb.toLowerCase()},params)),jQuery.ajax(less_merge_objects({url:url,type:v,data:p,complete:function(r){eval(r.responseText)}},options))):new Ajax.Request(url,less_merge_objects({method:verb,parameters:less_get_params(params),onComplete:function(r){eval(r.responseText)}},options))}function less_check_parameter(a){return a===undefined&&(a=""),a}function less_check_format(a){return a===undefined?a="":a="."+a,a}function user_favorites_path(a,b,c){return"/users/"+a+"/favorites"+b+""}function user_favorite_path(a,b,c,d){return"/users/"+a+"/favorites/"+b+""+c+""}function user_following_blogs_path(a,b,c){return"/users/"+a+"/following_blogs"+b+""}function user_following_blog_path(a,b,c,d){return"/users/"+a+"/following_blogs/"+b+""+c+""}function twitter_confirmation_path(a){return"/twitter_confirmation"}function twitter_index_path(a,b){return"/twitter"+a+""}function new_twitter_path(a,b){return"/twitter/new"+a+""}function edit_twitter_path(a,b,c){return"/twitter/"+a+"/edit"+b+""}function confirmation_twitter_path(a,b,c){return"/twitter/"+a+"/confirmation"+b+""}function twitter_path(a,b,c){return"/twitter/"+a+""+b+""}function list_tracks_path(a,b){return"/tracks/list"+a+""}function newspaper_tracks_path(a,b){return"/tracks/newspaper"+a+""}function tracks_path(a,b){return"/tracks"+a+""}function new_track_path(a,b){return"/tracks/new"+a+""}function edit_track_path(a,b,c){return"/tracks/"+a+"/edit"+b+""}function get_channels_selector_track_path(a,b,c){return"/tracks/"+a+"/get_channels_selector"+b+""}function inside_track_path(a,b,c){return"/tracks/"+a+"/inside"+b+""}function track_path(a,b,c){return"/tracks/"+a+""+b+""}function old_channel_path(a,b){return"/channels/tagged/"+a+""}function channel_path(a,b,c,d){return"/channels/"+a+"/"+b+""+c+""}function top_channels_path(a,b,c){return"/top_channels/"+a+""+b+""}function edit_feed_sessions_path(a,b){return"/feed_sessions/edit"+a+""}function old_buttons_blogs_path(a,b){return"/blogs/old_buttons"+a+""}function search_blogs_path(a,b){return"/blogs/search"+a+""}function old_new_blogs_path(a,b){return"/blogs/old_new"+a+""}function parsed_blogs_path(a,b){return"/blogs/parsed"+a+""}function buttons_blogs_path(a,b){return"/blogs/buttons"+a+""}function validation_blogs_path(a,b){return"/blogs/validation"+a+""}function validate_blog_path(a,b,c){return"/blogs/"+a+"/validate"+b+""}function follow_count_feed_path(a,b,c){return"/feeds/"+a+"/follow_count"+b+""}function feed_validation_blogs_path(a,b){return"/blogs/feed_validation"+a+""}function share_url_blogs_path(a,b){return"/blogs/share_url"+a+""}function new_blogs_path(a,b){return"/blogs/new"+a+""}function edit_blogs_path(a,b){return"/blogs/edit"+a+""}function blogs_path(a,b){return"/blogs"+a+""}function pages_path(a,b){return"/pages"+a+""}function new_page_path(a,b){return"/pages/new"+a+""}function edit_page_path(a,b,c){return"/pages/"+a+"/edit"+b+""}function page_path(a,b,c){return"/pages/"+a+""+b+""}function password_resets_path(a,b){return"/password_resets"+a+""}function new_password_reset_path(a,b){return"/password_resets/new"+a+""}function edit_password_reset_path(a,b,c){return"/password_resets/"+a+"/edit"+b+""}function password_reset_path(a,b,c){return"/password_resets/"+a+""+b+""}function new_user_session_path(a,b){return"/user_session/new"+a+""}function edit_user_session_path(a,b){return"/user_session/edit"+a+""}function user_session_path(a,b){return"/user_session"+a+""}function connect_facebook_path(a,b){return"/facebook/connect"+a+""}function facebook_index_path(a,b){return"/facebook"+a+""}function new_facebook_path(a,b){return"/facebook/new"+a+""}function edit_facebook_path(a,b,c){return"/facebook/"+a+"/edit"+b+""}function facebook_path(a,b,c){return"/facebook/"+a+""+b+""}function unsubscribe_users_path(a,b){return"/users/unsubscribe"+a+""}function whoami_users_path(a,b){return"/users/whoami"+a+""}function show_upload_avatar_users_path(a,b){return"/users/show_upload_avatar"+a+""}function edit_email_preferences_users_path(a,b){return"/users/edit_email_preferences"+a+""}function edit_password_users_path(a,b){return"/users/edit_password"+a+""}function upload_avatar_users_path(a,b){return"/users/upload_avatar"+a+""}function save_email_preferences_users_path(a,b){return"/users/save_email_preferences"+a+""}function save_password_users_path(a,b){return"/users/save_password"+a+""}function users_path(a,b){return"/users"+a+""}function new_user_path(a,b){return"/users/new"+a+""}function edit_user_path(a,b,c){return"/users/"+a+"/edit"+b+""}function user_path(a,b,c){return"/users/"+a+""+b+""}function user_connection_path(a,b,c,d){return"/users/"+a+"/connections/"+b+c+""}function user_connections_path(a,b,c){return"/users/"+a+"/connections"+b+""}function login_path(a){return"/login"}function logout_path(a){return"/logout"}function signup_path(a){return"/join"+a}function forgot_path(a){return"/forgot"}function prippsbla_disclaimer_path(a){return"/prippsbla_disclaimer"}function accept_prippsbla_disclaimer_path(a){return"/accept_prippsbla_disclaimer"}function end_of_channel_path(a){return"/end_of_channel"}function admin_globals_path(a,b){return"/admin/globals"+a+""}function new_admin_global_path(a,b){return"/admin/globals/new"+a+""}function edit_admin_global_path(a,b,c){return"/admin/globals/"+a+"/edit"+b+""}function admin_global_path(a,b,c){return"/admin/globals/"+a+""+b+""}function admin_users_path(a,b){return"/admin/users"+a+""}function new_admin_user_path(a,b){return"/admin/users/new"+a+""}function edit_admin_user_path(a,b,c){return"/admin/users/"+a+"/edit"+b+""}function admin_user_path(a,b,c){return"/admin/users/"+a+""+b+""}function admin_stats_path(a,b){return"/admin/stats"+a+""}function new_admin_stat_path(a,b){return"/admin/stats/new"+a+""}function edit_admin_stat_path(a,b,c){return"/admin/stats/"+a+"/edit"+b+""}function admin_stat_path(a,b,c){return"/admin/stats/"+a+""+b+""}function admin_feed_entries_path(a,b,c){return"/admin/feeds/"+a+"/entries"+b+""}function new_admin_feed_entry_path(a,b,c){return"/admin/feeds/"+a+"/entries/new"+b+""}function edit_admin_feed_entry_path(a,b,c,d){return"/admin/feeds/"+a+"/entries/"+b+"/edit"+c+""}function tracks_admin_feed_entry_path(a,b,c,d){return"/admin/feeds/"+a+"/entries/"+b+"/tracks"+c+""}function admin_feed_entry_path(a,b,c,d){return"/admin/feeds/"+a+"/entries/"+b+""+c+""}function admin_feeds_path(a,b){return"/admin/feeds"+a+""}function new_admin_feed_path(a,b){return"/admin/feeds/new"+a+""}function edit_admin_feed_path(a,b,c){return"/admin/feeds/"+a+"/edit"+b+""}function schedule_admin_feed_path(a,b,c){return"/admin/feeds/"+a+"/schedule"+b+""}function tracks_admin_feed_path(a,b,c){return"/admin/feeds/"+a+"/tracks"+b+""}function admin_feed_path(a,b,c){return"/admin/feeds/"+a+""+b+""}function admin_tracks_path(a,b){return"/admin/tracks"+a+""}function new_admin_track_path(a,b){return"/admin/tracks/new"+a+""}function edit_admin_track_path(a,b,c){return"/admin/tracks/"+a+"/edit"+b+""}function admin_track_path(a,b,c){return"/admin/tracks/"+a+""+b+""}function admin_tagged_tracks_path(a,b){return"/admin/tagged_tracks"+a+""}function new_admin_tagged_track_path(a,b){return"/admin/tagged_tracks/new"+a+""}function edit_admin_tagged_track_path(a,b,c){return"/admin/tagged_tracks/"+a+"/edit"+b+""}function admin_tagged_track_path(a,b,c){return"/admin/tagged_tracks/"+a+""+b+""}function admin_emailings_path(a,b){return"/admin/emailings"+a+""}function new_admin_emailing_path(a,b){return"/admin/emailings/new"+a+""}function edit_admin_emailing_path(a,b,c){return"/admin/emailings/"+a+"/edit"+b+""}function admin_emailing_path(a,b,c){return"/admin/emailings/"+a+""+b+""}function admin_media_types_path(a,b){return"/admin/media_types"+a+""}function new_admin_media_type_path(a,b){return"/admin/media_types/new"+a+""}function edit_admin_media_type_path(a,b,c){return"/admin/media_types/"+a+"/edit"+b+""}function admin_media_type_path(a,b,c){return"/admin/media_types/"+a+""+b+""}function sort_admin_featured_feeds_path(a,b){return"/admin/featured_feeds/sort"+a+""}function sort_admin_popular_path(a,b,c){return"/admin/popular/sort?type="+a}function ads_path(a,b){return"/ads"+a+""}function new_ad_path(a,b){return"/ads/new"+a+""}function edit_ad_path(a,b,c){return"/ads/"+a+"/edit"+b+""}function ad_path(a,b,c){return"/ads/"+a+""+b+""}function new_scrobbles_path(a,b){return"/scrobbles/new"+a+""}function edit_scrobbles_path(a,b){return"/scrobbles/edit"+a+""}function playing_scrobbles_path(a,b){return"/scrobbles/playing"+a+""}function played_scrobbles_path(a,b){return"/scrobbles/played"+a+""}function scrobbles_path(a,b){return"/scrobbles"+a+""}function scrobbles_callback_path(a){return"/scrobbles/callback"}function slug_path(a,b){return"/"+a+""}function root_path(a){return""}function popup(a,b,c,d){b==undefined&&(b="Shuffler.fm"),c==undefined&&(c=500),d==undefined&&(d=466);var e=(screen.width-c)/2,f=(screen.height-d)/2,g="width="+c+", height="+d;return g+=", top="+f+", left="+e,g+=", directories=no",g+=", location=no",g+=", menubar=no",g+=", resizable=no",g+=", scrollbars=no",g+=", status=no",g+=", toolbar=no",newwin=window.open(a,b,g),window.focus&&newwin.focus(),newwin}function pageY(a){return a.offsetParent?a.offsetTop+pageY(a.offsetParent):a.offsetTop}function resizeIframe(){if(document.getElementById("content_frame")){var a=document.documentElement.clientHeight;a-=pageY(document.getElementById("content_frame")),a=a<0?0:a,a-=11,document.getElementById("content_frame").style.height=a+"px"}}function SHUFFLERAudioPlayeronPlayerError(a){SHUFFLER.AudioPlayer.player.onStop()}function SHUFFLERAudioPlayerOnPlayerStateChange(a){a==0?SHUFFLER.AudioPlayer.player.onStop():a==2?SHUFFLER.AudioPlayer.player.onPause(!0):a==1&&SHUFFLER.AudioPlayer.player.onPlay()}(function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c){var d=c.data("events"),e=!0;return d!==b&&d.submit!==b&&a.each(d.submit,function(a,b){if(typeof b.handler=="function")return e=b.handler(b.data)}),e},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(c.linkDisableSelector).live("ajax:complete",function(){c.enableElement(a(this))}),a(c.linkClickSelector).live("click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e),!1);if(e.data("method"))return c.handleMethod(e),!1}),a(c.inputChangeSelector).live("change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(c.formSubmitSelector).live("submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&c.callFormSubmitBindings(e)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(c.formInputClickSelector).live("click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(c.formSubmitSelector).live("ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(c.formSubmitSelector).live("ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})})(jQuery),function(a){a.fn.jcarousel=function(b){if(typeof b=="string"){var d=a(this).data("jcarousel"),e=Array.prototype.slice.call(arguments,1);return d[b].apply(d,e)}return this.each(function(){a(this).data("jcarousel",new c(this,b))})};var b={vertical:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null};a.jcarousel=function(c,d){this.options=a.extend({},b,d||{}),this.locked=!1,this.container=null,this.clip=null,this.list=null,this.buttonNext=null,this.buttonPrev=null,this.wh=this.options.vertical?"height":"width",this.lt=this.options.vertical?"top":"left";var e="",f=c.className.split(" ");for(var g=0;g<f.length;g++)if(f[g].indexOf("jcarousel-skin")!=-1){a(c).removeClass(f[g]),e=f[g];break}c.nodeName=="UL"||c.nodeName=="OL"?(this.list=a(c),this.container=this.list.parent(),this.container.hasClass("jcarousel-clip")?(this.container.parent().hasClass("jcarousel-container")||(this.container=this.container.wrap("<div></div>")),this.container=this.container.parent()):this.container.hasClass("jcarousel-container")||(this.container=this.list.wrap("<div></div>").parent())):(this.container=a(c),this.list=this.container.find("ul,ol").eq(0)),e!=""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+e+'"></div>'),this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip"))this.clip=this.list.wrap("<div></div>").parent();this.buttonNext=a(".jcarousel-next",this.container),this.buttonNext.size()==0&&this.options.buttonNextHTML!=null&&(this.buttonNext=this.clip.after(this.options.buttonNextHTML).next()),this.buttonNext.addClass(this.className("jcarousel-next")),this.buttonPrev=a(".jcarousel-prev",this.container),this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null&&(this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next()),this.buttonPrev.addClass(this.className("jcarousel-prev")),this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden",position:"relative"}),this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,left:0,margin:0,padding:0}),this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});var h=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null,i=this.list.children("li"),j=this;if(i.size()>0){var k=0,g=this.options.offset;i.each(function(){j.format(this,g++),k+=j.dimension(this,h)}),this.list.css(this.wh,k+"px");if(!d||d.size===undefined)this.options.size=i.size()}this.container.css("display","block"),this.buttonNext.css("display","block"),this.buttonPrev.css("display","block"),this.funcNext=function(){j.next()},this.funcPrev=function(){j.prev()},this.funcResize=function(){j.reload()},this.options.initCallback!=null&&this.options.initCallback(this,"init"),a.browser.safari?(this.buttons(!1,!1),a(window).bind("load.jcarousel",function(){j.setup()})):this.setup()};var c=a.jcarousel;c.fn=c.prototype={jcarousel:"0.2.4"},c.fn.extend=c.extend=a.extend,c.fn.extend({setup:function(){this.first=null,this.last=null,this.prevFirst=null,this.prevLast=null,this.animating=!1,this.timer=null,this.tail=null,this.inTail=!1;if(this.locked)return;this.list.css(this.lt,this.pos(this.options.offset)+"px");var b=this.pos(this.options.start);this.prevFirst=this.prevLast=null,this.animate(b,!1),a(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)},reset:function(){this.list.empty(),this.list.css(this.lt,"0px"),this.list.css(this.wh,"10px"),this.options.initCallback!=null&&this.options.initCallback(this,"reset"),this.setup()},reload:function(){this.tail!=null&&this.inTail&&this.list.css(this.lt,c.intval(this.list.css(this.lt))+this.tail),this.tail=null,this.inTail=!1,this.options.reloadCallback!=null&&this.options.reloadCallback(this);if(this.options.visible!=null){var b=this,d=Math.ceil(this.clipping()/this.options.visible),e=0,f=0;a("li",this.list).each(function(a){e+=b.dimension(this,d),a+1<b.first&&(f=e)}),this.list.css(this.wh,e+"px"),this.list.css(this.lt,-f+"px")}this.scroll(this.first,!1)},lock:function(){this.locked=!0,this.buttons()},unlock:function(){this.locked=!1,this.buttons()},size:function(a){return a!=undefined&&(this.options.size=a,this.locked||this.buttons()),this.options.size},has:function(a,b){if(b==undefined||!b)b=a;this.options.size!==null&&b>this.options.size&&(b=this.options.size);for(var c=a;c<=b;c++){var d=this.get(c);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0},get:function(b){return a(".jcarousel-item-"+b,this.list)},add:function(a,b){var d=this.get(a),e=0,f=0;if(d.length==0){var g,d=this.create(a),h=c.intval(a);while(g=this.get(--h))if(h<=0||g.length){h<=0?this.list.prepend(d):g.after(d);break}}else e=this.dimension(d);d.removeClass(this.className("jcarousel-item-placeholder")),typeof b=="string"?d.html(b):d.empty().append(b);var i=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null,j=this.dimension(d,i)-e;return a>0&&a<this.first&&this.list.css(this.lt,c.intval(this.list.css(this.lt))-j+"px"),this.list.css(this.wh,c.intval(this.list.css(this.wh))+j+"px"),d},remove:function(a){var b=this.get(a);if(!b.length||a>=this.first&&a<=this.last)return;var d=this.dimension(b);a<this.first&&this.list.css(this.lt,c.intval(this.list.css(this.lt))+d+"px"),b.remove(),this.list.css(this.wh,c.intval(this.list.css(this.wh))-d+"px")},next:function(){this.stopAuto(),this.tail!=null&&!this.inTail?this.scrollTail(!1):this.scroll(this.options.wrap!="both"&&this.options.wrap!="last"||this.options.size==null||this.last!=this.options.size?this.first+this.options.scroll:1)},prev:function(){this.stopAuto(),this.tail!=null&&this.inTail?this.scrollTail(!0):this.scroll(this.options.wrap!="both"&&this.options.wrap!="first"||this.options.size==null||this.first!=1?this.first-this.options.scroll:this.options.size)},scrollTail:function(a){if(this.locked||this.animating||!this.tail)return;var b=c.intval(this.list.css(this.lt));a?b+=this.tail:b-=this.tail,this.inTail=!a,this.prevFirst=this.first,this.prevLast=this.last,this.animate(b)},scroll:function(a,b){if(this.locked||this.animating)return;this.animate(this.pos(a),b)},pos:function(a){var b=c.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;this.options.wrap!="circular"&&(a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a);var d=this.first>a,e=this.options.wrap!="circular"&&this.first<=1?1:this.first,f=d?this.get(e):this.get(this.last),g=d?e:e-1,h=null,i=0,j=!1,k=0,l;while(d?--g>=a:++g<a)h=this.get(g),j=!h.length,h.length==0&&(h=this.create(g).addClass(this.className("jcarousel-item-placeholder")),f[d?"before":"after"](h),this.first!=null&&this.options.wrap=="circular"&&this.options.size!==null&&(g<=0||g>this.options.size)&&(l=this.get(this.index(g)),l.length&&this.add(g,l.children().clone(!0)))),f=h,k=this.dimension(h),j&&(i+=k),this.first!=null&&(this.options.wrap=="circular"||g>=1&&(this.options.size==null||g<=this.options.size))&&(b=d?b+k:b-k);var m=this.clipping(),n=[],o=0,g=a,p=0,f=this.get(a-1);while(++o){h=this.get(g),j=!h.length,h.length==0&&(h=this.create(g).addClass(this.className("jcarousel-item-placeholder")),f.length==0?this.list.prepend(h):f[d?"before":"after"](h),this.first!=null&&this.options.wrap=="circular"&&this.options.size!==null&&(g<=0||g>this.options.size)&&(l=this.get(this.index(g)),l.length&&this.add(g,l.find(">*").clone(!0)))),f=h;var k=this.dimension(h);if(k==0)return isNaN("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."),0;this.options.wrap!="circular"&&this.options.size!==null&&g>this.options.size?n.push(h):j&&(i+=k),p+=k;if(p>=m)break;g++}for(var q=0;q<n.length;q++)n[q].remove();i>0&&(this.list.css(this.wh,this.dimension(this.list)+i+"px"),d&&(b-=i,this.list.css(this.lt,c.intval(this.list.css(this.lt))-i+"px")));var r=a+o-1;this.options.wrap!="circular"&&this.options.size&&r>this.options.size&&(r=this.options.size);if(g>r){o=0,g=r,p=0;while(++o){var h=this.get(g--);if(!h.length)break;p+=this.dimension(h);if(p>=m)break}}var s=r-o+1;this.options.wrap!="circular"&&s<1&&(s=1),this.inTail&&d&&(b+=this.tail,this.inTail=!1),this.tail=null;if(this.options.wrap!="circular"&&r==this.options.size&&r-o+1>=1){var t=c.margin(this.get(r),this.options.vertical?"marginBottom":"marginRight");p-t>m&&(this.tail=p-m-t)}while(a-->s)b+=this.dimension(this.get(a));return this.prevFirst=this.first,this.prevLast=this.last,this.first=s,this.last=r,b},animate:function(a,b){if(this.locked||this.animating)return;this.animating=!0;var c=this,d=function(){c.animating=!1,a==0&&c.list.css(c.lt,0),(c.options.wrap=="circular"||c.options.wrap=="both"||c.options.wrap=="last"||c.options.size==null||c.last<c.options.size)&&c.startAuto(),c.buttons(),c.notify("onAfterAnimation")};this.notify("onBeforeAnimation");if(!this.options.animation||b==0)this.list.css(this.lt,a+"px"),d();else{var e=this.options.vertical?{top:a}:{left:a};this.list.animate(e,this.options.animation,this.options.easing,d)}},startAuto:function(a){a!=undefined&&(this.options.auto=a);if(this.options.auto==0)return this.stopAuto();if(this.timer!=null)return;var b=this;this.timer=setTimeout(function(){b.next()},this.options.auto*1e3)},stopAuto:function(){if(this.timer==null)return;clearTimeout(this.timer),this.timer=null},buttons:function(a,b){if(a==undefined||a==null){var a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size==null||this.last<this.options.size);!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!=null&&this.last>=this.options.size&&(a=this.tail!=null&&!this.inTail)}if(b==undefined||b==null){var b=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1);!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!=null&&this.first==1&&(b=this.tail!=null&&this.inTail)}var c=this;this.buttonNext[a?"bind":"unbind"](this.options.buttonNextEvent+".jcarousel",this.funcNext)[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.buttonPrev[b?"bind":"unbind"](this.options.buttonPrevEvent+".jcarousel",this.funcPrev)[b?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",b?!1:!0),this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=a)&&this.options.buttonNextCallback!=null&&(this.buttonNext.each(function(){c.options.buttonNextCallback(c,this,a)}),this.buttonNext[0].jcarouselstate=a),this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=b)&&this.options.buttonPrevCallback!=null&&(this.buttonPrev.each(function(){c.options.buttonPrevCallback(c,this,b)}),this.buttonPrev[0].jcarouselstate=b)},notify:function(a){var b=this.prevFirst==null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,b),this.prevFirst!==this.first&&(this.callback("itemFirstInCallback",a,b,this.first),this.callback("itemFirstOutCallback",a,b,this.prevFirst)),this.prevLast!==this.last&&(this.callback("itemLastInCallback",a,b,this.last),this.callback("itemLastOutCallback",a,b,this.prevLast)),this.callback("itemVisibleInCallback",a,b,this.first,this.last,this.prevFirst,this.prevLast),this.callback("itemVisibleOutCallback",a,b,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(b,c,d,e,f,g,h){if(this.options[b]==undefined||typeof this.options[b]!="object"&&c!="onAfterAnimation")return;var i=typeof this.options[b]=="object"?this.options[b][c]:this.options[b];if(!a.isFunction(i))return;var j=this;if(e===undefined)i(j,d,c);else if(f===undefined)this.get(e).each(function(){i(j,this,e,d,c)});else for(var k=e;k<=f;k++)k!==null&&!(k>=g&&k<=h)&&this.get(k).each(function(){i(j,this,k,d,c)})},create:function(a){return this.format("<li></li>",a)},format:function(b,c){var d=a(b).addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":"left","list-style":"none"});return d.attr("jcarouselindex",c),d},className:function(a){return a+" "+a+(this.options.vertical?"-vertical":"-horizontal")},dimension:function(b,d){var e=b.jquery!=undefined?b[0]:b,f=this.options.vertical?e.offsetHeight+c.margin(e,"marginTop")+c.margin(e,"marginBottom"):e.offsetWidth+c.margin(e,"marginLeft")+c.margin(e,"marginRight");if(d==undefined||f==d)return f;var g=this.options.vertical?d-c.margin(e,"marginTop")-c.margin(e,"marginBottom"):d-c.margin(e,"marginLeft")-c.margin(e,"marginRight");return a(e).css(this.wh,g+"px"),this.dimension(e)},clipping:function(){return this.options.vertical?this.clip[0].offsetHeight-c.intval(this.clip.css("borderTopWidth"))-c.intval(this.clip.css("borderBottomWidth")):this.clip[0].offsetWidth-c.intval(this.clip.css("borderLeftWidth"))-c.intval(this.clip.css("borderRightWidth"))},index:function(a,b){return b==undefined&&(b=this.options.size),Math.round(((a-1)/b-Math.floor((a-1)/b))*b)+1}}),c.extend({defaults:function(c){return a.extend(b,c||{})},margin:function(b,d){if(!b)return 0;var e=b.jquery!=undefined?b[0]:b;if(d=="marginRight"&&a.browser.safari){var f={display:"block","float":"none",width:"auto"},g,h;return a.swap(e,f,function(){g=e.offsetWidth}),f.marginRight=0,a.swap(e,f,function(){h=e.offsetWidth}),h-g}return c.intval(a.css(e,d))},intval:function(a){return a=parseInt(a),isNaN(a)?0:a}})}(jQuery),function(a){var b=a(window);a.fn.asynchImageLoader=a.fn.jail=function(c){c=a.extend({timeout:10,effect:!1,speed:400,selector:null,offset:0,event:"load+scroll",callback:jQuery.noop,callbackAfterEachImage:jQuery.noop,placeholder:!1,container:window},c);var d=this;return a.jail.initialStack=this,this.data("triggerEl",c.selector?a(c.selector):b),c.placeholder!==!1&&d.each(function(){a(this).attr("src",c.placeholder)}),/^load/.test(c.event)?a.asynchImageLoader.later.call(this
,c):a.asynchImageLoader.onEvent.call(this,c,d),this},a.asynchImageLoader=a.jail={_purgeStack:function(a){var b=0;for(;;){if(b===a.length)break;a[b].getAttribute("data-href")?b++:a.splice(b,1)}},_loadOnEvent:function(b){var c=a(this),d=b.data.options,e=b.data.images;a.asynchImageLoader._loadImage(d,c),c.unbind(d.event,a.asynchImageLoader._loadOnEvent),a.asynchImageLoader._purgeStack(e),!d.callback||(a.asynchImageLoader._purgeStack(a.jail.initialStack),a.asynchImageLoader._launchCallback(a.jail.initialStack,d))},_bufferedEventListener:function(b){var c=b.data.images,d=b.data.options,e=c.data("triggerEl");clearTimeout(c.data("poller")),c.data("poller",setTimeout(function(){c.each(function(){a.asynchImageLoader._loadImageIfVisible(d,this,e)}),a.asynchImageLoader._purgeStack(c),!d.callback||(a.asynchImageLoader._purgeStack(a.jail.initialStack),a.asynchImageLoader._launchCallback(a.jail.initialStack,d))},d.timeout))},onEvent:function(c,d){d=d||this;if(c.event==="scroll"||c.selector){var e=d.data("triggerEl");if(d.length>0){e.bind(c.event,{images:d,options:c},a.asynchImageLoader._bufferedEventListener),(c.event==="scroll"||!c.selector)&&b.resize({images:d,options:c},a.asynchImageLoader._bufferedEventListener);return}!e||e.unbind(c.event,a.asynchImageLoader._bufferedEventListener)}else d.bind(c.event,{options:c,images:d},a.asynchImageLoader._loadOnEvent)},later:function(b){var c=this;b.event==="load"&&c.each(function(){a.asynchImageLoader._loadImageIfVisible(b,this,c.data("triggerEl"))}),a.asynchImageLoader._purgeStack(c),a.asynchImageLoader._launchCallback(c,b),setTimeout(function(){b.event==="load"?c.each(function(){a.asynchImageLoader._loadImage(b,a(this))}):c.each(function(){a.asynchImageLoader._loadImageIfVisible(b,this,c.data("triggerEl"))}),a.asynchImageLoader._purgeStack(c),a.asynchImageLoader._launchCallback(c,b),b.event==="load+scroll"&&(b.event="scroll",a.asynchImageLoader.onEvent(b,c))},b.timeout)},_launchCallback:function(b,c){b.length===0&&!a.jail.isCallback&&(c.callback.call(this,c),a.jail.isCallback=!0)},_loadImageIfVisible:function(c,d,e){var f=a(d),g=/scroll/i.test(c.event)?e:b;a.asynchImageLoader._isInTheScreen(g,f,c.offset)&&a.asynchImageLoader._loadImage(c,f)},_isInTheScreen:function(a,b,c){var d=a[0]===window,e=d?{top:0,left:0}:a.offset(),f=e.top+(d?a.scrollTop():0),g=e.left+(d?a.scrollLeft():0),h=g+a.width(),i=f+a.height(),j=b.offset(),k=b.width(),l=b.height();return f-c<=j.top+l&&i+c>=j.top&&g-c<=j.left+k&&h+c>=j.left},_loadImage:function(a,b){b.hide(),b.attr("src",b.attr("data-href")),b.removeAttr("data-href"),a.effect?a.speed?b[a.effect](a.speed):b[a.effect]():b.show(),a.callbackAfterEachImage.call(this,a)}}}(jQuery),function(a,b){function C(a){return typeof a=="string"}function D(a){var b=d.call(arguments,1);return function(){return a.apply(this,b.concat(d.call(arguments)))}}function E(a){return a.replace(x,"$2")}function F(a){return a.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function G(b,d,f,h,j){var k,l,m,n,o;return h!==c?(m=f.match(b?x:/^([^#?]*)\??([^#]*)(#?.*)/),o=m[3]||"",j===2&&C(h)?l=h.replace(b?w:v,""):(n=i(m[2]),h=C(h)?i[b?r:q](h):h,l=j===2?h:j===1?a.extend({},h,n):a.extend({},n,h),l=g(l),b&&(l=l.replace(y,e))),k=m[1]+(b?A:l||!m[1]?"?":"")+l+o):k=d(f!==c?f:location.href),k}function H(a,b,d){return b===c||typeof b=="boolean"?(d=b,b=f[a?r:q]()):b=C(b)?b.replace(a?w:v,""):b,i(b,d)}function I(b,d,e,g){return!C(e)&&typeof e!="object"&&(g=e,e=d,d=c),this.each(function(){var c=a(this),h=d||n()[(this.nodeName||"").toLowerCase()]||"",i=h&&c.attr(h)||"";c.attr(h,f[b](i,e,g))})}"$:nomunge";var c,d=Array.prototype.slice,e=decodeURIComponent,f=a.param,g,h,i,j,k=a.bbq=a.bbq||{},l,m,n,o=a.event.special,p="hashchange",q="querystring",r="fragment",s="elemUrlAttr",t="href",u="src",v=/^.*\?|#.*$/g,w,x,y,z,A,B={};f[q]=D(G,0,F),f[r]=h=D(G,1,E),f.sorted=g=function(b,c){var d=[],e={};return a.each(f(b,c).split("&"),function(a,b){var c=b.replace(/(?:%5B|=).*$/,""),f=e[c];f||(f=e[c]=[],d.push(c)),f.push(b)}),a.map(d.sort(),function(a){return e[a]}).join("&")},h.noEscape=function(b){b=b||"";var c=a.map(b.split(""),encodeURIComponent);y=new RegExp(c.join("|"),"g")},h.noEscape(",/"),h.ajaxCrawlable=function(a){return a!==c&&(a?(w=/^.*(?:#!|#)/,x=/^([^#]*)(?:#!|#)?(.*)$/,A="#!"):(w=/^.*#/,x=/^([^#]*)#?(.*)$/,A="#"),z=!!a),z},h.ajaxCrawlable(0),a.deparam=i=function(b,d){var f={},g={"true":!0,"false":!1,"null":null};return a.each(b.replace(/\+/g," ").split("&"),function(b,h){var i=h.split("="),j=e(i[0]),k,l=f,m=0,n=j.split("]["),o=n.length-1;/\[/.test(n[0])&&/\]$/.test(n[o])?(n[o]=n[o].replace(/\]$/,""),n=n.shift().split("[").concat(n),o=n.length-1):o=0;if(i.length===2){k=e(i[1]),d&&(k=k&&!isNaN(k)?+k:k==="undefined"?c:g[k]!==c?g[k]:k);if(o)for(;m<=o;m++)j=n[m]===""?l.length:n[m],l=l[j]=m<o?l[j]||(n[m+1]&&isNaN(n[m+1])?{}:[]):k;else a.isArray(f[j])?f[j].push(k):f[j]!==c?f[j]=[f[j],k]:f[j]=k}else j&&(f[j]=d?c:"")}),f},i[q]=D(H,0),i[r]=j=D(H,1),a[s]||(a[s]=function(b){return a.extend(B,b)})({a:t,base:t,iframe:u,img:u,input:u,form:"action",link:t,script:u}),n=a[s],a.fn[q]=D(I,q),a.fn[r]=D(I,r),k.pushState=l=function(a,b){C(a)&&/^#/.test(a)&&b===c&&(b=2);var d=a!==c,e=h(location.href,d?a:{},d?b:2);location.href=e},k.getState=m=function(a,b){return a===c||typeof a=="boolean"?j(a):j(b)[a]},k.removeState=function(b){var d={};b!==c&&(d=m(),a.each(a.isArray(b)?b:arguments,function(a,b){delete d[b]})),l(d,2)},o[p]=a.extend(o[p],{add:function(b){function e(a){var b=a[r]=h();a.getState=function(a,d){return a===c||typeof a=="boolean"?i(b,a):i(b,d)[a]},d.apply(this,arguments)}var d;if(a.isFunction(b))return d=b,e;d=b.handler,b.handler=e}})}(jQuery,this),function(a,b,c){function j(a){return a=a||location.href,"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}"$:nomunge";var d="hashchange",e=document,f,g=a.event.special,h=e.documentMode,i="on"+d in b&&(h===c||h>7);a.fn[d]=function(a){return a?this.bind(d,a):this.trigger(d)},a.fn[d].delay=50,g[d]=a.extend(g[d],{setup:function(){if(i)return!1;a(f.start)},teardown:function(){if(i)return!1;a(f.stop)}}),f=function(){function n(){var c=j(),e=m(h);c!==h?(l(h=c,e),a(b).trigger(d)):e!==h&&(location.href=location.href.replace(/#.*/,"")+e),g=setTimeout(n,a.fn[d].delay)}var f={},g,h=j(),k=function(a){return a},l=k,m=k;return f.start=function(){g||n()},f.stop=function(){g&&clearTimeout(g),g=c},a.browser.msie&&!i&&function(){var b,c;f.start=function(){b||(c=a.fn[d].src,c=c&&c+j(),b=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){c||l(j()),n()}).attr("src",c||"javascript:0").insertAfter("body")[0].contentWindow,e.onpropertychange=function(){try{event.propertyName==="title"&&(b.document.title=e.title)}catch(a){}})},f.stop=k,m=function(){return j(b.location.href)},l=function(c,f){var g=b.document,h=a.fn[d].domain;c!==f&&(g.title=e.title,g.open(),h&&g.write('<script>document.domain="'+h+'"</script>'),g.close(),b.location.hash=c)}}(),f}()}(jQuery,this),function(a){var b,c,d=1,e,f=this,g=!1,h="postMessage",i="addEventListener",j,k=f[h]&&!a.browser.opera;a[h]=function(b,c,e){if(!c)return;b=typeof b=="string"?b:a.param(b),e=e||parent,k?e[h](b,c.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):c&&(e.location=c.replace(/#.*$/,"")+"#"+ +(new Date)+d++ +"&"+b)},a.receiveMessage=j=function(d,h,l){k?(d&&(e&&j(),e=function(b){if(typeof h=="string"&&b.origin!==h||a.isFunction(h)&&h(b.origin)===g)return g;d(b)}),f[i]?f[d?i:"removeEventListener"]("message",e,g):f[d?"attachEvent":"detachEvent"]("onmessage",e)):(b&&clearInterval(b),b=null,d&&(l=typeof h=="number"?h:typeof l=="number"?l:100,b=setInterval(function(){var a=document.location.hash,b=/^#?\d+&/;a!==c&&b.test(a)&&(c=a,d({data:a.replace(b,"")}))},l)))}}(jQuery),jQuery.cookie=function(a,b,c){if(arguments.length>1&&(b===null||typeof b!="object")){c=jQuery.extend({},c),b===null&&(c.expires=-1);if(typeof c.expires=="number"){var d=c.expires,e=c.expires=new Date;e.setDate(e.getDate()+d)}return document.cookie=[encodeURIComponent(a),"=",c.raw?String(b):encodeURIComponent(String(b)),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join("")}c=b||{};var f,g=c.raw?function(a){return a}:decodeURIComponent;return(f=(new RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)")).exec(document.cookie))?g(f[1]):null},function(a){a.fn.pjax=function(b,c){c?c.container=b:c=a.isPlainObject(b)?b:{container:b};if(c.container&&typeof c.container!="string")throw"pjax container must be a string selector!";return this.live("click",function(b){if(b.which>1||b.metaKey)return!0;var d={url:this.href,container:a(this).attr("data-pjax"),clickedElement:a(this)};a.pjax(a.extend({},d,c)),b.preventDefault()})},a.pjax=function(b){var c=a(b.container),d=b.success||a.noop;delete b.success;if(typeof b.container!="string")throw"pjax container must be a string selector!";var e={timeout:650,push:!0,replace:!1,data:{_pjax:!0},type:"GET",dataType:"html",beforeSend:function(a){c.trigger("start.pjax"),a.setRequestHeader("X-PJAX","true")},error:function(){window.location=b.url},complete:function(){c.trigger("end.pjax")},success:function(e){if(!a.trim(e)||/<html/i.test(e))return window.location=b.url;c.html(e);var f=document.title,g=a.trim(c.find("title").remove().text());g&&(document.title=g);var h={pjax:b.container,timeout:b.timeout},i=a.param(b.data);i!="_pjax=true"&&(h.url=b.url+(/\?/.test(b.url)?"&":"?")+i),b.replace?window.history.replaceState(h,document.title,b.url):b.push&&(a.pjax.active||(window.history.replaceState(a.extend({},h,{url:null}),f),a.pjax.active=!0),window.history.pushState(h,document.title,b.url)),(b.replace||b.push)&&window._gaq&&_gaq.push(["_trackPageview"]);var j=window.location.hash.toString();j!==""&&(window.location.hash="",window.location.hash=j),d.apply(this,arguments)}};b=a.extend(!0,{},e,b),a.isFunction(b.url)&&(b.url=b.url());var f=a.pjax.xhr;return f&&f.readyState<4&&(f.onreadystatechange=a.noop,f.abort()),a.pjax.xhr=a.ajax(b),a(document).trigger("pjax",a.pjax.xhr,b),a.pjax.xhr};var b="state"in window.history,c=location.href;a(window).bind("popstate",function(d){var e=!b&&location.href==c;b=!0;if(e)return;var f=d.state;if(f&&f.pjax){var g=f.pjax;a(g+"").length?a.pjax({url:f.url||location.href,container:g,push:!1,timeout:f.timeout}):window.location=location.href}}),a.inArray("state",a.event.props)<0&&a.event.props.push("state"),a.support.pjax=Boolean(window.history&&window.history.pushState&&window.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(navigator.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(navigator.userAgent)),a.support.pjax||(a.pjax=function(b){window.location=a.isFunction(b.url)?b.url():b.url},a.fn.pjax=function(){return this})}(jQuery),function(a){var b=!1,c=!b,d,e=b,f,g=".pageless",h="scroll"+g,i="resize"+g,j={container:window,currentPage:1,distance:100,pagination:".pagination",params:{},url:location.href,loaderImage:"http://assets.shuffler.fm/assets/static/images/load.gif"},k,l;a.pageless=function(b){a.isFunction(b)?j.call():n(b)};var m=function(){return j.loaderHtml||'<div id="pageless-loader" style="display:none"><img src="http://assets.shuffler.fm/assets/static/images/load.gif" alt="loading more results"> Loading...</div>'},n=function(m){b=!1,c=!b,d,e=b,f,g=".pageless",h="scroll"+g,i="resize"+g,j={container:window,currentPage:1,distance:1e4,pagination:".pagination",params:{},url:location.href,loaderImage:"http://assets.shuffler.fm/assets/static/images/load.gif"},k,l,j.inited=c,m&&a.extend(j,m),k=j.container,l=a(k),j.pagination&&a(j.pagination).remove(),r()};a.fn.pageless=function(b){var c=a(this),e=a(b.loader,c);n(b),d=c,b.loader&&e.length?f=e:(f=a(m()),c.parent("section").after(f))};var o=function(a){(e=a)?f&&f.fadeIn("normal"):f&&f.fadeOut("normal")},p=function(){return k===window?a(document).height()-l.scrollTop()-l.height():l[0].scrollHeight-l.scrollTop()-l.height()},q=function(){l.unbind(g)},r=function(){l.bind(h+" "+i,s).trigger(h)},s=function(){if(j.totalPages<=j.currentPage){q(),j.end&&j.end.call();return}!e&&p()<j.distance&&(o(c),j.currentPage++,a.extend(j.params,{page:j.currentPage}),a.get(j.url,j.params,function(c){a.isFunction(j.scrape)?j.scrape(c):c,d.append(c),o(b),j.complete&&j.complete.call()},"html"))}}(jQuery),function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}};e=typeof exports!="undefined"&&exports!==null?exports:this,a=jQuery,a.fn.extend({chosen:function(c,d){return a(this).each(function(e){if(!a(this).hasClass("chzn-done"))return new b(this,c,d)})}}),b=function(){function b(b){this.set_default_values(),this.form_field=b,this.form_field_jq=a(this.form_field),this.is_multiple=this.form_field.multiple,this.default_text_default=this.form_field.multiple?"Select Some Options":"Select an Option",this.set_up_html(),this.register_observers(),this.form_field_jq.addClass("chzn-done")}return b.prototype.set_default_values=function(){return this.click_test_action=f(function(a){return this.test_active_click(a)},this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.choices=0},b.prototype.set_up_html=function(){var b,c,e,f;return this.container_id=this.form_field.id+"_chzn",this.f_width=this.form_field_jq.width(),this.default_text=this.form_field_jq.attr("title")?this.form_field_jq.attr("title"):this.default_text_default,b=a("<div />",{id:this.container_id,"class":"chzn-container",style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):b.html('<a href="javascript:void(0)" class="chzn-single"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),c=this.container.height(),e=this.f_width-d(this.dropdown),this.dropdown.css({width:e+"px",top:c+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-d(this.search_container)-d(this.search_field),this.search_field.css({width:f+"px"})),this.results_build(),this.set_tab_index()},b.prototype.register_observers=function(){return this.container.click(f(function(a){return this.container_click(a)},this)),this.container.mouseenter(f(function(a){return this.mouse_enter(a)},this)),this.container.mouseleave(f(function(a){return this.mouse_leave(a)},this)),this.search_results.click(f(function(a){return this.search_results_click(a)},this)),this.search_results.mouseover(f(function(a){return this.search_results_mouseover(a)},this)),this.search_results.mouseout(f(function(a){return this.search_results_mouseout(a)},this)),this.form_field_jq.bind("liszt:updated",f(function(a){return this.results_update_field(a)},this)),this.search_field.blur(f(function(a){return this.input_blur(a)},this)),this.search_field.keyup(f(function(a){return this.keyup_checker(a)},this)),this.search_field.keydown(f(function(a){return this.keydown_checker(a)},this)),this.is_multiple?(this.search_choices.click(f(function(a){return this.choices_click(a)},this)),this.search_field.focus(f(function(a){return this.input_focus(a)},this))):this.selected_item.focus(f(function(a){return this.activate_field(a)},this))},b.prototype.container_click=function(b){return b&&b.type==="click"&&b.stopPropagation(),this.pending_destroy_click?this.pending_destroy_click=!1:(this.active_field?!this.is_multiple&&b&&(a(b.target)===this.selected_item||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show()),this.activate_field())},b.prototype.mouse_enter=function(){return this.mouse_on_container=!0},b.prototype.mouse_leave=function(){return this.mouse_on_container=!1},b.prototype.input_focus=function(a){if(!this.active_field)return setTimeout(f(function(){return this.container_click()},this),50)},b.prototype.input_blur=function(a){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(f(function(){return this.blur_test()},this),100)},b.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},b.prototype.close_field=function(){return a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},b.prototype.activate_field=function(){return!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},b.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container.id).length?this.active_field=!0:this.close_field()},b.prototype.results_build=function(){var a,b,d,e,f,g;d=new Date,this.parsing=!0,this.results_data=c.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||this.selected_item.find("span").text(this.default_text),a="",g=this.results_data;for(e=0,f=g.length;e<f;e++)b=g[e],b.group?a+=this.result_add_group(b):b.empty||(a+=this.result_add_option(b),b.selected&&this.is_multiple?this.choice_build(b):b.selected&&!this.is_multiple&&this.selected_item.find("span").text(b.text));return this.show_search_field_default(),this.search_field_scale(),this.search_results.html(a),this.parsing=!1},b.prototype.result_add_group=function(b){return b.disabled?"":(b.dom_id=this.form_field.id+"chzn_g_"+b.array_index,'<li id="'+b.dom_id+'" class="group-result">'+a("<div />").text(b.label).html()+"</li>")},b.prototype.result_add_option=function(b){var c;return b.disabled?"":(b.dom_id=this.form_field.id+"chzn_o_"+b.array_index,c=b.selected&&this.is_multiple?[]:["active-result"],b.selected&&c.push("result-selected"),b.group_array_index!=null&&c.push("group-option"),'<li id="'+b.dom_id+'" class="'+c.join(" ")+'">'+a("<div />").text(b.text).html()+"</li>")},b.prototype.results_update_field=function(){return this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},b.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c<f)return this.search_results.scrollTop(c)}},b.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},b.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},b.prototype.results_show=function(){var a;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),a=this.is_multiple?this.container.height():this.container.height()-1,this.dropdown.css({top:a+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},b.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},b.prototype.set_tab_index=function(a){var b;if(this.form_field_jq.attr("tabindex"))return b=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.is_multiple?this.search_field.attr("tabindex",b):(this.selected_item.attr("tabindex",b),this.search_field.attr("tabindex",-1))},b.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},b.prototype.search_results_click=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c.length)return this.result_highlight=c,this.result_select()},b.prototype.search_results_mouseover=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c)return this.result_do_highlight(c)},b.prototype.search_results_mouseout=function(b){if(a(b.target).hasClass("active-result"))return this.result_clear_highlight()},b.prototype.choices_click=function(b){b.preventDefault();if(this.active_field&&!a(b.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},b.prototype.choice_build=function(b){var c,d;return c=this.form_field.id+"_chzn_c_"+b.array_index,this.choices+=1,this.search_container.before('<li class="search-choice" id="'+c+'"><span>'+b.text+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+b.array_index+'"></a></li>'),d=a("#"+c).find("a").first(),d.click(f(function(a){return this.choice_destroy_link_click(a)},this))},b.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),this.pending_destroy_click=!0,this.choice_destroy(a(b.target))},b.prototype.choice_destroy=function(a){return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel")),a.parents("li").first().remove()},b.prototype.result_select=function(){var a,b,c,d;if(this.result_highlight)return a=this.result_highlight,b=a.attr("id"),this.result_clear_highlight(),a.addClass("result-selected"),this.is_multiple?this.result_deactivate(a):this.result_single_selected=a,d=b.substr(b.lastIndexOf("_")+1),c=this.results_data[d],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.is_multiple?this.choice_build(c):this.selected_item.find("span").first().text(c.text),this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change"),this.search_field_scale()},b.prototype.result_activate=function(a){return a.addClass("active-result").show()},b.prototype.result_deactivate=function(a){return a.removeClass("active-result").hide()},b.prototype.result_deselect=function(b){var c,d;return d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.form_field.id+"chzn_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change"),this.search_field_scale()},b.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},b.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=new Date,this.no_results_clear(),h=0,i=this.search_field.val()===this.default_text?"":a.trim(this.search_field.val()),f=new RegExp("^"+i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),m=new RegExp(i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),r=this.results_data;for(n=0,p=r.length;n<p;n++){c=r[n];if(!c.disabled&&!c.empty)if(c.group)a("#"+c.dom_id).hide();else if(!this.is_multiple||!c.selected){b=!1,g=c.dom_id;if(f.test(c.text))b=!0,h+=1;else if(c.text.indexOf(" ")>=0||c.text.indexOf("[")===0){e=c.text.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o<q;o++)d=e[o],f.test(d)&&(b=!0,h+=1)}b?(i.length?(k=c.text.search(m),l=c.text.substr(0,k+i.length)+"</em>"+c.text.substr(k+i.length),l=l.substr(0,k)+"<em>"+l.substr(k)):l=c.text,a("#"+g).html!==l&&a("#"+g).html(l),this.result_activate(a("#"+g)),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).show()):(this.result_highlight&&g===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(a("#"+g)))}}return h<1&&i.length?this.no_results(i):this.winnow_results_set_highlight()},b.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d<e;d++)b=c[d],b=a(b),f.push(b.hasClass("group-result")?b.show():!this.is_multiple||!b.hasClass("result-selected")?this.result_activate(b):void 0);return f},b.prototype.winnow_results_set_highlight=function(){var a;if(!this.result_highlight){a=this.search_results.find(".active-result").first();if(a)return this.result_do_highlight(a)}},b.prototype.no_results=function(b){var c;return c=a('<li class="no-results">No results match "<span></span>"</li>'),c.find("span").first().text(b),this.search_results.append(c)},b.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},b.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},b.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},b.prototype.keydown_backstroke=function(){return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(this.pending_backstroke=this.search_container.siblings("li.search-choice").last(),this.pending_backstroke.addClass("search-choice-focus"))},b.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},b.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:a.preventDefault();if(this.results_showing)return this.result_select();break;case 27:if(this.results_showing)return this.results_hide();break;case 9:case 38:case 40:case 16:break;default:return this.results_search()}},b.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},b.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i<j;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return c=a("<div />",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height(),this.dropdown.css({top:b+"px"})}},b}(),d=function(a){var b;return b=a.outerWidth()-a.width()},e.get_side_border_padding=d,c=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d<e;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){if(a.nodeName==="OPTION")return a.text!==""?(b!=null&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},a}(),c.select_to_array=function(a){var b,d,e,f,g;d=new c,g=a.childNodes;for(e=0,f=g.length;e<f;e++)b=g[e],d.add_node(b);return d.parsed},e.SelectParser=c}.call(this),function(a){function c(b,c){function bV(a){return function(b){return!this._t||!this._t._a?(this._t&&this._t.sID?e._wD(h+"ignoring "+b.type+": "+this._t.sID):e._wD(h+"ignoring "+b.type),null):a.call(this,b)}}this.flashVersion=8,this.debugMode=!0,this.debugFlash=!1,this.useConsole=!0,this.consoleOnly=!1,this.waitForWindowLoad=!1,this.bgColor="#ffffff",this.useHighPerformance=!1,this.flashPollingInterval=null,this.flashLoadTimeout=1e3,this.wmode=null,this.allowScriptAccess="always",this.useFlashBlock=!1,this.useHTML5Audio=!0,this.html5Test=/^(probably|maybe)$/i,this.preferFlash=!0,this.noSWFCache=!1,this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}},this.defaultOptions={autoLoad:!1,stream:!0,autoPlay:!1,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,type:null,usePolicyFile:!1,volume:100},this.flash9Options={isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.movieID="sm2-container",this.id=c||"sm2movie",this.swfCSS={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20111030",this.version=null,this.movieURL=null,this.url=b||null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.o=null,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.specialWmodeCase=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.hasHTML5=function(){try{return typeof Audio!="undefined"&&typeof (new Audio).canPlayType!="undefined"}catch(a){return!1}}(),this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var d,e=this,f="soundManager",g=f+"::",h="HTML5::",i,j=navigator.userAgent,k=a,l=k.location.href.toString(),m=document,n,o,p,q=[],r=!0,s,t=!1,u=!1,v=!1,w=!1,x=!1,y,z=0,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S=["log","info","warn","error"],T=8,U,V,W,X=null,Y=null,Z,$,_,ba,bb,bc,bd,be,bf=!1,bg=!1,bh
,bi,bj,bk,bl=null,bm,bn,bo,bp,bq,br,bs,bt,bu=Array.prototype.slice,bv=!1,bw,bx,by,bz,bA,bB=j.match(/(ipad|iphone|ipod)/i),bC=j.match(/firefox/i),bD=j.match(/droid/i),bE=j.match(/msie/i),bF=j.match(/webkit/i),bG=j.match(/safari/i)&&!j.match(/chrome/i),bH=j.match(/opera/i),bI=j.match(/(mobile|pre\/|xoom)/i)||bB,bJ=!l.match(/usehtml5audio/i)&&!l.match(/sm2\-ignorebadua/i)&&bG&&j.match(/OS X 10_6_([3-7])/i),bK=typeof console!="undefined"&&typeof console.log!="undefined",bL=typeof m.hasFocus!="undefined"?m.hasFocus():null,bM=bG&&typeof m.hasFocus=="undefined",bN=!bM,bO=/(mp3|mp4|mpa)/i,bP="about:blank",bQ=m.location?m.location.protocol.match(/http/i):null,bR=bQ?"":"http://",bS=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|mp4v|3gp|3g2)\s*(?:$|;)/i,bT=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","mp4v","3gp","3g2"],bU=new RegExp("\\.("+bT.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!bQ,this._global_a=null,bI&&(e.useHTML5Audio=!0,e.preferFlash=!1,bB&&(e.ignoreFlash=!0,bv=!0)),this.ok=function(){return bl?v&&!w:e.useHTML5Audio&&e.hasHTML5},this.supported=this.ok,this.getMovie=function(a){return i(a)||m[a]||k[a]},this.createSound=function(a){function i(){return c=bb(c),e.sounds[h.id]=new d(h),e.soundIDs.push(h.id),e.sounds[h.id]}var b=f+".createSound(): ",c=null,g=null,h=null;return!v||!e.ok()?(bd(b+Z(v?"notOK":"notReady")),!1):(arguments.length===2&&(a={id:arguments[0],url:arguments[1]}),c=B(a),h=c,h.id.toString().charAt(0).match(/^[0-9]$/)&&e._wD(b+Z("badID",h.id),2),e._wD(b+h.id+" ("+h.url+")",1),be(h.id,!0)?(e._wD(b+h.id+" exists",1),e.sounds[h.id]):(bn(h)?(g=i(),e._wD("Loading sound "+h.id+" via HTML5"),g._setup_html5(h)):(p>8&&(h.isMovieStar===null&&(h.isMovieStar=h.serverURL||(h.type?h.type.match(bS):!1)||h.url.match(bU)),h.isMovieStar&&e._wD(b+"using MovieStar handling"),h.isMovieStar&&(h.usePeakData&&(y("noPeak"),h.usePeakData=!1),h.loops>1&&y("noNSLoop"))),h=bc(h,b),g=i(),p===8?e.o._createSound(h.id,h.loops||1,h.usePolicyFile):(e.o._createSound(h.id,h.url,h.usePeakData,h.useWaveformData,h.useEQData,h.isMovieStar,h.isMovieStar?h.bufferTime:!1,h.loops||1,h.serverURL,h.duration||null,h.autoPlay,!0,h.autoLoad,h.usePolicyFile),h.serverURL||(g.connected=!0,h.onconnect&&h.onconnect.apply(g))),!h.serverURL&&(h.autoLoad||h.autoPlay)&&g.load(h)),!h.serverURL&&h.autoPlay&&g.play(),g))},this.destroySound=function(a,b){if(!be(a))return!1;var c=e.sounds[a],d;c._iO={},c.stop(),c.unload();for(d=0;d<e.soundIDs.length;d++)if(e.soundIDs[d]===a){e.soundIDs.splice(d,1);break}return b||c.destruct(!0),c=null,delete e.sounds[a],!0},this.load=function(a,b){return be(a)?e.sounds[a].load(b):!1},this.unload=function(a){return be(a)?e.sounds[a].unload():!1},this.onposition=function(a,b,c,d){return be(a)?e.sounds[a].onposition(b,c,d):!1},this.play=function(a,b){var c=f+".play(): ";return!v||!e.ok()?(bd(c+Z(v?"notOK":"notReady")),!1):be(a)?e.sounds[a].play(b):(b instanceof Object||(b={url:b}),b&&b.url?(e._wD(c+'attempting to create "'+a+'"',1),b.id=a,e.createSound(b).play()):!1)},this.start=this.play,this.setPosition=function(a,b){return be(a)?e.sounds[a].setPosition(b):!1},this.stop=function(a){return be(a)?(e._wD(f+".stop("+a+")",1),e.sounds[a].stop()):!1},this.stopAll=function(){var a;e._wD(f+".stopAll()",1);for(a in e.sounds)e.sounds.hasOwnProperty(a)&&e.sounds[a].stop()},this.pause=function(a){return be(a)?e.sounds[a].pause():!1},this.pauseAll=function(){var a;for(a=e.soundIDs.length;a--;)e.sounds[e.soundIDs[a]].pause()},this.resume=function(a){return be(a)?e.sounds[a].resume():!1},this.resumeAll=function(){var a;for(a=e.soundIDs.length;a--;)e.sounds[e.soundIDs[a]].resume()},this.togglePause=function(a){return be(a)?e.sounds[a].togglePause():!1},this.setPan=function(a,b){return be(a)?e.sounds[a].setPan(b):!1},this.setVolume=function(a,b){return be(a)?e.sounds[a].setVolume(b):!1},this.mute=function(a){var b=f+".mute(): ",c=0;typeof a!="string"&&(a=null);if(!a){e._wD(b+"Muting all sounds");for(c=e.soundIDs.length;c--;)e.sounds[e.soundIDs[c]].mute();return e.muted=!0,!0}return be(a)?(e._wD(b+'Muting "'+a+'"'),e.sounds[a].mute()):!1},this.muteAll=function(){e.mute()},this.unmute=function(a){var b=f+".unmute(): ",c;typeof a!="string"&&(a=null);if(!a){e._wD(b+"Unmuting all sounds");for(c=e.soundIDs.length;c--;)e.sounds[e.soundIDs[c]].unmute();return e.muted=!1,!0}return be(a)?(e._wD(b+'Unmuting "'+a+'"'),e.sounds[a].unmute()):!1},this.unmuteAll=function(){e.unmute()},this.toggleMute=function(a){return be(a)?e.sounds[a].toggleMute():!1},this.getMemoryUse=function(){var a=0;return e.o&&p!==8&&(a=parseInt(e.o._getMemoryUse(),10)),a},this.disable=function(a){var b;typeof a=="undefined"&&(a=!1);if(w)return!1;w=!0,y("shutdown",1);for(b=e.soundIDs.length;b--;)U(e.sounds[e.soundIDs[b]]);return A(a),bt.remove(k,"load",E),!0},this.canPlayMIME=function(a){var b;return e.hasHTML5&&(b=bo({type:a})),!bl||b?b:a?!!((p>8?a.match(bS):null)||a.match(e.mimePattern)):null},this.canPlayURL=function(a){var b;return e.hasHTML5&&(b=bo({url:a})),!bl||b?b:a?!!a.match(e.filePattern):null},this.canPlayLink=function(a){return typeof a.type!="undefined"&&a.type&&e.canPlayMIME(a.type)?!0:e.canPlayURL(a.href)},this.getSoundById=function(a,b){if(!a)throw new Error(f+".getSoundById(): sID is null/undefined");var c=e.sounds[a];return!c&&!b&&e._wD('"'+a+'" is an invalid sound ID.',2),c},this.onready=function(a,b){var c="onready";if(a&&a instanceof Function)return v&&e._wD(Z("queue",c)),b||(b=k),C(c,a,b),D(),!0;throw Z("needFunction",c)},this.ontimeout=function(a,b){var c="ontimeout";if(a&&a instanceof Function)return v&&e._wD(Z("queue",c)),b||(b=k),C(c,a,b),D({type:c}),!0;throw Z("needFunction",c)},this._writeDebug=function(a,b,c){var d="soundmanager-debug",f,g,h;if(!e.debugMode)return!1;typeof c!="undefined"&&c&&(a=a+" | "+(new Date).getTime());if(bK&&e.useConsole){h=S[b],typeof console[h]!="undefined"?console[h](a):console.log(a);if(e.useConsoleOnly)return!0}try{f=i(d);if(!f)return!1;g=m.createElement("div"),++z%2===0&&(g.className="sm2-alt"),typeof b=="undefined"?b=0:b=parseInt(b,10),g.appendChild(m.createTextNode(a)),b&&(b>=2&&(g.style.fontWeight="bold"),b===3&&(g.style.color="#ff3333")),f.insertBefore(g,f.firstChild)}catch(j){}return f=null,!0},this._wD=this._writeDebug,this._debug=function(){var a,b;y("currentObj",1);for(a=0,b=e.soundIDs.length;a<b;a++)e.sounds[e.soundIDs[a]]._debug()},this.reboot=function(){e._wD(f+".reboot()"),e.soundIDs.length&&e._wD("Destroying "+e.soundIDs.length+" SMSound objects...");var a,b;for(a=e.soundIDs.length;a--;)e.sounds[e.soundIDs[a]].destruct();try{bE&&(Y=e.o.innerHTML),X=e.o.parentNode.removeChild(e.o),e._wD("Flash movie removed.")}catch(c){y("badRemove",2)}Y=X=bl=null,e.enabled=M=v=bf=bg=t=u=w=e.swfLoaded=!1,e.soundIDs=e.sounds=[],e.o=null;for(a in q)if(q.hasOwnProperty(a))for(b=q[a].length;b--;)q[a][b].fired=!1;e._wD(f+": Rebooting..."),k.setTimeout(e.beginDelayedInit,20)},this.getMoviePercent=function(){return e.o&&typeof e.o.PercentLoaded!="undefined"?e.o.PercentLoaded():null},this.beginDelayedInit=function(){x=!0,L(),setTimeout(function(){return bg?!1:(O(),K(),bg=!0,!0)},20),F()},this.destruct=function(){e._wD(f+".destruct()"),e.disable(!0)},d=function(a){var b=this,c,d,f;this.sID=a.id,this.url=a.url,this.options=B(a),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this._lastURL=null,this.isHTML5=!1,this._a=null,this.id3={},this._debug=function(){if(e.debugMode){var a=null,c=[],d,f,g=64;for(a in b.options)b.options[a]!==null&&(b.options[a]instanceof Function?(d=b.options[a].toString(),d=d.replace(/\s\s+/g," "),f=d.indexOf("{"),c.push(" "+a+": {"+d.substr(f+1,Math.min(Math.max(d.indexOf("\n")-1,g),g)).replace(/\n/g,"")+"... }")):c.push(" "+a+": "+b.options[a]));e._wD("SMSound() merged options: {\n"+c.join(", \n")+"\n}")}},this._debug(),this.load=function(a){var c=null;typeof a!="undefined"?(b._iO=B(a,b.options),b.instanceOptions=b._iO):(a=b.options,b._iO=a,b.instanceOptions=b._iO,b._lastURL&&b._lastURL!==b.url&&(y("manURL"),b._iO.url=b.url,b.url=null)),b._iO.url||(b._iO.url=b.url),e._wD("SMSound.load(): "+b._iO.url,1);if(b._iO.url===b.url&&b.readyState!==0&&b.readyState!==2)return y("onURL",1),b;b._lastURL=b.url,b.loaded=!1,b.readyState=1,b.playState=0;if(bn(b._iO))c=b._setup_html5(b._iO),c._called_load?e._wD(h+"ignoring request to load again: "+b.sID):(e._wD(h+"load: "+b.sID),b._html5_canplay=!1,c.load(),c._called_load=!0,b._iO.autoPlay&&b.play());else try{b.isHTML5=!1,b._iO=bc(bb(b._iO)),p===8?e.o._load(b.sID,b._iO.url,b._iO.stream,b._iO.autoPlay,b._iO.whileloading?1:0,b._iO.loops||1,b._iO.usePolicyFile):e.o._load(b.sID,b._iO.url,!!b._iO.stream,!!b._iO.autoPlay,b._iO.loops||1,!!b._iO.autoLoad,b._iO.usePolicyFile)}catch(d){y("smError",2),s("onload",!1),P({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}return b},this.unload=function(){return b.readyState!==0&&(e._wD('SMSound.unload(): "'+b.sID+'"'),b.isHTML5?(d(),b._a&&(b._a.pause(),bq(b._a))):p===8?e.o._unload(b.sID,bP):e.o._unload(b.sID),c()),b},this.destruct=function(a){e._wD('SMSound.destruct(): "'+b.sID+'"'),b.isHTML5?(d(),b._a&&(b._a.pause(),bq(b._a),bv||b._remove_html5_events(),b._a._t=null,b._a=null)):(b._iO.onfailure=null,e.o._destroySound(b.sID)),a||e.destroySound(b.sID,!0)},this.play=function(a,c){var d="SMSound.play(): ",g,h;c=c===undefined?!0:c,a||(a={}),b._iO=B(a,b._iO),b._iO=B(b._iO,b.options),b.instanceOptions=b._iO;if(b._iO.serverURL&&!b.connected)return b.getAutoPlay()||(e._wD(d+" Netstream not connected yet - setting autoPlay"),b.setAutoPlay(!0)),b;bn(b._iO)&&(b._setup_html5(b._iO),f());if(b.playState===1&&!b.paused){g=b._iO.multiShot;if(!g)return e._wD(d+'"'+b.sID+'" already playing (one-shot)',1),b;e._wD(d+'"'+b.sID+'" already playing (multi-shot)',1)}if(!b.loaded)if(b.readyState===0)e._wD(d+'Attempting to load "'+b.sID+'"',1),b.isHTML5||(b._iO.autoPlay=!0),b.load(b._iO);else{if(b.readyState===2)return e._wD(d+'Could not load "'+b.sID+'" - exiting',2),b;e._wD(d+'"'+b.sID+'" is loading - attempting to play..',1)}else e._wD(d+'"'+b.sID+'"');return!b.isHTML5&&p===9&&b.position>0&&b.position===b.duration&&(e._wD(d+'"'+b.sID+'": Sound at end, resetting to position:0'),b._iO.position=0),b.paused&&b.position&&b.position>0?(e._wD(d+'"'+b.sID+'" is resuming from paused state',1),b.resume()):(e._wD(d+'"'+b.sID+'" is starting to play'),b.playState=1,b.paused=!1,(!b.instanceCount||b._iO.multiShotEvents||!b.isHTML5&&p>8&&!b.getAutoPlay())&&b.instanceCount++,b.position=typeof b._iO.position!="undefined"&&!isNaN(b._iO.position)?b._iO.position:0,b.isHTML5||(b._iO=bc(bb(b._iO))),b._iO.onplay&&c&&(b._iO.onplay.apply(b),b._onplay_called=!0),b.setVolume(b._iO.volume,!0),b.setPan(b._iO.pan,!0),b.isHTML5?(f(),h=b._setup_html5(),b.setPosition(b._iO.position),h.play()):e.o._start(b.sID,b._iO.loops||1,p===9?b._iO.position:b._iO.position/1e3)),b},this.start=this.play,this.stop=function(a){return b.playState===1&&(b._onbufferchange(0),b.resetOnPosition(0),b.paused=!1,b.isHTML5||(b.playState=0),b._iO.onstop&&b._iO.onstop.apply(b),b.isHTML5?b._a&&(b.setPosition(0),b._a.pause(),b.playState=0,b._onTimer(),d()):(e.o._stop(b.sID,a),b._iO.serverURL&&b.unload()),b.instanceCount=0,b._iO={}),b},this.setAutoPlay=function(a){e._wD("sound "+b.sID+" turned autoplay "+(a?"on":"off")),b._iO.autoPlay=a,b.isHTML5||(e.o._setAutoPlay(b.sID,a),a&&!b.instanceCount&&b.readyState===1&&(b.instanceCount++,e._wD("sound "+b.sID+" incremented instance count to "+b.instanceCount)))},this.getAutoPlay=function(){return b._iO.autoPlay},this.setPosition=function(a){a===undefined&&(a=0);var c,d,f,g=b.isHTML5?Math.max(a,0):Math.min(b.duration||b._iO.duration,Math.max(a,0));c=b.position,b.position=g,f=b.position/1e3,b.resetOnPosition(b.position),b._iO.position=g;if(!b.isHTML5)d=p===9?b.position:f,b.readyState&&b.readyState!==2&&e.o._setPosition(b.sID,d,b.paused||!b.playState);else if(b._a)if(b._html5_canplay){if(b._a.currentTime!==f){e._wD("setPosition("+f+"): setting position");try{b._a.currentTime=f,(b.playState===0||b.paused)&&b._a.pause()}catch(h){e._wD("setPosition("+f+"): setting position failed: "+h.message,2)}}}else e._wD("setPosition("+f+"): delaying, sound not ready");return b.isHTML5&&b.paused&&b._onTimer(!0),b},this.pause=function(a){return b.paused||b.playState===0&&b.readyState!==1?b:(e._wD("SMSound.pause()"),b.paused=!0,b.isHTML5?(b._setup_html5().pause(),d()):(a||a===undefined)&&e.o._pause(b.sID),b._iO.onpause&&b._iO.onpause.apply(b),b)},this.resume=function(){return b.paused?(e._wD("SMSound.resume()"),b.paused=!1,b.playState=1,b.isHTML5?(b._setup_html5().play(),f()):(b._iO.isMovieStar&&b.setPosition(b.position),e.o._pause(b.sID)),!b._onplay_called&&b._iO.onplay?(b._iO.onplay.apply(b),b._onplay_called=!0):b._iO.onresume&&b._iO.onresume.apply(b),b):b},this.togglePause=function(){return e._wD("SMSound.togglePause()"),b.playState===0?(b.play({position:p===9&&!b.isHTML5?b.position:b.position/1e3}),b):(b.paused?b.resume():b.pause(),b)},this.setPan=function(a,c){return typeof a=="undefined"&&(a=0),typeof c=="undefined"&&(c=!1),b.isHTML5||e.o._setPan(b.sID,a),b._iO.pan=a,c||(b.pan=a,b.options.pan=a),b},this.setVolume=function(a,c){return typeof a=="undefined"&&(a=100),typeof c=="undefined"&&(c=!1),b.isHTML5?b._a&&(b._a.volume=Math.max(0,Math.min(1,a/100))):e.o._setVolume(b.sID,e.muted&&!b.muted||b.muted?0:a),b._iO.volume=a,c||(b.volume=a,b.options.volume=a),b},this.mute=function(){return b.muted=!0,b.isHTML5?b._a&&(b._a.muted=!0):e.o._setVolume(b.sID,0),b},this.unmute=function(){b.muted=!1;var a=typeof b._iO.volume!="undefined";return b.isHTML5?b._a&&(b._a.muted=!1):e.o._setVolume(b.sID,a?b._iO.volume:b.options.volume),b},this.toggleMute=function(){return b.muted?b.unmute():b.mute()},this.onposition=function(a,c,d){return b._onPositionItems.push({position:a,method:c,scope:typeof d!="undefined"?d:b,fired:!1}),b},this.processOnPosition=function(){var a,c,d=b._onPositionItems.length;if(!d||!b.playState||b._onPositionFired>=d)return!1;for(a=d;a--;)c=b._onPositionItems[a],!c.fired&&b.position>=c.position&&(c.fired=!0,e._onPositionFired++,c.method.apply(c.scope,[c.position]));return!0},this.resetOnPosition=function(a){var c,d,f=b._onPositionItems.length;if(!f)return!1;for(c=f;c--;)d=b._onPositionItems[c],d.fired&&a<=d.position&&(d.fired=!1,e._onPositionFired--);return!0},f=function(){b.isHTML5&&bj(b)},d=function(){b.isHTML5&&bk(b)},c=function(){b._onPositionItems=[],b._onPositionFired=0,b._hasTimer=null,b._onplay_called=!1,b._a=null,b._html5_canplay=!1,b.bytesLoaded=null,b.bytesTotal=null,b.position=null,b.duration=b._iO&&b._iO.duration?b._iO.duration:null,b.durationEstimate=null,b.failures=0,b.loaded=!1,b.playState=0,b.paused=!1,b.readyState=0,b.muted=!1,b.isBuffering=!1,b.instanceOptions={},b.instanceCount=0,b.peakData={left:0,right:0},b.waveformData={left:[],right:[]},b.eqData=[],b.eqData.left=[],b.eqData.right=[]},c(),this._onTimer=function(a){var c,d={};if(b._hasTimer||a)return b._a&&(a||(b.playState>0||b.readyState===1)&&!b.paused)?(b.duration=b._get_html5_duration(),b.durationEstimate=b.duration,c=b._a.currentTime?b._a.currentTime*1e3:0,b._whileplaying(c,d,d,d,d),!0):(e._wD('_onTimer: Warn for "'+b.sID+'": '+(b._a?"":"Could not find element. ")+(b.playState===0?"playState bad, 0?":"playState = "+b.playState+", OK")),!1)},this._get_html5_duration=function(){var a=b._a?b._a.duration*1e3:b._iO?b._iO.duration:undefined,c=a&&!isNaN(a)&&a!==Infinity?a:b._iO?b._iO.duration:null;return c},this._setup_html5=function(a){var d=B(b._iO,a),f=decodeURI,g=bv?e._global_a:b._a,h=f(d.url),i=g&&g._t?g._t.instanceOptions:null;if(g){if(g._t&&i.url===d.url&&(!b._lastURL||b._lastURL===i.url))return g;e._wD("setting new URL on existing object: "+h+(b._lastURL?", old URL: "+b._lastURL:"")),bv&&g._t&&g._t.playState&&d.url!==i.url&&g._t.stop(),c(),g.src=d.url,b.url=d.url,b._lastURL=d.url,g._called_load=!1}else e._wD("creating HTML5 Audio() element with URL: "+h),g=new Audio(d.url),g._called_load=!1,bD&&(g._called_load=!0),bv&&(e._global_a=g);return b.isHTML5=!0,b._a=g,g._t=b,b._add_html5_events(),g.loop=d.loops>1?"loop":"",d.autoLoad||d.autoPlay?(g.autobuffer="auto",g.preload="auto",b.load(),g._called_load=!0):(g.autobuffer=!1,g.preload="none"),g.loop=d.loops>1?"loop":"",g},this._add_html5_events=function(){function c(a,c,d){return b._a?b._a.addEventListener(a,c,d||!1):null}if(b._a._added_events)return!1;var a;e._wD(h+"adding event listeners: "+b.sID),b._a._added_events=!0;for(a in bz)bz.hasOwnProperty(a)&&c(a,bz[a]);return!0},this._remove_html5_events=function(){function c(a,c,d){return b._a?b._a.removeEventListener(a,c,d||!1):null}var a;e._wD(h+"removing event listeners: "+b.sID),b._a._added_events=!1;for(a in bz)bz.hasOwnProperty(a)&&c(a,bz[a])},this._onload=function(a){var c="SMSound._onload(): ",d=!!a;return e._wD(c+'"'+b.sID+'"'+(d?" loaded.":" failed to load? - "+b.url),d?1:2),!d&&!b.isHTML5&&(e.sandbox.noRemote===!0&&e._wD(c+Z("noNet"),1),e.sandbox.noLocal===!0&&e._wD(c+Z("noLocal"),1)),b.loaded=d,b.readyState=d?3:2,b._onbufferchange(0),b._iO.onload&&b._iO.onload.apply(b,[d]),!0},this._onbufferchange=function(a){var c="SMSound._onbufferchange()";return b.playState===0?!1:a&&b.isBuffering||!a&&!b.isBuffering?!1:(b.isBuffering=a===1,b._iO.onbufferchange&&(e._wD(c+": "+a),b._iO.onbufferchange.apply(b)),!0)},this._onsuspend=function(){return b._iO.onsuspend&&(e._wD("SMSound._onsuspend()"),b._iO.onsuspend.apply(b)),!0},this._onfailure=function(a,c,d){b.failures++,e._wD('SMSound._onfailure(): "'+b.sID+'" count '+b.failures),b._iO.onfailure&&b.failures===1?b._iO.onfailure(b,a,c,d):e._wD("SMSound._onfailure(): ignoring")},this._onfinish=function(){var a=b._iO.onfinish;b._onbufferchange(0),b.resetOnPosition(0),b.instanceCount&&(b.instanceCount--,b.instanceCount||(b.playState=0,b.paused=!1,b.instanceCount=0,b.instanceOptions={},b._iO={},d()),(!b.instanceCount||b._iO.multiShotEvents)&&a&&(e._wD('SMSound._onfinish(): "'+b.sID+'"'),a.apply(b)))},this._whileloading=function(a,c,d,e){b.bytesLoaded=a,b.bytesTotal=c,b.duration=Math.floor(d),b.bufferLength=e,b._iO.isMovieStar?(b.durationEstimate=b.duration,b.readyState!==3&&b._iO.whileloading&&b._iO.whileloading.apply(b)):(b._iO.duration?b.durationEstimate=b.duration>b._iO.duration?b.duration:b._iO.duration:b.durationEstimate=parseInt(b.bytesTotal/b.bytesLoaded*b.duration,10),b.durationEstimate===undefined&&(b.durationEstimate=b.duration),b.readyState!==3&&b._iO.whileloading&&b._iO.whileloading.apply(b))},this._whileplaying=function(a,c,d,e,f){if(isNaN(a)||a===null)return!1;b.position=a,b.processOnPosition();if(!b.isHTML5&&p>8){b._iO.usePeakData&&typeof c!="undefined"&&c&&(b.peakData={left:c.leftPeak,right:c.rightPeak}),b._iO.useWaveformData&&typeof d!="undefined"&&d&&(b.waveformData={left:d.split(","),right:e.split(",")});if(b._iO.useEQData&&typeof f!="undefined"&&f&&f.leftEQ){var g=f.leftEQ.split(",");b.eqData=g,b.eqData.left=g,typeof f.rightEQ!="undefined"&&f.rightEQ&&(b.eqData.right=f.rightEQ.split(","))}}return b.playState===1&&(!b.isHTML5&&p===8&&!b.position&&b.isBuffering&&b._onbufferchange(0),b._iO.whileplaying&&b._iO.whileplaying.apply(b)),!0},this._onid3=function(a,c){e._wD('SMSound._onid3(): "'+this.sID+'" ID3 data received.');var d=[],f,g;for(f=0,g=a.length;f<g;f++)d[a[f]]=c[f];b.id3=B(b.id3,d),b._iO.onid3&&b._iO.onid3.apply(b)},this._onconnect=function(a){var c="SMSound._onconnect(): ";a=a===1,e._wD(c+'"'+b.sID+'"'+(a?" connected.":" failed to connect? - "+b.url),a?1:2),b.connected=a,a&&(b.failures=0,be(b.sID)&&(b.getAutoPlay()?b.play(undefined,b.getAutoPlay()):b._iO.autoLoad&&b.load()),b._iO.onconnect&&b._iO.onconnect.apply(b,[a]))},this._ondataerror=function(a){b.playState>0&&(e._wD("SMSound._ondataerror(): "+a),b._iO.ondataerror&&b._iO.ondataerror.apply(b))}},N=function(){return m.body||m._docElement||m.getElementsByTagName("div")[0]},i=function(a){return m.getElementById(a)},B=function(a,b){var c={},d,f,g;for(d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);f=typeof b=="undefined"?e.defaultOptions:b;for(g in f)f.hasOwnProperty(g)&&typeof c[g]=="undefined"&&(c[g]=f[g]);return c},bt=function(){function c(b){var c=bu.call(b),d=c.length;return a?(c[1]="on"+c[1],d>3&&c.pop()):d===3&&c.push(!1),c}function d(c,d){var e=c.shift(),f=[b[d]];a?e[f](c[0],c[1]):e[f].apply(e,c)}function e(){d(c(arguments),"add")}function f(){d(c(arguments),"remove")}var a=k.attachEvent,b={add:a?"attachEvent":"addEventListener",remove:a?"detachEvent":"removeEventListener"};return{add:e,remove:f}}(),bz={abort:bV(function(a){e._wD(h+"abort: "+this._t.sID)}),canplay:bV(function(a){if(this._t._html5_canplay)return!0;this._t._html5_canplay=!0,e._wD(h+"canplay: "+this._t.sID+", "+this._t.url),this._t._onbufferchange(0);var b=isNaN(this._t.position)?null:this._t.position/1e3;if(this._t.position&&this.currentTime!==b){e._wD(h+"canplay: setting position to "+b);try{this.currentTime=b}catch(c){e._wD(h+"setting position failed: "+c.message,2)}}}),load:bV(function(a){this._t.loaded||(this._t._onbufferchange(0),this._t._whileloading(this._t.bytesTotal,this._t.bytesTotal,this._t._get_html5_duration()),this._t._onload(!0))}),emptied:bV(function(a){e._wD(h+"emptied: "+this._t.sID)}),ended:bV(function(a){e._wD(h+"ended: "+this._t.sID),this._t._onfinish()}),error:bV(function(a){e._wD(h+"error: "+this.error.code),this._t._onload(!1)}),loadeddata:bV(function(a){var b=this._t,c=b.bytesTotal||1;e._wD(h+"loadeddata: "+this._t.sID),!b._loaded&&!bG&&(b.duration=b._get_html5_duration(),b._whileloading(c,c,b._get_html5_duration()),b._onload(!0))}),loadedmetadata:bV(function(a){e._wD(h+"loadedmetadata: "+this._t.sID)}),loadstart:bV(function(a){e._wD(h+"loadstart: "+this._t.sID),this._t._onbufferchange(1)}),play:bV(function(a){e._wD(h+"play: "+this._t.sID+", "+this._t.url),this._t._onbufferchange(0)}),playing:bV(function(a){e._wD(h+"playing: "+this._t.sID+", "+this._t.url),this._t._onbufferchange(0)}),progress:bV(function(a){if(this._t.loaded)return!1;var b,c,d,f=0,g=a.type==="progress",i=a.target.buffered,j=a.loaded||0,k=a.total||1;if(i&&i.length){for(b=i.length;b--;)f=i.end(b)-i.start(b);j=f/a.target.duration;if(g&&i.length>1){d=[],c=i.length;for(b=0;b<c;b++)d.push(a.target.buffered.start(b)+"-"+a.target.buffered.end(b));e._wD(h+"progress: timeRanges: "+d.join(", "))}g&&!isNaN(j)&&e._wD(h+"progress: "+this._t.sID+": "+Math.floor(j*100)+"% loaded")}isNaN(j)||(this._t._onbufferchange(0),this._t._whileloading(j,k,this._t._get_html5_duration()),j&&k&&j===k&&bz.load.call(this,a))}),ratechange:bV(function(a){e._wD(h+"ratechange: "+this._t.sID)}),suspend:bV(function(a){e._wD(h+"suspend: "+this._t.sID),bz.progress.call(this,a),this._t._onsuspend()}),stalled:bV(function(a){e._wD(h+"stalled: "+this._t.sID)}),timeupdate:bV(function(a){this._t._onTimer()}),waiting:bV(function(a){e._wD(h+"waiting: "+this._t.sID),this._t._onbufferchange(1)})},bn=function(a){return!a.serverURL&&(a.type?bo({type:a.type}):bo({url:a.url})||e.html5Only)},bq=function(a){a&&(a.src=bC?"":bP)},bo=function(a){function j(a){return e.preferFlash&&bw&&!e.ignoreFlash&&typeof e.flash[a]!="undefined"&&e.flash[a]}if(!e.useHTML5Audio||!e.hasHTML5)return!1;var b=a.url||null,c=a.type||null,d=e.audioFormats,f,g,h,i;if(c&&e.html5[c]!=="undefined")return e.html5[c]&&!j(c);if(!bp){bp=[];for(i in d)d.hasOwnProperty(i)&&(bp.push(i),d[i].related&&(bp=bp.concat(d[i].related)));bp=new RegExp("\\.("+bp.join("|")+")(\\?.*)?$","i")}h=b?b.toLowerCase().match(bp):null;if(!h||!h.length){if(!c)return!1;g=c.indexOf(";"),h=(g!==-1?c.substr(0,g):c).substr(6)}else h=h[1];return h&&typeof e.html5[h]!="undefined"?e.html5[h]&&!j(h):(c="audio/"+h,f=e.html5.canPlayType({type:c}),e.html5[h]=f,f&&e.html5[c]&&!j(c))},bs=function(){function g(b){var c,d,f,g=!1;if(!a||typeof a.canPlayType!="function")return!1;if(b instanceof Array){for(d=0,f=b.length;d<f&&!g;d++)if(e.html5[b[d]]||a.canPlayType(b[d]).match(e.html5Test))g=!0,e.html5[b[d]]=!0,e.flash[b[d]]=!!(e.preferFlash&&bw&&b[d].match(bO));return g}return c=a&&typeof a.canPlayType=="function"?a.canPlayType(b):!1,!!c&&!!c.match(e.html5Test)}if(!e.useHTML5Audio||typeof Audio=="undefined")return!1;var a=typeof Audio!="undefined"?bH?new Audio(null):new Audio:null,b,c={},d,f;d=e.audioFormats;for(b in d)if(d.hasOwnProperty(b)){c[b]=g(d[b].type),c["audio/"+b]=c[b],e.preferFlash&&!e.ignoreFlash&&b.match(bO)?e.flash[b]=!0:e.flash[b]=!1;if(d[b]&&d[b].related)for(f=d[b].related.length;f--;)c["audio/"+d[b].related[f]]=c[b],e.html5[d[b].related[f]]=c[b],e.flash[d[b].related[f]]=c[b]}return c.canPlayType=a?g:null,e.html5=B(e.html5,c),!0},J={notReady:"Not loaded yet - wait for soundManager.onload()/onready()",notOK:"Audio support is not available.",domError:g+"createMovie(): appendChild/innerHTML call failed. DOM not ready or other error.",spcWmode:g+"createMovie(): Removing wmode, preventing known SWF loading issue(s)",swf404:f+": Verify that %s is a valid path.",tryDebug:"Try "+f+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:f+": Non-HTTP page ("+m.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:f+": Special case: Waiting for focus-related event..",waitImpatient:f+": Getting impatient, still waiting for Flash%s...",waitForever:f+": Waiting indefinitely for Flash (will recover if unblocked)...",needFunction:f+": Function object expected for %s",badID:'Warning: Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:"--- "+f+"._debug(): Current sound objects ---",waitEI:g+"initMovie(): Waiting for ExternalInterface call from Flash..",waitOnload:f+": Waiting for window.onload()",docLoaded:f+": Document already loaded",onload:g+"initComplete(): calling soundManager.onload()",onloadOK:f+".onload() complete",init:g+"init()",didInit:g+"init(): Already called?",flashJS:f+": Attempting to call Flash from JS..",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:"Warning: Failed to remove flash movie.",noPeak:"Warning: peakData features unsupported for movieStar formats",shutdown:f+".disable(): Shutting down",queue:f+": Queueing %s handler",smFail:f+": Failed to initialise.",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+e.swfCSS.swfTimedout+" CSS..",fbLoaded:"Flash loaded",fbHandler:g+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:f+".load(): current URL already assigned.",badFV:f+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",mfOn:"mobileFlash::enabling on-screen flash repositioning",policy:"Enabling usePolicyFile for data access"},Z=function(){var a=bu.call(arguments),b=a.shift(),c=J&&J[b]?J[b]:"",d,e;if(c&&a&&a.length)for(d=0,e=a.length;d<e;d++)c=c.replace("%s",a[d]);return c},bb=function(a){return p===8&&a.loops>1&&a.stream&&(y("as2loop"),a.stream=!1),a},bc=function(a,b){return a&&!a.usePolicyFile&&(a.onid3||a.usePeakData||a.useWaveformData||a.useEQData)&&(e._wD((b||"")+Z("policy")),a.usePolicyFile=!0),a},bd=function(a){typeof console!="undefined"&&typeof console.warn!="undefined"?console.warn(a):e._wD(a)},n=function(){return!1},U=function(a){var b;for(b in a)a.hasOwnProperty(b)&&typeof a[b]=="function"&&(a[b]=n);b=null},V=function(a){typeof a=="undefined"&&(a=!1);if(w||a)y("smFail",2),e.disable(a)},W=function(a){var b=null,c;if(a)if(a.match(/\.swf(\?.*)?$/i)){b=a.substr(a.toLowerCase().lastIndexOf(".swf?")+4);if(b)return a}else a.lastIndexOf("/")!==a.length-1&&(a+="/");return c=(a&&a.lastIndexOf("/")!==-1?a.substr(0,a.lastIndexOf("/")+1):"./")+e.movieURL,e.noSWFCache&&(c+="?ts="+(new Date).getTime()),c},H=function(){p=parseInt(e.flashVersion,10),p!==8&&p!==9&&(e._wD(Z("badFV",p,T)),e.flashVersion=p=T);var a=e.debugMode||e.debugFlash?"_debug.swf":".swf";e.useHTML5Audio&&!e.html5Only&&e.audioFormats.mp4.required&&p<9&&(e._wD(Z("needfl9")),e.flashVersion=p=9),e.version=e.versionNumber+(e.html5Only?" (HTML5-only mode)":p===9?" (AS3/Flash 9)":" (AS2/Flash 8)"),p>8?(e.defaultOptions=B(e.defaultOptions,e.flash9Options),e.features.buffering=!0,e.defaultOptions=B(e.defaultOptions,e.movieStarOptions),e.filePatterns.flash9=new RegExp("\\.(mp3|"+bT.join("|")+")(\\?.*)?$","i"),e.features.movieStar=!0):e.features.movieStar=!1,e.filePattern=e.filePatterns[p!==8?"flash9":"flash8"],e.movieURL=(p===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",a),e.features.peakData=e.features.waveformData=e.features.eqData=p>8},Q=function(a,b){if(!e.o)return!1;e.o._setPolling(a,b)},R=function(){e.debugURLParam.test(l)&&(e.debugMode=!0);if(i(e.debugID))return!1;var a,b,c,d,f;if(e.debugMode&&!i(e.debugID)&&(!bK||!e.useConsole||e.useConsole&&bK&&!e.consoleOnly)){a=m.createElement("div"),a.id=e.debugID+"-toggle",d={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},a.appendChild(m.createTextNode("-")),a.onclick=ba,a.title="Toggle SM2 debug console",j.match(/msie 6/i)&&(a.style.position="absolute",a.style.cursor="hand");for(f in d)d.hasOwnProperty(f)&&(a.style[f]=d[f]);b=m.createElement("div"),b.id=e.debugID,b.style.display=e.debugMode?"block":"none";if(e.debugMode&&!i(a.id)){try{c=N(),c.appendChild(a)}catch(g){throw new Error(Z("domError")+" \n"+g.toString())}c.appendChild(b)}}c=null},be=this.getSoundById,y=function(a,b){return a?e._wD(Z(a),b):""},l.indexOf("sm2-debug=alert")+1&&e.debugMode&&(e._wD=function(b){a.alert(b)}),ba=function(){var a=i(e.debugID),b=i(e.debugID+"-toggle");if(!a)return!1;r?(b.innerHTML="+",a.style.display="none"):(b.innerHTML="-",a.style.display="block"),r=!r},s=function(a,b,c){if(typeof sm2Debugger!="undefined")try{sm2Debugger.handleEvent(a,b,c)}catch(d){}return!0},_=function(){var a=[];return e.debugMode&&a.push(e.swfCSS.sm2Debug),e.debugFlash&&a.push(e.swfCSS.flashDebug),e.useHighPerformance&&a.push(e.swfCSS.highPerf),a.join(" ")},$=function(){var a=Z("fbHandler"),b=e.getMoviePercent(),c=e.swfCSS,d={type:"FLASHBLOCK"};if(e.html5Only)return!1;e.ok()?(e.didFlashBlock&&e._wD(a+": Unblocked"),e.oMC&&(e.oMC.className=[_(),c.swfDefault,c.swfLoaded+(e.didFlashBlock?" "+c.swfUnblocked:"")].join(" "))):(bl&&(e.oMC.className=_()+" "+c.swfDefault+" "+(b===null?c.swfTimedout:c.swfError),e._wD(a+": "+Z("fbTimeout")+(b?" ("+Z("fbLoaded")+")":""))),e.didFlashBlock=!0,D({type:"ontimeout",ignoreInit:!0,error:d}),P(d))},C=function(a,b,c){typeof q[a]=="undefined"&&(q[a]=[]),q[a].push({method:b,scope:c||null,fired:!1})},D=function(a){a||(a={type:"onready"});if(!v&&a&&!a.ignoreInit)return!1;if(a.type==="ontimeout"&&e.ok())return!1;var b={success:a&&a.ignoreInit?e.ok():!w},c=a&&a.type?q[a.type]||[]:[],d=[],g,h,i=[b],j=bl&&e.useFlashBlock&&!e.ok();a.error&&(i[0].error=a.error);for(g=0,h=c.length;g<h;g++)c[g].fired!==!0&&d.push(c[g]);if(d.length){e._wD(f+": Firing "+d.length+" "+a.type+"() item"+(d.length===1?"":"s"));for(g=0,h=d.length;g<h;g++)d[g].scope?d[g].method.apply(d[g].scope,i):d[g].method.apply(this,i),j||(d[g].fired=!0)}return!0},E=function(){k.setTimeout(function(){e.useFlashBlock&&$(),D(),e.onload instanceof Function&&(y("onload",1),e.onload.apply(k),y("onloadOK",1)),e.waitForWindowLoad&&bt.add(k,"load",E)},1)},bx=function(){if(bw!==undefined)return bw;var a=!1,b=navigator,c=b.plugins,d,e,f,g=k.ActiveXObject;if(c&&c.length)e="application/x-shockwave-flash",f=b.mimeTypes,f&&f[e]&&f[e].enabledPlugin&&f[e].enabledPlugin.description&&(a=!0);else if(typeof g!="undefined"){try{d=new g("ShockwaveFlash.ShockwaveFlash")}catch(h){}a=!!d}return bw=a,a},bm=function(){var a,b,c=bB&&!!j.match(/os (1|2|3_0|3_1)/i);if(c)return e.hasHTML5=!1,e.html5Only=!0,e.oMC&&(e.oMC.style.display="none"),!1;if(!e.useHTML5Audio)return!0;if(!e.html5||!e.html5.canPlayType)return e._wD("SoundManager: No HTML5 Audio() support detected."),e.hasHTML5=!1,!0;e.hasHTML5=!0;if(bJ){e._wD(g+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(bw?"will use flash fallback for MP3/MP4, if available"
:" would use flash fallback for MP3/MP4, but none detected."),1);if(bx())return!0}for(b in e.audioFormats)e.audioFormats.hasOwnProperty(b)&&(e.audioFormats[b].required&&!e.html5.canPlayType(e.audioFormats[b].type)||e.flash[b]||e.flash[e.audioFormats[b].type])&&(a=!0);return e.ignoreFlash&&(a=!1),e.html5Only=e.hasHTML5&&e.useHTML5Audio&&!a,!e.html5Only},bj=function(a){a._hasTimer||(a._hasTimer=!0)},bk=function(a){a._hasTimer&&(a._hasTimer=!1)},P=function(a){a=typeof a!="undefined"?a:{},e.onerror instanceof Function&&e.onerror.apply(k,[{type:typeof a.type!="undefined"?a.type:null}]),typeof a.fatal!="undefined"&&a.fatal&&e.disable()},by=function(){if(!bJ||!bx())return!1;var a=e.audioFormats,b,c;for(c in a)if(a.hasOwnProperty(c))if(c==="mp3"||c==="mp4"){e._wD(f+": Using flash fallback for "+c+" format"),e.html5[c]=!1;if(a[c]&&a[c].related)for(b=a[c].related.length;b--;)e.html5[a[c].related[b]]=!1}},this._setSandboxType=function(a){var b=e.sandbox;b.type=a,b.description=b.types[typeof b.types[a]!="undefined"?a:"unknown"],e._wD("Flash security sandbox type: "+b.type),b.type==="localWithFile"?(b.noRemote=!0,b.noLocal=!1,y("secNote",2)):b.type==="localWithNetwork"?(b.noRemote=!1,b.noLocal=!0):b.type==="localTrusted"&&(b.noRemote=!1,b.noLocal=!1)},this._externalInterfaceOK=function(a){if(e.swfLoaded)return!1;var b=(new Date).getTime();e._wD(g+"externalInterfaceOK()"+(a?" (~"+(b-a)+" ms)":"")),s("swf",!0),s("flashtojs",!0),e.swfLoaded=!0,bM=!1,bJ&&by(),bE?setTimeout(o,100):o()},O=function(a,b){function c(){e._wD("-- SoundManager 2 "+e.version+(!e.html5Only&&e.useHTML5Audio?e.hasHTML5?" + HTML5 audio":", no HTML5 audio support":"")+(e.html5Only?"":(e.useHighPerformance?", high performance mode, ":", ")+((e.flashPollingInterval?"custom ("+e.flashPollingInterval+"ms)":"normal")+" polling")+(e.wmode?", wmode: "+e.wmode:"")+(e.debugFlash?", flash debug mode":"")+(e.useFlashBlock?", flashBlock mode":""))+" --",1)}function C(a,b){return'<param name="'+a+'" value="'+b+'" />'}if(t&&u)return!1;if(e.html5Only)return H(),c(),e.oMC=i(e.movieID),o(),t=!0,u=!0,!1;var d=b||e.url,f=e.altURL||d,h="JS/Flash audio component (SoundManager 2)",k,l,n=N(),p,q,r,s=_(),v,w,x,z="auto",A=null,B=m.getElementsByTagName("html")[0];A=B&&B.dir&&B.dir.match(/rtl/i),a=typeof a=="undefined"?e.id:a,H(),e.url=W(bQ?d:f),b=e.url,e.wmode=!e.wmode&&e.useHighPerformance?"transparent":e.wmode,e.wmode!==null&&(j.match(/msie 8/i)||!bE&&!e.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(e.specialWmodeCase=!0,y("spcWmode"),e.wmode=null),k={name:a,id:a,src:b,width:z,height:z,quality:"high",allowScriptAccess:e.allowScriptAccess,bgcolor:e.bgColor,pluginspage:bR+"www.macromedia.com/go/getflashplayer",title:h,type:"application/x-shockwave-flash",wmode:e.wmode,hasPriority:"true"},e.debugFlash&&(k.FlashVars="debug=1"),e.wmode||delete k.wmode;if(bE)l=m.createElement("div"),q=['<object id="'+a+'" data="'+b+'" type="'+k.type+'" title="'+k.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+bR+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+k.width+'" height="'+k.height+'">',C("movie",b),C("AllowScriptAccess",e.allowScriptAccess),C("quality",k.quality),e.wmode?C("wmode",e.wmode):"",C("bgcolor",e.bgColor),C("hasPriority","true"),e.debugFlash?C("FlashVars",k.FlashVars):"","</object>"].join("");else{l=m.createElement("embed");for(p in k)k.hasOwnProperty(p)&&l.setAttribute(p,k[p])}R(),s=_(),n=N();if(n){e.oMC=i(e.movieID)||m.createElement("div");if(!e.oMC.id){e.oMC.id=e.movieID,e.oMC.className=e.swfCSS.swfDefault+" "+s,v=null,r=null,e.useFlashBlock||(e.useHighPerformance?v={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(v={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},A&&(v.left=Math.abs(parseInt(v.left,10))+"px"))),bF&&(e.oMC.style.zIndex=1e4);if(!e.debugFlash)for(w in v)v.hasOwnProperty(w)&&(e.oMC.style[w]=v[w]);try{bE||e.oMC.appendChild(l),n.appendChild(e.oMC),bE&&(r=e.oMC.appendChild(m.createElement("div")),r.className=e.swfCSS.swfBox,r.innerHTML=q),u=!0}catch(D){throw new Error(Z("domError")+" \n"+D.toString())}}else x=e.oMC.className,e.oMC.className=(x?x+" ":e.swfCSS.swfDefault)+(s?" "+s:""),e.oMC.appendChild(l),bE&&(r=e.oMC.appendChild(m.createElement("div")),r.className=e.swfCSS.swfBox,r.innerHTML=q),u=!0}return t=!0,c(),e._wD(g+"createMovie(): Trying to load "+b+(!bQ&&e.altURL?" (alternate URL)":""),1),!0},K=function(){return e.html5Only?(O(),!1):e.o?!1:(e.o=e.getMovie(e.id),e.o||(X?(bE?e.oMC.innerHTML=Y:e.oMC.appendChild(X),X=null,t=!0):O(e.id,e.url),e.o=e.getMovie(e.id)),e.o&&y("waitEI"),e.oninitmovie instanceof Function&&setTimeout(e.oninitmovie,1),!0)},F=function(){setTimeout(G,1e3)},G=function(){if(bf)return!1;bf=!0,bt.remove(k,"load",F);if(bM&&!bL)return y("waitFocus"),!1;var a;v||(a=e.getMoviePercent(),e._wD(Z("waitImpatient",a===100?" (SWF loaded)":a>0?" (SWF "+a+"% loaded)":""))),setTimeout(function(){a=e.getMoviePercent(),v||(e._wD(f+": No Flash response within expected time.\nLikely causes: "+(a===0?"Loading "+e.movieURL+" may have failed (and/or Flash "+p+"+ not present?), ":"")+"Flash blocked or JS-Flash security error."+(e.debugFlash?" "+Z("checkSWF"):""),2),!bQ&&a&&(y("localFail",2),e.debugFlash||y("tryDebug",2)),a===0&&e._wD(Z("swf404",e.url)),s("flashtojs",!1,": Timed out"+bQ?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)")),!v&&bN&&(a===null?e.useFlashBlock||e.flashLoadTimeout===0?(e.useFlashBlock&&$(),y("waitForever")):V(!0):e.flashLoadTimeout===0?y("waitForever"):V(!0))},e.flashLoadTimeout)},I=function(){function a(){bt.remove(k,"focus",I),bt.remove(k,"load",I)}return bL||!bM?(a(),!0):(bN=!0,bL=!0,e._wD(g+"handleFocus()"),bG&&bM&&bt.remove(k,"mousemove",I),bf=!1,a(),!0)},bA=function(){var a,b=[];if(e.useHTML5Audio&&e.hasHTML5){for(a in e.audioFormats)e.audioFormats.hasOwnProperty(a)&&b.push(a+": "+e.html5[a]+(!e.html5[a]&&bw&&e.flash[a]?" (using flash)":e.preferFlash&&e.flash[a]&&bw?" (preferring flash)":e.html5[a]?"":" ("+(e.audioFormats[a].required?"required, ":"")+"and no flash support)"));e._wD("-- SoundManager 2: HTML5 support tests ("+e.html5Test+"): "+b.join(", ")+" --",1)}},A=function(a){if(v)return!1;if(e.html5Only)return e._wD("-- SoundManager 2: loaded --"),v=!0,E(),s("onload",!0),!0;var b=e.useFlashBlock&&e.flashLoadTimeout&&!e.getMoviePercent(),c;return b||(v=!0,w&&(c={type:!bw&&bl?"NO_FLASH":"INIT_TIMEOUT"})),e._wD("-- SoundManager 2 "+(w?"failed to load":"loaded")+" ("+(w?"security/load error":"OK")+") --",1),w||a?(e.useFlashBlock&&e.oMC&&(e.oMC.className=_()+" "+(e.getMoviePercent()===null?e.swfCSS.swfTimedout:e.swfCSS.swfError)),D({type:"ontimeout",error:c}),s("onload",!1),P(c),!1):(s("onload",!0),e.waitForWindowLoad&&!x?(y("waitOnload"),bt.add(k,"load",E),!1):(e.waitForWindowLoad&&x&&y("docLoaded"),E(),!0))},o=function(){function a(){bt.remove(k,"load",e.beginDelayedInit)}y("init");if(v)return y("didInit"),!1;if(e.html5Only)return v||(a(),e.enabled=!0,A()),!0;K();try{y("flashJS"),e.o._externalInterfaceTest(!1),Q(!0,e.flashPollingInterval||(e.useHighPerformance?10:50)),e.debugMode||e.o._disableDebug(),e.enabled=!0,s("jstoflash",!0),e.html5Only||bt.add(k,"unload",n)}catch(b){return e._wD("js/flash exception: "+b.toString()),s("jstoflash",!1),P({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),V(!0),A(),!1}return A(),a(),!0},L=function(){return M?!1:(M=!0,R(),function(){var a="sm2-usehtml5audio=",b=l.toLowerCase(),c=null,d="sm2-preferflash=",f=null,g=typeof console!="undefined"&&typeof console.log!="undefined";b.indexOf(a)!==-1&&(c=b.charAt(b.indexOf(a)+a.length)==="1",g&&console.log((c?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter"),e.useHTML5Audio=c),b.indexOf(d)!==-1&&(f=b.charAt(b.indexOf(d)+d.length)==="1",g&&console.log((f?"Enabling ":"Disabling ")+"preferFlash via URL parameter"),e.preferFlash=f)}(),!bw&&e.hasHTML5&&(e._wD("SoundManager: No Flash detected"+(e.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5.")),e.useHTML5Audio=!0,e.preferFlash=!1),bs(),e.html5.usingFlash=bm(),bl=e.html5.usingFlash,bA(),!bw&&bl&&(e._wD("SoundManager: Fatal error: Flash is needed to play some required formats, but is not available."),e.flashLoadTimeout=1),m.removeEventListener&&m.removeEventListener("DOMContentLoaded",L,!1),K(),!0)},br=function(){return m.readyState==="complete"&&(L(),m.detachEvent("onreadystatechange",br)),!0},bx(),bt.add(k,"focus",I),bt.add(k,"load",I),bt.add(k,"load",F),bG&&bM&&bt.add(k,"mousemove",I),m.addEventListener?m.addEventListener("DOMContentLoaded",L,!1):m.attachEvent?m.attachEvent("onreadystatechange",br):(s("onload",!1),P({type:"NO_DOM2_EVENTS",fatal:!0})),m.readyState==="complete"&&setTimeout(L,100)}var b=null;if(typeof SM2_DEFER=="undefined"||!SM2_DEFER)b=new c;a.SoundManager=c,a.soundManager=b}(window);var swfobject=function(){function A(){if(t)return;try{var a=i.getElementsByTagName("body")[0].appendChild(Q("span"));a.parentNode.removeChild(a)}catch(b){return}t=!0;var c=l.length;for(var d=0;d<c;d++)l[d]()}function B(a){t?a():l[l.length]=a}function C(b){if(typeof h.addEventListener!=a)h.addEventListener("load",b,!1);else if(typeof i.addEventListener!=a)i.addEventListener("load",b,!1);else if(typeof h.attachEvent!=a)R(h,"onload",b);else if(typeof h.onload=="function"){var c=h.onload;h.onload=function(){c(),b()}}else h.onload=b}function D(){k?E():F()}function E(){var c=i.getElementsByTagName("body")[0],d=Q(b);d.setAttribute("type",e);var f=c.appendChild(d);if(f){var g=0;(function(){if(typeof f.GetVariable!=a){var b=f.GetVariable("$version");b&&(b=b.split(" ")[1].split(","),y.pv=[parseInt(b[0],10),parseInt(b[1],10),parseInt(b[2],10)])}else if(g<10){g++,setTimeout(arguments.callee,10);return}c.removeChild(d),f=null,F()})()}else F()}function F(){var b=m.length;if(b>0)for(var c=0;c<b;c++){var d=m[c].id,e=m[c].callbackFn,f={success:!1,id:d};if(y.pv[0]>0){var g=P(d);if(g)if(S(m[c].swfVersion)&&!(y.wk&&y.wk<312))U(d,!0),e&&(f.success=!0,f.ref=G(d),e(f));else if(m[c].expressInstall&&H()){var h={};h.data=m[c].expressInstall,h.width=g.getAttribute("width")||"0",h.height=g.getAttribute("height")||"0",g.getAttribute("class")&&(h.styleclass=g.getAttribute("class")),g.getAttribute("align")&&(h.align=g.getAttribute("align"));var i={},j=g.getElementsByTagName("param"),k=j.length;for(var l=0;l<k;l++)j[l].getAttribute("name").toLowerCase()!="movie"&&(i[j[l].getAttribute("name")]=j[l].getAttribute("value"));I(h,i,d,e)}else J(g),e&&e(f)}else{U(d,!0);if(e){var n=G(d);n&&typeof n.SetVariable!=a&&(f.success=!0,f.ref=n),e(f)}}}}function G(c){var d=null,e=P(c);if(e&&e.nodeName=="OBJECT")if(typeof e.SetVariable!=a)d=e;else{var f=e.getElementsByTagName(b)[0];f&&(d=f)}return d}function H(){return!u&&S("6.0.65")&&(y.win||y.mac)&&!(y.wk&&y.wk<312)}function I(b,c,d,e){u=!0,r=e||null,s={success:!1,id:d};var g=P(d);if(g){g.nodeName=="OBJECT"?(p=K(g),q=null):(p=g,q=d),b.id=f;if(typeof b.width==a||!/%$/.test(b.width)&&parseInt(b.width,10)<310)b.width="310";if(typeof b.height==a||!/%$/.test(b.height)&&parseInt(b.height,10)<137)b.height="137";i.title=i.title.slice(0,47)+" - Flash Player Installation";var j=y.ie&&y.win?"ActiveX":"PlugIn",k="MMredirectURL="+h.location.toString().replace(/&/g,"%26")+"&MMplayerType="+j+"&MMdoctitle="+i.title;typeof c.flashvars!=a?c.flashvars+="&"+k:c.flashvars=k;if(y.ie&&y.win&&g.readyState!=4){var l=Q("div");d+="SWFObjectNew",l.setAttribute("id",d),g.parentNode.insertBefore(l,g),g.style.display="none",function(){g.readyState==4?g.parentNode.removeChild(g):setTimeout(arguments.callee,10)}()}L(b,c,d)}}function J(a){if(y.ie&&y.win&&a.readyState!=4){var b=Q("div");a.parentNode.insertBefore(b,a),b.parentNode.replaceChild(K(a),b),a.style.display="none",function(){a.readyState==4?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)}()}else a.parentNode.replaceChild(K(a),a)}function K(a){var c=Q("div");if(y.win&&y.ie)c.innerHTML=a.innerHTML;else{var d=a.getElementsByTagName(b)[0];if(d){var e=d.childNodes;if(e){var f=e.length;for(var g=0;g<f;g++)(e[g].nodeType!=1||e[g].nodeName!="PARAM")&&e[g].nodeType!=8&&c.appendChild(e[g].cloneNode(!0))}}}return c}function L(c,d,f){var g,h=P(f);if(y.wk&&y.wk<312)return g;if(h){typeof c.id==a&&(c.id=f);if(y.ie&&y.win){var i="";for(var j in c)c[j]!=Object.prototype[j]&&(j.toLowerCase()=="data"?d.movie=c[j]:j.toLowerCase()=="styleclass"?i+=' class="'+c[j]+'"':j.toLowerCase()!="classid"&&(i+=" "+j+'="'+c[j]+'"'));var k="";for(var l in d)d[l]!=Object.prototype[l]&&(k+='<param name="'+l+'" value="'+d[l]+'" />');h.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+k+"</object>",n[n.length]=c.id,g=P(c.id)}else{var m=Q(b);m.setAttribute("type",e);for(var o in c)c[o]!=Object.prototype[o]&&(o.toLowerCase()=="styleclass"?m.setAttribute("class",c[o]):o.toLowerCase()!="classid"&&m.setAttribute(o,c[o]));for(var p in d)d[p]!=Object.prototype[p]&&p.toLowerCase()!="movie"&&M(m,p,d[p]);h.parentNode.replaceChild(m,h),g=m}}return g}function M(a,b,c){var d=Q("param");d.setAttribute("name",b),d.setAttribute("value",c),a.appendChild(d)}function N(a){var b=P(a);b&&b.nodeName=="OBJECT"&&(y.ie&&y.win?(b.style.display="none",function(){b.readyState==4?O(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))}function O(a){var b=P(a);if(b){for(var c in b)typeof b[c]=="function"&&(b[c]=null);b.parentNode.removeChild(b)}}function P(a){var b=null;try{b=i.getElementById(a)}catch(c){}return b}function Q(a){return i.createElement(a)}function R(a,b,c){a.attachEvent(b,c),o[o.length]=[a,b,c]}function S(a){var b=y.pv,c=a.split(".");return c[0]=parseInt(c[0],10),c[1]=parseInt(c[1],10)||0,c[2]=parseInt(c[2],10)||0,b[0]>c[0]||b[0]==c[0]&&b[1]>c[1]||b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]?!0:!1}function T(c,d,e,f){if(y.ie&&y.mac)return;var g=i.getElementsByTagName("head")[0];if(!g)return;var h=e&&typeof e=="string"?e:"screen";f&&(v=null,w=null);if(!v||w!=h){var j=Q("style");j.setAttribute("type","text/css"),j.setAttribute("media",h),v=g.appendChild(j),y.ie&&y.win&&typeof i.styleSheets!=a&&i.styleSheets.length>0&&(v=i.styleSheets[i.styleSheets.length-1]),w=h}y.ie&&y.win?v&&typeof v.addRule==b&&v.addRule(c,d):v&&typeof i.createTextNode!=a&&v.appendChild(i.createTextNode(c+" {"+d+"}"))}function U(a,b){if(!x)return;var c=b?"visible":"hidden";t&&P(a)?P(a).style.visibility=c:T("#"+a,"visibility:"+c)}function V(b){var c=/[\\\"<>\.;]/,d=c.exec(b)!=null;return d&&typeof encodeURIComponent!=a?encodeURIComponent(b):b}var a="undefined",b="object",c="Shockwave Flash",d="ShockwaveFlash.ShockwaveFlash",e="application/x-shockwave-flash",f="SWFObjectExprInst",g="onreadystatechange",h=window,i=document,j=navigator,k=!1,l=[D],m=[],n=[],o=[],p,q,r,s,t=!1,u=!1,v,w,x=!0,y=function(){var f=typeof i.getElementById!=a&&typeof i.getElementsByTagName!=a&&typeof i.createElement!=a,g=j.userAgent.toLowerCase(),l=j.platform.toLowerCase(),m=l?/win/.test(l):/win/.test(g),n=l?/mac/.test(l):/mac/.test(g),o=/webkit/.test(g)?parseFloat(g.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,p=!1,q=[0,0,0],r=null;if(typeof j.plugins!=a&&typeof j.plugins[c]==b)r=j.plugins[c].description,r&&(typeof j.mimeTypes==a||!j.mimeTypes[e]||!!j.mimeTypes[e].enabledPlugin)&&(k=!0,p=!1,r=r.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),q[0]=parseInt(r.replace(/^(.*)\..*$/,"$1"),10),q[1]=parseInt(r.replace(/^.*\.(.*)\s.*$/,"$1"),10),q[2]=/[a-zA-Z]/.test(r)?parseInt(r.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof h.ActiveXObject!=a)try{var s=new ActiveXObject(d);s&&(r=s.GetVariable("$version"),r&&(p=!0,r=r.split(" ")[1].split(","),q=[parseInt(r[0],10),parseInt(r[1],10),parseInt(r[2],10)]))}catch(t){}return{w3:f,pv:q,wk:o,ie:p,win:m,mac:n}}(),z=function(){if(!y.w3)return;(typeof i.readyState!=a&&i.readyState=="complete"||typeof i.readyState==a&&(i.getElementsByTagName("body")[0]||i.body))&&A(),t||(typeof i.addEventListener!=a&&i.addEventListener("DOMContentLoaded",A,!1),y.ie&&y.win&&(i.attachEvent(g,function(){i.readyState=="complete"&&(i.detachEvent(g,arguments.callee),A())}),h==top&&function(){if(t)return;try{i.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}A()}()),y.wk&&function(){if(t)return;if(!/loaded|complete/.test(i.readyState)){setTimeout(arguments.callee,0);return}A()}(),C(A))}(),W=function(){y.ie&&y.win&&window.attachEvent("onunload",function(){var a=o.length;for(var b=0;b<a;b++)o[b][0].detachEvent(o[b][1],o[b][2]);var c=n.length;for(var d=0;d<c;d++)N(n[d]);for(var e in y)y[e]=null;y=null;for(var f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(a,b,c,d){if(y.w3&&a&&b){var e={};e.id=a,e.swfVersion=b,e.expressInstall=c,e.callbackFn=d,m[m.length]=e,U(a,!1)}else d&&d({success:!1,id:a})},getObjectById:function(a){if(y.w3)return G(a)},embedSWF:function(c,d,e,f,g,h,i,j,k,l){var m={success:!1,id:d};y.w3&&!(y.wk&&y.wk<312)&&c&&d&&e&&f&&g?(U(d,!1),B(function(){e+="",f+="";var n={};if(k&&typeof k===b)for(var o in k)n[o]=k[o];n.data=c,n.width=e,n.height=f;var p={};if(j&&typeof j===b)for(var q in j)p[q]=j[q];if(i&&typeof i===b)for(var r in i)typeof p.flashvars!=a?p.flashvars+="&"+r+"="+i[r]:p.flashvars=r+"="+i[r];if(S(g)){var s=L(n,p,d);n.id==d&&U(d,!0),m.success=!0,m.ref=s}else{if(h&&H()){n.data=h,I(n,p,d,l);return}U(d,!0)}l&&l(m)})):l&&l(m)},switchOffAutoHideShow:function(){x=!1},ua:y,getFlashPlayerVersion:function(){return{major:y.pv[0],minor:y.pv[1],release:y.pv[2]}},hasFlashPlayerVersion:S,createSWF:function(a,b,c){return y.w3?L(a,b,c):undefined},showExpressInstall:function(a,b,c,d){y.w3&&H()&&I(a,b,c,d)},removeSWF:function(a){y.w3&&N(a)},createCSS:function(a,b,c,d){y.w3&&T(a,b,c,d)},addDomLoadEvent:B,addLoadEvent:C,getQueryParamValue:function(a){var b=i.location.search||i.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return V(b);var c=b.split("&");for(var d=0;d<c.length;d++)if(c[d].substring(0,c[d].indexOf("="))==a)return V(c[d].substring(c[d].indexOf("=")+1))}return""},expressInstallCallback:function(){if(u){var a=P(f);a&&p&&(a.parentNode.replaceChild(p,a),q&&(U(q,!0),y.ie&&y.win&&(p.style.display="block")),r&&r(s)),u=!1}}}}();typeof Airbrake!="undefined"&&(Airbrake.old_notify=Airbrake.notify,Airbrake.notify=function(a){a.message.match(/Error loading script/i)||Airbrake.old_notify(a)});if(!window.console)if(window.opera){console={};var logMethod=function(a){return function(b){window.opera.postError("["+a+"] "+b)}},list=["log","debug","info","warn","error"];list.forEach(function(a){window.console[a]=logMethod(a)})}else console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){}};(function(a){a.fn.addEventListener=function(b,c,d,e){if(arguments.length<2)return;var f=c;return arguments.length>2&&(f=a.proxy(c,d)),this.each(function(){a(this).bind(b,e,f)})}})(jQuery),typeof SHUFFLER=="undefined"&&(SHUFFLER={}),SHUFFLER.root_url=null,SHUFFLER.ShufflerTrack={},function(){var a=SHUFFLER.following_blogs={};a.add=function(a,b){var c=null,d="Before you can start following blogs you need to login";if(SHUFFLER.current_user)c=SHUFFLER.current_user.id;else return SHUFFLER.playerUi.openJoin(d);$.ajax({type:"POST",url:user_following_blogs_path(c,".json"),data:{id:a},success:function(e){if(e.status=="error")(e.data=="not_logged"||c==null)&&SHUFFLER.playerUi.openJoin(d);else{b();var f=jQuery.Event("shuffler.following_blogs.add");f.feed_id=a,$(document).trigger(f)}},cache:!1,error:function(a,b,c){console.debug(a),console.debug(c),console.debug(b)}})},a.remove=function(a,b){$.ajax({type:"POST",url:user_following_blog_path(SHUFFLER.current_user.id,a,".json"),data:{_method:"delete"},success:function(c){b();var d=jQuery.Event("shuffler.following_blogs.remove");d.feed_id=a,$(document).trigger(d)},cache:!1,error:function(a,b,c){console.debug(a),console.debug(c),console.debug(b)}})},a.member=function(a,b){SHUFFLER.current_user?$.ajax({type:"GET",url:user_following_blog_path(SHUFFLER.current_user.id,a,".json"),data:{},success:function(a){b(a.status!="error")},cache:!1,error:function(a,c,d){b(!1)}}):b(!1)},a.uiWatchFollowables=function(){$(".followable").live("click",function(b){b.preventDefault(),b.stopPropagation();var c=$(this),d=$(this).attr("data-id");c.hasClass("following")?a.remove(d,function(){c.removeClass("following"),c.addClass("notfollowing"),c.attr("title","Follow this blog")}):a.add(d,function(){c.removeClass("notfollowing"),c.addClass("following"),c.attr("title","Unfollow this blog")})}).bind("mouseover",function(){$(this).parent().parent().parent().addClass("cancelhover")}).mouseout(function(){$(this).parent().parent().parent().removeClass("cancelhover")})}}(),function(){var a=SHUFFLER.favorites={};a.add=function(a,b){var c=null,d="Before you can start favoriting you need to login";if(SHUFFLER.current_user)c=SHUFFLER.current_user.id;else return SHUFFLER.playerUi.openJoin(d);$.ajax({type:"POST",url:user_favorites_path(c,".json"),data:{id:a},success:function(e){if(e.status=="error")(e.data=="not_logged"||c==null)&&SHUFFLER.playerUi.openJoin(d);else{b();var f=jQuery.Event("shuffler.favorites.add");f.track_id=a,$(document).trigger(f)}},cache:!1,error:function(a,b,c){console.debug(a),console.debug(c),console.debug(b)}})},a.remove=function(a,b){$.ajax({type:"POST",url:user_favorite_path(SHUFFLER.current_user.id,a,".json"),data:{_method:"delete"},success:function(c){b();var d=jQuery.Event("shuffler.favorites.remove");d.track_id=a,$(document).trigger(d)},cache:!1,error:function(a,b,c){console.debug(a),console.debug(c),console.debug(b)}})},a.show=function(a,b){$.ajax({type:"GET",url:user_favorite_path(SHUFFLER.current_user.id,a,""),data:{},success:function(a){b(a)},cache:!1,error:function(a,c,d){console.debug(a),console.debug(d),console.debug(c),b("")}})},a.member=function(a,b){SHUFFLER.current_user?$.ajax({type:"GET",url:user_favorite_path(SHUFFLER.current_user.id,a,".json"),data:{},success:function(a){b(a.status!="error")},cache:!1,error:function(a,c,d){b(!1)}}):b(!1)},a.uiWatchFavoritables=function(){$(".favoritable").live("click",function(b){b.preventDefault(),b.stopPropagation();var c=$(this),d=$(this).attr("data-id");c.hasClass("favorite")?a.remove(d,function(){c.removeClass("favorite"),c.addClass("nonfavorite")}):a.add(d,function(){c.removeClass("nonfavorite"),c.addClass("favorite")})})}}(),function(){SHUFFLER.PlayerController={};var a=SHUFFLER.PlayerController;a.init=function(){$.param.fragment.ajaxCrawlable(!0),a.currentTrack=null,SHUFFLER.playerUi.initUI(),a.addBindings(),$.bbq.getState("track")&&(SHUFFLER.playerUi.getChannelSelector(),a.onHashChangeHandler())},a.addBindings=function(){$(SHUFFLER.AudioPlayer).bind("playback.end",function(){a.onAudioPlayerPlaybackEndHandler()}),$(SHUFFLER.playerUi).bind("button.next",function(){a.onAudioPlayerPlaybackEndHandler()}),$(SHUFFLER.playerUi).bind("button.prev",function(){a.onPlayerUiButtonPrevHandler()})},a.onHashChangeHandler=function(){a.playId($.bbq.getState("track"),function(){a.prefetchNextTrack()})},a.onAudioPlayerPlaybackEndHandler=function(){SHUFFLER.playerUi.disableTrackControls=!0,SHUFFLER.Channel.nextTrack(a.currentTrack,function(b){$.bbq.pushState(a.buildURLObjectFromTrack(b)),a.onHashChangeHandler(),SHUFFLER.playerUi.disableTrackControls=!1})},a.onPlayerUiButtonPrevHandler=function(){SHUFFLER.playerUi.disableTrackControls=!0,SHUFFLER.Channel.previousTrack(a.currentTrack,function(b){$.bbq.pushState(a.buildURLObjectFromTrack(b)),a.onHashChangeHandler(),SHUFFLER.playerUi.disableTrackControls=!1})},a.playId=function(b,c){var d=SHUFFLER.Channel.findTrack(b);d?(a.playTrack(d),c()):(SHUFFLER.playerUi.disableTrackControls=!0,SHUFFLER.Channel.fetchTrack(b,function(b){a.playTrack(b),SHUFFLER.playerUi.disableTrackControls=!1,c()}))},a.playTrack=function(b){a.currentTrack&&SHUFFLER.AudioPlayer.player.stop(),b=SHUFFLER.Track.addPlayerInfo(b),a.currentTrack=b,SHUFFLER.ShufflerTrack=b,SHUFFLER.AudioPlayer.play(b),a.notifyExfm(),SHUFFLER.scrobbler.playing(),SHUFFLER.playerUi.updateUi(a.buildURLObjectFromURL()),a.recheckAddToPersonalChannelButton(),a.recheckAddToFavButton(),$(document).trigger($.Event("newTrackPlaying"))},a.prefetchNextTrack=function(){SHUFFLER.Channel.nextTrack(a.currentTrack,function(a){$('link[rel="prefetch"]').attr("href",a.permalink),$('link[rel="prerender"]').attr("href",a.permalink)})},a.notifyExfm=function(){$("audio").attr({src:a.currentTrack.location,artist:a.currentTrack.artist,songtitle:a.currentTrack.title});try{$("audio").attr("mediumimage",a.currentTrack.images[0].src)}catch(b){}$(document).trigger($.Event("exfmSongsAsyncEvent"))},a.buildURLObjectFromTrack=function(a){return{track:a.id,channel:$.bbq.getState("channel"),position:a.position}},a.buildURLObjectFromURL=function(){return{track:$.bbq.getState("track"),channel:$.bbq.getState("channel"),position:$.bbq.getState("position")}},a.recheckAddToPersonalChannelButton=function(){SHUFFLER.following_blogs.member(SHUFFLER.ShufflerTrack.feed_id,function(b){var c=b?"remove":"add";a.updateFavChannelButton(c)})},a.updateFavChannelButton=function(a){$("#addfavchannel").removeClass().addClass(a),a==="remove"?$("#addfavchannel").attr("title","Remove this blog"):$("#addfavchannel").attr("title","Add this blog")},a.recheckAddToFavButton=function(){SHUFFLER.favorites.member(SHUFFLER.ShufflerTrack.id,function(b){var c=b?"remove":"add";a.updateFavoriteButton(c)})},a.updateFavoriteButton=function(a){$("#favorite").removeClass().addClass(a),a==="remove"?$("#favorite").attr("title","Unfavorite this track"):$("#favorite").attr("title","Favorite this track")}}(),function(){function b(a){if(a!=="playing"&&a!=="played")return!1;var b=a==="playing"?playing_scrobbles_path("",""):played_scrobbles_path("","");return $.post(b,{track_id:SHUFFLER.ShufflerTrack.id}),!0}SHUFFLER.scrobbler={};var a=SHUFFLER.scrobbler;a.playing=function(){b("playing")},a.played=function(){b("played")}}(),function(){function b(){window.onload=resizeIframe,document.getElementById("content_frame")&&(document.getElementById("content_frame").onload=resizeIframe),window.onresize=resizeIframe}function c(){$(SHUFFLER.AudioPlayer).on("playback.start",function(){SHUFFLER.playerUi.setTitle(SHUFFLER.ShufflerTrack.artist,SHUFFLER.ShufflerTrack.title,!0),$("#play_pause").removeClass("play").addClass("pause")}),$(SHUFFLER.AudioPlayer).on("playback.pause",function(){SHUFFLER.playerUi.setTitle(SHUFFLER.ShufflerTrack.artist,SHUFFLER.ShufflerTrack.title,!1),$("#play_pause").removeClass("pause").addClass("play")}),$(".next").live("click",function(b){return b.preventDefault(),a.disableTrackControls?!1:($(SHUFFLER.playerUi).trigger("button.next"),!1)}),$(".prev").live("click",function(b){return b.preventDefault(),a.disableTrackControls?!1:($(SHUFFLER.playerUi).trigger("button.prev"),!1)}),$("#play_pause").live("click",function(){return SHUFFLER.AudioPlayer.player.playing()?SHUFFLER.AudioPlayer.player.pause(!0):SHUFFLER.AudioPlayer.player.play(),SHUFFLER.playerUi.clearNotice(),!1}),$("#close_button").live("click",function(){window.location.href=SHUFFLER.ShufflerTrack.permalink}),$(".loginLink").live("click",function(){return a.joinWindow=popup(login_path(""),"shufflerfm_join"),a.joinWindow.focus(),a.joinWindow.opener||(a.joinWindow.opener=window),!1}),$("#favorite.add").live("click",function(){SHUFFLER.favorites.add(SHUFFLER.ShufflerTrack.id,function(){SHUFFLER.PlayerController.updateFavoriteButton("remove"),SHUFFLER.playerUi.showNotice("Added","#favorite");var a=SHUFFLER.root_url+"fb/tracks/"+SHUFFLER.ShufflerTrack.id+"?channel="+$.bbq.getState("channel")+"&position="+$.bbq.getState("position");SHUFFLER.current_user.fb_status==="connected"&&SHUFFLER.current_user.fb_publishing_actions&&FB.api("/me/shufflerfm:favorite","post",{track:a,access_token:SHUFFLER.current_user.fb_access_token},function(a){})})}),$("#favorite.remove").live("click",function(){SHUFFLER.favorites.remove(SHUFFLER.ShufflerTrack.id,function(){SHUFFLER.PlayerController.updateFavoriteButton("add"),SHUFFLER.playerUi.showNotice("Removed","#favorite")})}),$("#addfavchannel.add").live("click",function(){SHUFFLER.following_blogs.add(SHUFFLER.ShufflerTrack.feed_id,function(){SHUFFLER.PlayerController.updateFavChannelButton("remove"),SHUFFLER.playerUi.showNotice("Added","#addfavchannel")})}),$("#addfavchannel.remove").live("click",function(){SHUFFLER.following_blogs.remove(SHUFFLER.ShufflerTrack.feed_id,function(){SHUFFLER.PlayerController.updateFavChannelButton("add"),SHUFFLER.playerUi.showNotice("Removed","#addfavchannel")})}),$(".joinLink").live("click",function(){return a.openJoin(""),!1}),$(".channel_changer").live("click",function(){$(this).find("> ul").toggleClass("active")}),$("#statusBar #user").live({mouseover:function(){$(this).css("background-color","#303030"),$(this).css("color","white"),$(this).addClass("active"),$(this).parent().find("> ul").show(),SHUFFLER.playerUi.clearNotice(),$(this).parent().find("> ul").bind("mouseleave",function(a){$(this).hide(),$("#statusBar #user").css("background-color",""),$("#statusBar #user").css("color","#808080"),$("#statusBar #user").removeClass("active")})}}),$("#sharemore").bind("click",function(){return $(".more-social-buttons").toggleClass("active"),!1}),$(".pullable").live({mouseover:function(){$(this).find("ul.sub-list").show(),$(this).addClass("active")},mouseout:function(){$(this).find("ul.sub-list").hide(),$(this).removeClass("active")}})}function d(){SHUFFLER.playerUi.fbPopDownShown=!1;if("current_user"in SHUFFLER)return!1;var a="facebook_join_popup_dismiss";if($.cookie(a)==null){var b=function(){SHUFFLER.playerUi.fbPopDownShown==0&&(SHUFFLER.playerUi.fbPopDownShown=!0,setTimeout(function(){$("#facebook-popdown").slideToggle("slow",function(){}),$("#btn-close").click(function(b){b.preventDefault();var c=new Date;c.setTime(c.getTime()+864e5),$.cookie(a,"true",{expires:c}),$("#facebook-popdown").slideToggle("fast",resizeIframe)})},1e3))};$(SHUFFLER.AudioPlayer).bind("playback.end",b),$(SHUFFLER.playerUi).bind("button.next",b)}}SHUFFLER.playerUi={};var a=SHUFFLER.playerUi;a.disableTrackControls=!1,a.initUI=function(){c(),b(),SHUFFLER.playerUi.updateUserStatus(),d()},a.setTitle=function(a,b,c){a=$.trim(a),b=$.trim(b);var d=c?"► ":"",e=a?a+" - ":"",f=d+e+b+" on Shuffler: Channel surf the music web";document.title.replace(/ /g,"")!=f.replace(/ /g,"")&&(document.title=f)},a.openJoin=function(b){b!=undefined&&b!=""?a.joinWindow=popup(signup_path("?message="+b),"shufflerfm_join"):a.joinWindow=popup(signup_path(""),"shufflerfm_join"),a.joinWindow.focus(),a.joinWindow.opener||(a.joinWindow.opener=window)},a.updateUserStatus=function(){if(SHUFFLER.current_user){$("#userActions").show(),$("#joinActions").hide(),$("#userActions #user").html(SHUFFLER.current_user.display_name),$("#userActions .chafavorites").attr("href",user_favorites_path(SHUFFLER.current_user.id,"")),$("#userActions .chamyf").attr("href",user_following_blogs_path(SHUFFLER.current_user.id,"")),$("#userActions .chaset").attr("href",edit_user_path(SHUFFLER.current_user.id,"")),$("#top-menu ul#main-list").append($('<li class="pullable"></li>').attr("id","my-profile-link")),$("#my-profile-link").append($("<a>My profile</a>").attr("href",user_favorites_path(SHUFFLER.current_user.id,"")));var a='<a href="'+user_favorites_path(SHUFFLER.current_user.id,"")+'">My Tracks</a>',b='<a href="'+user_following_blogs_path(SHUFFLER.current_user.id,"")+'">My Blogs</a>';$("#my-profile-link").append($('<div></div><ul class="sub-list"><li>'+a+"</li><li>"+b+"</li></ul>"))}else $("#userActions").hide(),$("#joinActions").show(),$("#my-profile-link").remove()},a.spinUpdateUi=function(){SHUFFLER.ShufflerTrack.id.toString().indexOf("spin-")!=-1?($("#addfavchannel").hide(),$("#favorite").hide()):($("#addfavchannel").show(),$("#favorite").show())},a.getChannelSelector=function(){$.get(get_channels_selector_track_path($.bbq.getState("track"),"?channel="+$.bbq.getState("channel"),""),function(a){$(".genre_select").replaceWith(a)},"text")},a.updateUi=function(a){var b=SHUFFLER.ShufflerTrack.artist?SHUFFLER.ShufflerTrack.artist+" - "+SHUFFLER.ShufflerTrack.title:SHUFFLER.ShufflerTrack.title,c=SHUFFLER.root_url+"tracks/"+SHUFFLER.ShufflerTrack.id+"?channel="+$.bbq.getState("channel")+"&position="+$.bbq.getState("position");SHUFFLER.playerUi.setTitle(SHUFFLER.ShufflerTrack.artist,SHUFFLER.ShufflerTrack.title,!0),$("#track").empty().html('<div class="innertrack">'+b+"</div>");if(!SHUFFLER.ShufflerTrack.old_track||SHUFFLER.ShufflerTrack.old_track&&SHUFFLER.ShufflerTrack.permalink!=SHUFFLER.ShufflerTrack.old_track.permalink){var d="/tracks/"+SHUFFLER.ShufflerTrack.id+"/inside?channel="+encodeURIComponent(encodeURIComponent($.bbq.getState("channel")));$("#content_frame").attr("src",d)}$(".blogchannellink a").attr({href:SHUFFLER.root_url+"channels/"+encodeURIComponent(encodeURIComponent("site_url:"+SHUFFLER
.ShufflerTrack.site_url).replace(/\./g,"%2E"))}),SHUFFLER.playerUi.spinUpdateUi(),$("meta[property='og:url']").attr("content",SHUFFLER.root_url+"tracks/"+a.track+"?channel="+a.channel),$("meta[property='og:title']").attr("content",SHUFFLER.ShufflerTrack.artist+" - "+SHUFFLER.ShufflerTrack.title),$("#fbshare").html('<div class="fb-like" data-href="'+c+'" data-send="false" data-layout="button_count" data-show-faces="false"></div>'),typeof FB!="undefined"&&(FB.XFBML.parse(document.getElementById("fbshare")),typeof SHUFFLER.current_user!="undefined"&&(typeof SHUFFLER.current_user.fb_status=="undefined"&&FB.getLoginStatus(function(a){SHUFFLER.current_user.fb_status=a.status,a.status==="connected"&&(SHUFFLER.current_user.fb_access_token=a.authResponse.accessToken)}),SHUFFLER.current_user.fb_status==="connected"&&SHUFFLER.current_user.fb_publishing_actions&&FB.api("/me/shufflerfm:listen","post",{track:SHUFFLER.root_url+"tracks/"+a.track+"?channel="+a.channel+"&position="+a.position,access_token:SHUFFLER.current_user.fb_access_token},function(a){!a.error})));var e=SHUFFLER.ShufflerTrack.title;SHUFFLER.ShufflerTrack.artist_twitter!=null?e="@"+SHUFFLER.ShufflerTrack.artist_twitter+" - "+SHUFFLER.ShufflerTrack.title:SHUFFLER.ShufflerTrack.artist!=null&&(e=SHUFFLER.ShufflerTrack.artist+" - "+SHUFFLER.ShufflerTrack.title);var f="",g=[];SHUFFLER.ShufflerTrack.site!=null&&SHUFFLER.ShufflerTrack.site.twitter!=null&&(e=e.slice(0,80),g.push(SHUFFLER.ShufflerTrack.site.twitter),f=" on "+SHUFFLER.ShufflerTrack.site.twitter),SHUFFLER.ShufflerTrack.artist_twitter!=null&&g.push(SHUFFLER.ShufflerTrack.artist_twitter),g=g.join(",");var h="#nowplaying "+e+f;$("#player_wrapper .twitter-share-button").attr({src:"http://platform0.twitter.com/widgets/tweet_button.html?_=1301054942732&count=none&lang=en&text="+encodeURIComponent(h)+"&via=shufflerfm"+"&url="+encodeURIComponent(c)+"&related="+g}),$("#sushare").attr({src:"http://www.stumbleupon.com/badge/embed/4/?url="+encodeURIComponent(c)}),typeof _gaq!="undefined"&&_gaq.push(["_trackPageview",c]);if(typeof clicky!="undefined"&&clicky&&clicky.log)try{clicky.log(c,document.title)}catch(i){}},a.afterLogin=function(b,c){typeof c=="undefined"&&(c={});if(b==="fb"){var d=a.afterFbLogin();if(!d.status||d.status!="success"){$("#fb-top .tail").addClass("login-failed").html("Something went wrong. <br/>Try again.");return}$("#facebook-popdown .buttons").hide(),$("#fb-top .tail").addClass("login-successful"),$("#fb-top .tail").html("You are in!"),$("#fb-top .action").hide(),setTimeout(function(){$("#facebook-popdown").slideUp("fast",resizeIframe)},5e3)}b==="tw"&&c.show_notice&&a.showNotice("We got you in"),$.get(whoami_users_path(".json"),function(b){if(!b.status||b.status!="success"||b.status==="error"){a.showNotice(b.message||"Sorry, something terrible happened");return}b.status=="success"&&(SHUFFLER.current_user=b.data,SHUFFLER.playerUi.updateUserStatus(),"afterLoginEndCallback"in a&&a.afterLoginEndCallback())},"json")},a.showNotice=function(a,b,c){typeof b=="undefined"&&(b="#statusBar"),typeof c=="undefined"&&(c=5e3),$("#notice_popup").length==0&&($("body").append($("<div>").attr("id","notice_popup")),$("#notice_popup").html('<div class="image"></div><span class="message"></span>')),$("#notice_popup .message").html(a);var d=$(b).offset().left+$(b).width()/2,e=d-$("#notice_popup").width()/2-20;d+$("#notice_popup").width()>$("#player_wrapper").width()?(e=$("#player_wrapper").width()-$("#notice_popup").width()-35,$("#notice_popup .image").css("background-position","95% 0")):$("#notice_popup .image").css("background-position","center top"),e+="px";var f=$(b).offset().top+$(b).height()+12;f+="px",$("#notice_popup").css("top",f).css("left",e).fadeIn(),setTimeout(function(){$("#notice_popup").fadeOut()},c)},a.clearNotice=function(){$("#notice_popup").hide()},a.afterFbLogin=function(){return $.parseJSON($.ajax({async:!1,type:"POST",url:connect_facebook_path(".json"),data:null,dataType:"json"}).responseText)}}(),function(){function c(c){var d={allowScriptAccess:"always",wmode:"transparent"},e={id:"yt_video"};b.youtubeTimeoutID=setTimeout(function(){a.player.onStop()},7500),swfobject.embedSWF("http://www.youtube.com/v/"+c+"?enablejsapi=1&playerapiid=ytplayer","ytapiplayer","1","1","8",null,null,d,e)}SHUFFLER.AudioPlayer={};var a=SHUFFLER.AudioPlayer,b={soundManager:null,youtubeTimeoutID:null};a.play=function(b){SHUFFLER.ShufflerTrack.play_video&&SHUFFLER.AudioPlayer.playVideo(SHUFFLER.ShufflerTrack.play_video),soundManager.onload=function(){SHUFFLER.ShufflerTrack.player_type=="mp3"&&(a.shufflerPlayers.mp3._init(),soundManager.onready(function(){a.shufflerPlayers.mp3.play()}))},SHUFFLER.ShufflerTrack.player_type=="mp3"?(a.shufflerPlayers.mp3._init(),soundManager.onready(function(){a.shufflerPlayers.mp3.play()})):SHUFFLER.ShufflerTrack.player_type=="spin"&&a.shufflerPlayers.spin._init()},a.stop=function(){SHUFFLER.ShufflerTrack.player_type&&a.player.stop()},a.shufflerPlayers={mp3:{_init:function(){a.shufflerPlayers.mp3.soundManagerSound&&a.shufflerPlayers.mp3.soundManagerSound.destruct(),soundManager.onready(function(){a.shufflerPlayers.mp3.soundManagerSound=soundManager.createSound({id:SHUFFLER.ShufflerTrack.sm2_id,url:SHUFFLER.ShufflerTrack.location,onload:function(b){(typeof b=="undefined"||!b)&&this.readyState!=3&&a.player.onError()},onplay:function(){a.player.onPlay(),a.shufflerPlayers.mp3.scrobbleTimeout==null&&(a.shufflerPlayers.mp3.scrobbleTimeout=setTimeout(function(){a.shufflerPlayers.mp3.scrobbleTimeout=null,SHUFFLER.scrobbler.played()},1e5))},onstop:function(){a.shufflerPlayers.mp3.scrobbleTimeout&&(clearTimeout(a.shufflerPlayers.mp3.scrobbleTimeout),a.shufflerPlayers.mp3.scrobbleTimeout=null),a.player.onPause(!0)},onpause:function(){a.player.onPause(!0)},onresume:function(){a.player.onPlay()},onfinish:function(){a.shufflerPlayers.mp3.scrobbleTimeout&&(clearTimeout(a.shufflerPlayers.mp3.scrobbleTimeout),a.shufflerPlayers.mp3.scrobbleTimeout=null,SHUFFLER.scrobbler.played()),a.player.onStop()},whileplaying:function(){$(SHUFFLER.AudioPlayer).trigger({type:"playback.position",length:this.duration/1e3,position:this.position/1e3})}})})},playing:function(){return a.shufflerPlayers.mp3.soundManagerSound&&!a.shufflerPlayers.mp3.soundManagerSound.paused},play:function(){soundManager.play(SHUFFLER.ShufflerTrack.sm2_id)},pause:function(){soundManager.pause(SHUFFLER.ShufflerTrack.sm2_id)},stop:function(){soundManager.stop(SHUFFLER.ShufflerTrack.sm2_id)}},youtube:{player:null,_init:function(){a.shufflerPlayers.youtube.player=document.getElementById("yt_video"),a.player.play()},load:function(b){a.shufflerPlayers.youtube.player!=null&&a.shufflerPlayers.youtube.player.loadVideoById(b)},playing:function(){return a.shufflerPlayers.youtube.player!=null?(state=a.shufflerPlayers.youtube.player.getPlayerState(),state!=2&&state!=0):!1},play:function(){var b=!1;try{a.shufflerPlayers.youtube.player.playVideo(),b=!0}catch(c){}b&&(a.youtubeTimeout=setTimeout(SHUFFLER.scrobbler.played,1e5),SHUFFLERAudioPlayerOnPlayerStateChange(1),a.youtubeTimer=setInterval(function(){$(SHUFFLER.AudioPlayer).trigger({type:"playback.position",length:a.shufflerPlayers.youtube.player.getDuration(),position:a.shufflerPlayers.youtube.player.getCurrentTime()})},500))},pause:function(){clearTimeout(a.youtubeTimeout),a.shufflerPlayers.youtube.player.pauseVideo(),SHUFFLERAudioPlayerOnPlayerStateChange(2),clearInterval(a.youtubeTimer)},stop:function(){a.shufflerPlayers.youtube.player!=null&&a.shufflerPlayers.youtube.player.stopVideo(),clearTimeout(a.youtubeTimeout),clearInterval(a.youtubeTimer)},duration:function(){return Math.floor(a.shufflerPlayers.youtube.player.getDuration()-a.shufflerPlayers.youtube.player.getCurrentTime())*1e3}},spin:{init:function(){$("#play_pause_filler").show(),$("#play_pause").hide()},_init:function(){$("#play_pause").hide(),$("#play_pause_filler").show(),$.receiveMessage(function(b){var c={},d=b.data.split("&");for(p in d){var e=d[p].split("=");c[e[0]]=e[1]}c["action"]=="started"?a.player.onPlay():c["action"]=="finished"&&(a.player.onStop(),$("#play_pause_filler").hide(),$("#play_pause").show())},SHUFFLER.ShufflerTrack.site_url),a.shufflerPlayers.spin.double_click_track()},playing:function(){},play:function(){},pause:function(){},stop:function(){$("#play_pause_filler").hide(),$("#play_pause").show()},double_click_track:function(){$("body").append($('<a href="http://ad.doubleclick.net/clk;245911929;71052946;p" target="_blank"><img src="http://ad.doubleclick.net/ad/N2789.Spin.com/B5797289.5;sz=1x1;ord=1234567890?" width="1" height="1" border="0" alt=""></a>'))}}},a.player={onPlay:function(){$(SHUFFLER.AudioPlayer).trigger("playback.start")},onPause:function(a){$(SHUFFLER.AudioPlayer).trigger("playback.pause")},onStop:function(){$("#play_pause_filler").hide(),$("#play_pause").show(),$(SHUFFLER.AudioPlayer).trigger("playback.end")},onError:function(a){$(SHUFFLER.AudioPlayer).trigger("playback.end")},playing:function(){return a.shufflerPlayers[SHUFFLER.ShufflerTrack.player_type].playing()},play:function(){a.shufflerPlayers[SHUFFLER.ShufflerTrack.player_type].play()},pause:function(){a.shufflerPlayers[SHUFFLER.ShufflerTrack.player_type].pause()},stop:function(){a.shufflerPlayers[SHUFFLER.ShufflerTrack.player_type].stop()},duration:function(){return a.shufflerPlayers[SHUFFLER.ShufflerTrack.player_type].duration()}},a.playVideo=function(b){$("#yt_video").size()>0?(a.shufflerPlayers.youtube.load(b),a.shufflerPlayers.youtube.play()):c(b)},a.onYouTubePlayerReady=function(c){b.youtubeTimeoutID!==null&&clearTimeout(b.youtubeTimeoutID);var d=document.getElementById("yt_video");d.addEventListener("onStateChange","SHUFFLERAudioPlayerOnPlayerStateChange"),d.addEventListener("onError","SHUFFLERAudioPlayeronPlayerError"),a.shufflerPlayers.youtube._init()}}(),function(){SHUFFLER.Track={};var a=SHUFFLER.Track;a.find=function(a,b){$.ajax({url:track_path(a,".json",""),dataType:"json",success:function(a){b(a)}})},a.addPlayerInfo=function(b){var c=a.playerInfo(b);return b.player_type=c.type,b.play_video=c.video,b.sm2_id="shuffler-"+b.id,b},a.playerInfo=function(a){var b,c=/youtube\.com\/v\/([^&?]+)/,d=null;return a.location.match(/youtube\.com\/v/i)?(b="youtube",d=c.exec(a.location)[1]):b=a.location=="spin"?"spin":"mp3",{type:b,video:d}}}(),function(){SHUFFLER.Channel={};var a=SHUFFLER.Channel;a.tracks=[],a.next=function(b,c){a.request(b,c,"next")},a.prev=function(b,c){a.request(b,c,"prev")},a.request=function(a,b,c){var d=encodeURIComponent(encodeURIComponent($.bbq.getState("channel")).replace(/\./g,"%2E"));$.ajax({url:SHUFFLER.root_url+"channels/"+d+"/"+c+".json?position="+$.bbq.getState("position")+"&track="+a.id,dataType:"json",success:function(a){b(a)},error:function(a){b(!1)}})},a.findTrack=function(b){for(var c=0;c<a.tracks.length;c++)if(b==a.tracks[c].id)return a.tracks[c];return null},a.fetchTrack=function(b,c){SHUFFLER.Track.find(b,function(b){a.pushTrack(b),c(b)})},a.nextTrack=function(b,c){var d=a.getTrackIndex(b);d>=0&&a.tracks.length-1>d?c&&c(a.tracks[d+1]):a.next(b,function(b){a.pushTrack(b),c&&c(b)})},a.previousTrack=function(b,c){var d=a.getTrackIndex(b);d>0?c&&c(a.tracks[d-1]):a.prev(b,function(b){a.unshiftTrack(b),c&&c(b)})},a.getTrackIndex=function(b){for(var c=0;c<a.tracks.length;c++)if(b.id==a.tracks[c].id)return c;return-1},a.pushTrack=function(b){a.getTrackIndex(b)==-1&&a.tracks.push(b)},a.unshiftTrack=function(b){a.getTrackIndex(b)==-1&&a.tracks.unshift(b)}}(),function(){SHUFFLER.imagebox={};var a=SHUFFLER.imagebox;a.fix_images=function(){$("img.bgimage").jail({event:"load"}),$(".bgimage.unfixed").each(function(){$(this).error(function(){$(this).hide()});var a=$(this).width(),b=$(this).height(),c=1;a>b&&(c=a/b,$(this).css("height",200),$(this).css("width",200*c)),a<b&&(c=b/a,$(this).css("height",200*c),$(this).css("width",200)),a<200&&$(this).css("width",200),b<200&&$(this).css("width",200),$(this).removeClass("unfixed")}),$("#boxes > br.clear").length==0&&$("#boxes").append($('<div class="clear"></div>'))},$(".bgimage").error(function(){$(this).hide()})}()
