Trying to shorten a cookie's duration

I have a surprisingly simple cap frequnecy cookie for a jQuery slide. I am not using the jQuery cookie plugin which doesn’t have a shorter unit than one day anyways.

I have tried everything my limited JS skills allow but get errors and even worse a disruption of my slide function. My working oneDay cookie slide toggle function

$(document).ready(function() { 
        function initSlideboxes() 
  var oneDay = new Date();
  setTimeout(function() {$('#slidebar').slideUp(10);}, 5000); 
('#slidebar').slideToggle(); }); 

A JS programmer suggested I try the following but it didn’t work because I can’t figure out what to put in place of oneDay

var currentDate = new Date(); 
var startDate = new Date( currentDate.getYear(), currentDate.getMonth(), currentDate.getDate(), currentDate.getHours()+1, currentDate.getMinutes(), currentDate.getSeconds());

Error is oneHour is undefined, I tried a couple different things like 3600 but I get syntax errors or “,” expected but I don’t have the math head ability to understand what I should try next. The fact that oneDay works makes me wonder what is in that knows what oneDay is.