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/798/normal/a5PNkyt8zx6sSXCzgKpKAaAXNJw.jpg?1612661503\')\">\n<div class=\'overlay\'>\n<h3 class=\'movie-title\'>Music (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>\nZu, a free spirit estranged from her family, who suddenly finds herself the sole guardian of her half-sister, Music a teenager on the autism spectrum whose whole world order had been beautifully crafted by her late grandmother. The film soon challenges whether it is Zu or Music who has a better view of the world, and that love, trust, and being able to be there for each other is everything.\n<\/div>\n<div class=\'gr20 right\'>\n<h4>Director<\/h4>\n<p>Sia<\/p>\n<h4>Cast<\/h4>\n<li class=\'cast\'>Kate Hudson<\/li>\n<li class=\'cast\'>Leslie Odom Jr.<\/li>\n<li class=\'cast\'>Maddie Ziegler<\/li>\n<li class=\'cast\'>Mary Kay Place<\/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');
  });
});
