
rotate_total = 2;
current_img = 1;

function rotate_next(){
	current_img = current_img + 1;
	if(current_img > rotate_total) current_img = 1;
	$('.home_splash').css('background', 'url("images/home_splash'+current_img+'.jpg") no-repeat scroll left top transparent');
}

function rotate_images(){
	setTimeout('rotate_next()', 2000);
}

$(function() {
	
	$(".btn_rollover").hover(
		function () {
			var currentImg = $(this).attr('src');
			$(this).attr('src', $(this).attr('hover'));
			$(this).attr('hover', currentImg);
		}, function() {
			var currentImg = $(this).attr('src');
			$(this).attr('src', $(this).attr('hover'));
			$(this).attr('hover', currentImg);
		}
	);
	

	
//	$(".main_head_prev").click(function () {
//		current_img = current_img - 1;
//		if(current_img <= 0) current_img = rotate_total;
//		$('.home_splash').css('background', 'url("images/home_splash'+current_img+'.jpg") no-repeat scroll left top transparent');
//	});
//	
//	$(".main_head_next").click(function () {
//		current_img = current_img + 1;
//		if(current_img > rotate_total) current_img = 1;
//		$('.home_splash').css('background', 'url("images/home_splash'+current_img+'.jpg") no-repeat scroll left top transparent');
//	});

	$('.cycle_contain').cycle({
		fx: 'fade',
		timeout: 5500,
		next: '.main_head_next',
		prev: '.main_head_prev'
	});

   
   
   //setTimeout('rotate_images()', 2000);
   
   
   // Text Resize
   
	$("#size_small").click(function () {
		$('.main_content_inner h1, .content_area_inner p, .content_area_inner li, .content_area_inner li a, .footer').each(function(index) {
			//alert($(this).css('line-height'));
			//new_size = parseInt($(this).css('font-size')) - 2;
			//new_line = parseInt($(this).css('font-size')) + 2;
			new_size = 10;
			new_line = 15;
			new_size = new_size+'px';
			new_line = new_line+'px';
			$(this).css('font-size', new_size);
			$(this).css('line-height', new_line);
		});
	});
	$("#size_regular").click(function () {
		$('.content_area_inner p, .content_area_inner li, .content_area_inner li a, .footer').css('font-size', '12px');
		$('.content_area_inner p, .content_area_inner li, .content_area_inner li a, .footer').css('line-height', '17px');
		$('.main_content_inner h1').css('font-size', '24px');
		$('.main_content_inner h1').css('line-height', '17px');
		//$('.content_area_inner h1').css('font-size', '18px');
	});
	$("#size_large").click(function () {
		$('.main_content_inner h1, .content_area_inner p, .content_area_inner li, .content_area_inner li a, .footer').each(function(index) {
			//new_size = parseInt($(this).css('font-size')) + 2;
			//new_line = new_size + 4;
			new_size = 26;
			new_line = new_size + 4;
			new_size = new_size+'px';
			new_line = new_line+'px';
			$(this).css('font-size', new_size);
			$(this).css('line-height', new_line);
		});
	});
	
   
//	AudioPlayer.setup("http://www.myasthenia.org/Portals/_default/Skins/MGFA-Blue/player.swf", {  
//		width: "290"
//	});  
	
	AudioPlayer.setup("http://www.myasthenia.org/Portals/_default/Skins/MGFA-Blue/player.swf", {width:"290",animation:"yes",encode:"yes",initialvolume:"60",remaining:"no",noinfo:"no",buffer:"5",checkpolicy:"no",rtl:"no",bg:"E5E5E5",text:"333333",leftbg:"CCCCCC",lefticon:"333333",volslider:"666666",voltrack:"FFFFFF",rightbg:"B4B4B4",rightbghover:"999999",righticon:"333333",righticonhover:"FFFFFF",track:"FFFFFF",loader:"009900",border:"CCCCCC",tracker:"DDDDDD",skip:"666666",pagebg:"FFFFFF",transparentpagebg:"yes"});
   

});
