var title       =   '.modal-title',
    loader      =   '.ajax-loader',
    content     =   '.modal-content',
    dataRemote  =   'a[data-remote=true]',
    toolbar     =   'div.modal-footer',
    modal       =   '#ajax-modal';

//hides the modal and shows the ajax content
$(content).html('<div class=\'modal-header\' style=\"background-image: url(\'http://lakecinema.s3.amazonaws.com/movies/backdrops/000/000/796/normal/elyNzXaOB9UW6j57v7DYg6I96bK.jpg?1612659382\')\">\n<div class=\'overlay\'>\n<h3 class=\'movie-title\'>Never Too Late (M)<\/h3>\n<\/div>\n<\/div>\n<div class=\'modal-body\'>\n<div class=\'movie-details clearfix\'>\n<div class=\'gr70 left\'>\n<h4>Overview<\/h4>\nIt\'s been a long time since Caine, Bronson, Angus and Wendell—aka ‘The Chain Breakers\'—escaped a torturous Vietnamese POW camp. They now find themselves sharing a new prison, The Hogan Hills Retirement Home for Returned Veterans. Each of the boys has an unrealised dream they want to achieve, so they band together to devise a plan to escape their new hell. But the rules of engagement have changed. In fact, they can’t even remember what they were—and that’s half the problem.\n<\/div>\n<div class=\'gr20 right\'>\n<h4>Director<\/h4>\n<p>Mark Lamprell<\/p>\n<h4>Cast<\/h4>\n<li class=\'cast\'>James Cromwell<\/li>\n<li class=\'cast\'>Jacki Weaver<\/li>\n<li class=\'cast\'>Dennis Waterman<\/li>\n<li class=\'cast\'>Jack Thompson<\/li>\n<\/div>\n<\/div>\n<\/div>\n');
$(modal).modal();
//brings the loader back up + gets rid of the content when linking to another controller method etc
$(content).on('click', dataRemote, function(){
  $(content).fadeOut('slow', function() {
    $(content).empty();
    $(loader).fadeIn('slow');
  });
});
