Hide the Ribbon Controls in SharePoint 2013

I’m using modal dialog boxes (Fancybox) in my jQuery project, and I didn’t want the usual SharePoint ribbon header to appear in these. The simple solution was to hide the ribbon controls in SharePoint 2013 using the following jQuery:

$(document).ready(function () {
$("#titlerow").hide();
$("#s4-ribbonrow").hide();
$("#suiteBar").hide();
}