// Testimonial data
var testimonials = new Array();
var image_prefix = "/gfx/testimonials/";

testimonials[0] = {
  "domain": "plasticcard.com.au",
	"quote":"Melbourne IT helped us get to number 1 in our search area", 
  "speaker":"Bianca Barbuto", 
  "jobtitle":"sales and marketing consultant for Australian Plastic Card Company",
	"solutions": ["Domain Names","Search Engine Optimisation","Web Hosting"],
  "content1":"Bianca Barbuto, sales and marketing consultant for Australian Plastic Card Company and Red E Group wanted to talks about how Melbourne IT helped them to get to number one in Google.", 
  "content2":"Melbourne IT help Australian Plastic Card Company with their domain names, web hosting, and search engine optimisation.",
  "video":"/gfx/video/testimonials/redegroup_novoice_320x180.flv",
  "tiles": ["plasticcards1.jpg","plasticcards7.jpg","plasticcards3.jpg","plasticcards4.jpg","plasticcards8.jpg","plasticcards6.jpg"],
	"placeholder": "/gfx/testimonials/video-placeholder-plasticcards.jpg",
  "banner": "/gfx/testimonials/video-placeholder-plasticcards2.jpg"
}

testimonials[1] = {
  "domain": "hoad.com.au",
	"quote":"We've been monitoring the number of hits and have had a growth rate of 150% which is a fantastic result for us", 
  "speaker":"Bill Papapetrou", 
  "jobtitle":"CEO of Hoad Fabrics",
	"solutions": ["Domain Names","Search Engine Optimisation"],
  "content1":"Bill Papapetrou, CEO of Hoad Fabrics, a brand that's been around for over 80 years, wanted to make sure people could find hoad.com.au in search engines.  Melbourne IT helped Hoad get to number one for their search terms and have seen a huge increase in traffic. ", 
  "content2":"Melbourne IT helped Hoad with their search engine optimisation.",
  "video":"/gfx/video/testimonials/hoad_novoice_320x180.flv",
  "tiles": ["hoad-new1.jpg","hoad-new2.jpg","hoad-new3.jpg","hoad-new4.jpg","hoad-new5.jpg","hoad-new6.jpg"],
	"placeholder": "/gfx/testimonials/video-placeholder-hoad.jpg",
  "banner": "/gfx/testimonials/video-placeholder-hoad2.jpg"
}
testimonials[2] = {
  "domain": "ecorporatetraveller.com",
  "quote":"I would highly recommend them to anyone who is building a website", 
  "speaker":"Eleanor Nelhams", 
  "jobtitle":"founder of ecorporatetraveller.com",
	"solutions": ["Web Design","Web Hosting"],
  "content1":"Eleanor Nelhams, founder of ecorporatetraveller.com saw a gap in the market to provide really good information about corporate travel. The trouble was she wanted something that was tailored to her needs.", 
  "content2":"Melbourne IT helped Elite Corporate Traveller build a Custom Website.",
  "video":"/gfx/video/testimonials/ecorporatetraveller_novoice_320x180.flv",
  "tiles": ["ecorporatetraveller7.jpg","ecorporatetraveller2.jpg","ecorporatetraveller3.jpg","ecorporatetraveller4.jpg","ecorporatetraveller5.jpg","ecorporatetraveller6.jpg"],
  "placeholder": "/gfx/testimonials/video-placeholder-ecorporatetraveller4.jpg",
	"banner": "/gfx/testimonials/video-placeholder-ecorporatetraveller3.jpg"
}

var id = Math.floor(Math.random()*testimonials.length);
var testimonial = testimonials[id]; 

var tImage = document.getElementById('tBanner');
var tHeader = document.getElementById('tHead');
var tDom = document.getElementById('tDomain');
var tLink = document.getElementById('href1');
var tSol = document.getElementById('bottom');

if(tImage) {
	tImage.style.background = "url("+ testimonial['banner']+") no-repeat";
	tHeader.innerHTML = testimonial['quote'] +"\"";
	tDom.innerHTML = testimonial['domain'];
	tLink.href = "/success-stories/index.php?id="+id;
	
	sol = testimonial['solutions'];
  var printsol = "";  
  var url = "";
  var x = 0;
	var item = "";
	
  // Set solutions
  for(x; x < sol.length; x++) 
  {        
	        item = sol[x];
					if(item == "Domain Names") url = "/cc/domainname/index";
          else if(item == "Web Hosting") url = "/cc/web-hosting/index";
          else if(item == "Web Design") url = "/cc/website-design/index";
          else if(item == "Search Engine Optimisation") url = "/cc/website-marketing/index";
          
          printsol += "<li><a href=\""+url+"\">"+item+"</a></li>";
  }            
  tSol.innerHTML = "Solutions:<ul>"+printsol+"</ul><p id=\"seeMore\"><a href=\"/success-stories\">See more</a></p>";  
}
