// JavaScript Document  








var stopAnimation = false;
var qoutesobject= new Array();
var vcounter = 0;
var ajaxloaded = false;
function outputquotes(){
var authorprint = "";
var bodyprint = "";
	 randarrayvalue = Math.floor ( Math.random() * qoutesobject.length ); 
	 authorprint = qoutesobject[randarrayvalue]['author'];
	 authorprint = " -" + authorprint;
	 bodyprint = qoutesobject[randarrayvalue]["body"];
	 if(bodyprint != $('#testbody').html() && authorprint != $('#author').html() && stopAnimation != true){
	  $('#testimonialanimatebox').fadeOut(300, function() {
		  $('#testbody').html(bodyprint);
		   $('#author').html(authorprint);
		    $('#testimonialanimatebox').fadeIn(1000, function() {
			  });
		   });
	   }else{
		   outputquotes() 
	   } 
}

$(document).ready(function(){	

$("#testHolderSub").hover(
  function () {
    stopAnimation = true;
  },
  function () {
    stopAnimation = false;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
);




if($(document).width() < 1299){
	$('#livechatbox').addClass("livechat2");	
	}else{
	$('#livechatbox').addClass("livechat");
	}
	



$(window).resize(function() {
 	if($(document).width() < 1299){
		$('#livechatbox').removeClass("livechat livechat2").addClass("livechat2");
		
	}else{
	$('#livechatbox').removeClass("livechat livechat2").addClass("livechat");
	
	}
});





// Testimonals Script
 $.ajax({
    type: "GET",
    url: "quotes.xml",
    dataType: "xml",
    success: parseXmlQuotes
  });

function  parseXmlQuotes(xml)
{

  $(xml).find("quote").each(function()
  {
	qoutesobject[vcounter] = new Array();
	qoutesobject[vcounter]['body'] = $(this).find('body').text();
	qoutesobject[vcounter]['author'] = $(this).find('author').text();
	vcounter = vcounter + 1;
  });
  outputquotes()
}
setInterval('outputquotes()', 6000);













// Open Strict In New Window 	
$(function() {
	$('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
	});
});	
// Form Validator With Ajax Submit	   





});

Cufon.replace('h2' , { fontFamily: 'Aparajita' });
Cufon.replace('h3' , { fontFamily: 'Aparajita' });

Cufon.replace('#testHolderSub h4' , { fontFamily: 'Rage Italic' });
Cufon.replace('#copywrite' , { fontFamily: 'Rage Italic' });
Cufon.replace('#servicesBoxHeader' , { fontFamily: 'Rage Italic' });
Cufon.replace('.servicesSection h2' , { fontFamily: 'Aparajita' });
Cufon.replace('#developingstrategies', { fontFamily: 'Rage Italic' });
Cufon.replace('#customerLoginBtn', { fontFamily: 'Rage Italic', hover: true });
Cufon.replace('#navigationList li a', { fontFamily: 'Rage Italic' });
Cufon.replace('#navigationList li span', { fontFamily: 'Rage Italic' });
Cufon.replace('.rage' , { fontFamily: 'Rage Italic' });











  




  
