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/794/normal/vBbQniBrQK3UyFMCoVS95s7hzpR.jpg?1612658819\')\">\n<div class=\'overlay\'>\n<h3 class=\'movie-title\'>Summerland (PG)<\/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>\nA woman during the Second World War opens her heart to an evacuee after initially resolving to be rid of him.\n<\/div>\n<div class=\'gr20 right\'>\n<h4>Director<\/h4>\n<p>Jessica Swale<\/p>\n<h4>Cast<\/h4>\n<li class=\'cast\'>Gemma Arterton<\/li>\n<li class=\'cast\'>Gugu Mbatha-Raw<\/li>\n<li class=\'cast\'>Lucas Bond<\/li>\n<li class=\'cast\'>Penelope Wilton<\/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');
  });
});
