(function($) { $(document).ready(function() { /* IF YOU WANT TO USE DEVICE.JS TO DETECT THE VIEWPORT AND MANIPULATE THE OUTPUT */ //Device.js will check if it is Tablet or Mobile - http://matthewhudson.me/projects/device.js/ if (!device.tablet() && !device.mobile()) { jQuery( "#P1" ).mb_YTPlayer(); setTimeout(function() { jQuery( "#mute-unmute-player" ).css( "display", "block" ); jQuery( "#mbYTP_P1" ).css( "border-top", "1px solid #FFFFFF" ); }, 3000); } else { //jQuery will add the default background to the preferred class jQuery( ".big-background, .small-background-section" ).addClass( "big-background-default-image" ); jQuery( "#mute-unmute-player" ).remove(); } }); jQuery( "#mute-unmute-player" ).on( "click", function() { jQuery( "#P1" ).YTPToggleVolume(); jQuery( "#mute-unmute-player>span" ).toggleClass( "glyphicon-volume-off glyphicon-volume-up" ); }); })(jQuery);