_audiocount = 0; _curvid = ''; _ismobile = false; if(navigator.userAgent && (navigator.userAgent.indexOf('iPad') != -1 || navigator.userAgent.indexOf('iPhone') != -1)){ _ismobile = true; } $(document).ready(function () { if(_ismobile){ $("#vo").hide(); } }); function audioplayer (filename) { var target = 'audioembed' + _audiocount; var outp = ''; if(_ismobile){ outp += ''; document.write(outp); } else { outp += '
You\'ll need Flash 7 to listen to this clip.
'; document.write(outp); swfobject.embedSWF('../art/player.swf',target,'500','24','7',null,{height:'24',width:'500',file:filename}); } _audiocount++; } function videoinit () { _curvid = $("#videotable").find('.sel:first').attr('vidid'); $(".vid").each(function () { $(this).click(function () { if(_curvid != $(this).attr('vidid')){ $("#videotable").find('.sel').removeClass('sel').addClass('unsel'); document.getElementById('partnerPlayer').src = 'http://video.pbs.org/widget/partnerplayer/' + $(this).attr('vidid') + '/?w=576&h=324&chapterbar=true&autoplay=true&embed=true'; $(this).removeClass('unsel').addClass('sel'); _curvid = $(this).attr('vidid'); } }); }); }