// JavaScript Document

var ran=0;




function toggleButton() {
	var i;
	if(document.getElementById("plan1").checked==true)
	   {
		   for(i=0;i<document.getElementsByName("subplans").length;i++)
		   	document.getElementsByName("subplans").item(i).disabled=false;
			document.getElementById("subplan1").checked=true;	   
		}
	 else
	 {
		   for(i=0;i<document.getElementsByName("subplans").length;i++)
		   	document.getElementsByName("subplans").item(i).disabled=true;
			
	   }
}

function openPage() {
	
var howMany = 1;  // max number of items listed below
var page = new Array(howMany+1);

page[0]="why_integra.php";
page[1]="why_integras.php";

function rndnumber(){
var randscript = -1;
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
}
return randscript;
}
quo = rndnumber();
quox = page[quo];
window.location=(quox);
	
}


	$(document).ready(function() {
				
		var s;
		var s1;
		var imgname;
		
		
		$(".icons ul li").hover(function() {
			
		
			var t=$(this).parent();
			
			var m=$(this).parent().parent().children("ul").index(t);
			
			s=parseInt($(this).parent().children().index(this));
			if(m==0)
			s=s+1;
			else
			s=s+5;
			
			var t=$(this).parent().parent().parent().parent().attr("id");

			if(t=="test")
			s=s+9;
			
						
			imgname="images/greybg/cg-"+s+".gif";
			$(this).css("background","url("+imgname+") no-repeat 0px 0px ");
			$(this).find("span img").stop().animate({"opacity":0.0},500);
			
		}, function() {
			
			$(this).find("span img").stop().animate({"opacity":1.0},500);
		});
		
		
	
			$(".iconbox2 .imgs").hover(function() {
			
				var s=$(this).attr("src");
				var m=$(".iconbox2").children(".imgs").index(this)+1;
				
				
						
			imgname="images/icons/logo-"+m+".jpg";
			$(this).css("background","url("+imgname+") no-repeat 0px 0px ");
			$(this).find("img").stop().animate({"opacity":0.0},500);
				
			
		}, function() {
			$(this).find("img").stop().animate({"opacity":1.0},500);
		});
		

	
	
	$(".footerimgs img").hover(function() {
		
		s1=$(this).parent().children().index(this);
		s1=s1+1;
		
		var name="footer-imgor-"+s1+".gif";
		
		var path="images/"+name;
		
		$(this).attr("src",path);
		
	}, function () {
		
		var name="footer-img"+s1+".gif";
		var path="images/"+name;
		$(this).attr("src",path);
	});


 	$(".hidden").hide();   
 
	$(".expand").click(function() {
		if($(".hidden").is(":visible")) {
		$(".hidden").slideUp(700);
		$(".expand").html("[+]");
		}
		else {
		$(".hidden").slideDown(700);
		$(".expand").html("[-]");
		}
		
	});
	
	
	$("#youtubelink .linkicon").click(function() {
		
	$("#youtubelink .linkicon").hide(1, function() {
		
		 $(this).parent().parent().css("background-color","#000000");
		 
		$("<iframe style='' width='314' height='275' src='http://www.youtube.com/embed/kaxmvGEAC6o?rel=0&amp;hd=1&autoplay=1' frameborder='0' allowfullscreen></iframe>").appendTo("#youtubelink");		
	});
		
		
	});

	});
