$(document).ready(function () { // Mobile Drawer Navigation $('#nav').click( function() { if ($('#sidenav').is(':visible')) { $('#wrapper, footer').css({ left: '0' }); $('#sidenav').hide(); } else { $('#wrapper, footer').css({ left: '210px' }); $('#sidenav').show(); } }); var callback = function () { var docSize = $(window).width(); $('#wrapper, footer').css({ width: docSize }); }; $(document).ready(callback); $(window).resize(callback); // Mobile Drawer Navigation States $('#sidenav .m').on('click', function(e) { e.preventDefault(); var nextDiv = '#' + $(this).data('id'); $('#mobileMain').hide(); $(nextDiv).show(); }); $('#sidenav .b').on('click', function(e) { e.preventDefault(); var nextDiv = '#' + $(this).data('id'); $('#mGames').hide(); $(nextDiv).show(); }); $('.mobileReturn').click( function() { $('#sidenav > ul').hide(); $('#mobileMain').show(); }); $('.mobileReturn2').click( function() { $(this).parent().hide(); $('#mGames').show(); }); // qTip Tooltip $("a.qt").qtip({ show: { delay: 400 }, style: { classes: 'qtip-bootstrap' } }); $("img#notice").qtip({ content: { text: 'Please make sure you enter your email address correctly so that I can reply', }, style: { classes: 'qtip-bootstrap' } }); // Navigation (New) $(function(){ $("ul.sf-menu").superfish(); }); // Stuff that DOES NOT load on a mobile device var wi = $(window).width(); $(window).resize(function() { var wi = $(window).width(); if (wi <= 482){ // Slideshow responsive fix $('.rhino-container, #slideshow, #slider, li.rhino-item img').css({'width': '300px', 'height': '235px'}); } if (wi >= 481){ // Slideshow responsive fix $('.rhino-container, #slideshow, #slider, li.rhino-item img').css({'width': '460px', 'height': '360px'}); // Google Search $('#google-search').html(''); } }); // Slideshow $("#slider li:nth-child(n+2) img").css({'display':'inherit'}); $("#slider").rhinoslider(); // Unhide hidden jQuery-powered elements for a prettier page load $("img.slide-sub").css("visibility","visible"); // Contact Form $("input[name$='Game']").click(function(){ var radio_value = $(this).val(); if(radio_value=='Yes') { $("p#shrinez").slideDown("medium"); } else if(radio_value=='No') { $("p#shrinez").slideUp("medium"); } }); $("p#shrinez").hide(); $("input[name$='Emulator']").click(function(){ var radio_value = $(this).val(); if(radio_value=='Yes') { $("p#emulatorz").slideDown("medium"); } else if(radio_value=='No') { $("p#emulatorz").slideUp("medium"); } }); $("p#emulatorz").hide(); // Gallery $('.fancybox').fancybox({ padding: 10, openEffect : 'elastic', openSpeed : 300, closeEffect : 'elastic', closeSpeed : 200, closeClick : true, helpers : { overlay : null } }); });