var images = new Array();
var texts = new Array();
var run_flag = true;
var hide = false;
var show = false;
var i = 1;
            
function addImageToArray(image, text)
{
  images.push(image);
  texts[image] = text;
}            
            
 
this.shufflePictures = function() { 
  if (i == images.length)  i = 0;
  $('#pictures img').fadeOut(1000).fadeIn(1000);
  setTimeout("changePicture("+i+")", 1000);
  i++;
  setTimeout("shufflePictures()", 7000);
}

this.changePicture = function(image) {
  $('#pictures img').attr("src", images[image]);
  var text = $('#hello').html();
  text = text.replace("<font class=\"white\">", "");
  text = text.replace("</font>", "");
  text = text.replace(texts[images[image]], "<font class=white>" + texts[images[image]] + "</font>");
  $('#hello').html(text);
}

$(document).ready(function() 
{
  changePicture(0);
  setTimeout("shufflePictures()", 7000);
});



function stop_blur() {
  window.clearInterval(changeIntervall);
  window.clearInterval(hideIntervall);
}

function start_blur() {
  changeIntervall = window.setInterval('this.startImageLine();', 10000);
  hideIntervall = window.setTimeout('this.hideImage();', 9500);
}
