var imgs;
$(document).ready(function() 
{
  if ($('.cinematic').length > 0 && imgs) {
    $($('head')[0]).append('<script type="text/javascript" src="/t-net/js/cinematic.js');

    var i = 0;
    if (!isCinematic) {
      var iv = setInterval(function() {
	if (isCinematic) {
	  clearInterval(iv);
	  runCinema();
	}

	if (i > 10)
	  clearInterval(iv);

	i++;
      }, 100);
    }
    else runCinema();
  }
});

function runCinema()
{
  $('.cinematic').cinematic(imgs, { delay: 8, transition: 2500 });
}