$(document).ready(function() {
	$(".viewall").click(function(){
		//alert("");
		$(".active_content_links").removeClass("hidden");
		$(".active_content_links").slideDown("fast", function(){
			$(".bot_menu").height(($(".right_panel").height())-($(".menu").height())-2);
			//alert($(".right_panel").height());
		});
		$("ul.links_list li").addClass("active");
		$(this).hide();
		$(".hideall").show();
	});
	$(".hideall").click(function(){
		//alert("");
		$(".active_content_links").addClass("hidden");
		$(".active_content_links").slideUp("fast", function(){
			$(".bot_menu").height(($(".right_panel").height())-($(".menu").height())-2);
			//alert($(".right_panel").height());
		});
		$("ul.links_list li").removeClass("active");
		$(this).hide();
		$(".viewall").show();
	});
//Links Page
	$("ul.links_list li").mouseover(function () {
		//alert("");
		$(this).addClass("over");							
	});
	//$("ul.links_list li").mouseout(function () {
		$(this).removeClass("over");						
	//});
	$("a.list_link").click(function () {
		//$(".active_content_links").slideUp("slow");
		//$("ul.links_list li").removeClass("active");
		if ( $(this).parent().children(".active_content_links").hasClass("hidden") ) {
			$(this).parent().children(".active_content_links").removeClass("hidden");
			$(this).parent().children(".active_content_links").slideDown("fast", function(){
					$(".bot_menu").height(($(".right_panel").height())-($(".menu").height())-2);
					//alert($(".right_panel").height());
				});
			$(this).parent().addClass("active");
			$(".viewall").hide();					
			$(".hideall").show();
			//alert($(".active").length+" this is one  "+$("ul.links_list").children().length);
		} else {
			$(this).parent().children(".active_content_links").slideUp();
			$(this).parent().children(".active_content_links").addClass("hidden");
			$(this).parent().removeClass("active");
			if($(this).parent().hasClass("intab")){
				$(this).parent().parent().parent().removeClass("active");
			}
			//alert($(".active").length+" this is two "+$("ul.links_list").children().length);
			if($(".active").length<2){
				$(".viewall").show();					
				$(".hideall").hide();
			}
		}
		return false;
	});
});
$(document).ready(function() {
		$("#play").hide();
	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {			
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});		
	
	//When page loads...
	$(".graph_content").hide(); //Hide all content
	$("ul.graph_tab li:first").addClass("active").show(); //Activate first tab
	$(".graph_content:first").show(); //Show first tab content	
	
	//On Click Event
	$("ul.graph_tab li").click(function() {			
		$("ul.graph_tab li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".graph_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});	
});
$(function(){
		$('#pause').click(function() { 
		$('#high_rotaion').cycle('pause');
		$('#pause').hide();
		$('#play').show();
		return false; 
});
		$('#play').click(function() {
		$('#high_rotaion').cycle('resume'); 
		$('#play').hide();
		$('#pause').show();
		
		return false; 
});
		
	$("#high_rotaion").cycle(
	{
		fx: "fade",
		speed: 800,
		timeout: 10000,
		pager: "#high_pager"
		
		
	});
	$("#invest_rotaion").cycle(
	{
		fx: "fade",
		speed: 800,
		timeout: 5000,
		pager: "#invest_pager"
	});
	$("#arra_rotaion").cycle(
	{
		fx: "fade",
		speed: 800,
		timeout: 5000,
		pager: "#arra_pager"
	});
	
	$(".oar a").hover(function(){
		$(".obssr").addClass("obssrhover");
		$(".odp").addClass("odphover");
		$(".orwh").addClass("orwhhover");
		$(".osc").addClass("oschover");
		$(".orip").addClass("oriphover");
		$(".ose").addClass("osehover");
		$(this).parent().parent().children(".boxtxt").hide();
		$(this).parent().parent().children(".boxtxthover").show();
	});
	$('.oar a').mouseout(function() {
		$(".obssr").removeClass("obssrhover");
		$(".odp").removeClass("odphover");
		$(".orwh").removeClass("orwhhover");
		$(".osc").removeClass("oschover");
		$(".orip").removeClass("oriphover");
		$(".ose").removeClass("osehover");
		$(this).parent().parent().children(".boxtxt").show();
		$(this).parent().parent().children(".boxtxthover").hide();
	});

	$(".obssr a").hover(function(){
		$(".oar").addClass("oarhover");
		$(".odp").addClass("odphover");
		$(".orwh").addClass("orwhhover");
		$(".osc").addClass("oschover");
		$(".orip").addClass("oriphover");
		$(".ose").addClass("osehover");
		$(this).parent().parent().children(".boxtxt").hide();
		$(this).parent().parent().children(".boxtxthover").show();
	});
	$('.obssr a').mouseout(function() {
		$(".oar").removeClass("oarhover");
		$(".odp").removeClass("odphover");
		$(".orwh").removeClass("orwhhover");
		$(".osc").removeClass("oschover");
		$(".orip").removeClass("oriphover");
		$(".ose").removeClass("osehover");
		$(this).parent().parent().children(".boxtxt").show();
		$(this).parent().parent().children(".boxtxthover").hide();
	});

	$(".odp a").hover(function(){
		$(".oar").addClass("oarhover");
		$(".obssr").addClass("obssrhover");
		$(".orwh").addClass("orwhhover");
		$(".osc").addClass("oschover");
		$(".orip").addClass("oriphover");
		$(".ose").addClass("osehover");
		$(this).parent().parent().children(".boxtxt").hide();
		$(this).parent().parent().children(".boxtxthover").show();
	});
	$('.odp a').mouseout(function() {
		$(".oar").removeClass("oarhover");
		$(".obssr").removeClass("obssrhover");
		$(".orwh").removeClass("orwhhover");
		$(".osc").removeClass("oschover");
		$(".orip").removeClass("oriphover");
		$(".ose").removeClass("osehover");
		$(this).parent().parent().children(".boxtxt").show();
		$(this).parent().parent().children(".boxtxthover").hide();
	});

	$(".orwh a").hover(function(){
		$(".oar").addClass("oarhover");
		$(".obssr").addClass("obssrhover");
		$(".odp").addClass("odphover");
		$(".osc").addClass("oschover");
		$(".orip").addClass("oriphover");
		$(".ose").addClass("osehover");
		$(this).parent().parent().children(".boxtxt").hide();
		$(this).parent().parent().children(".boxtxthover").show();
	});
	$('.orwh a').mouseout(function() {
		$(".oar").removeClass("oarhover");
		$(".obssr").removeClass("obssrhover");
		$(".odp").removeClass("odphover");
		$(".osc").removeClass("oschover");
		$(".orip").removeClass("oriphover");
		$(".ose").removeClass("osehover");
		$(this).parent().parent().children(".boxtxt").show();
		$(this).parent().parent().children(".boxtxthover").hide();
	});

	$(".osc a").hover(function(){
		$(".oar").addClass("oarhover");
		$(".obssr").addClass("obssrhover");
		$(".odp").addClass("odphover");
		$(".orwh").addClass("orwhhover");
		$(".orip").addClass("oriphover");
		$(".ose").addClass("osehover");
		$(this).parent().parent().children(".boxtxt").hide();
		$(this).parent().parent().children(".boxtxthover").show();
	});
	$('.osc a').mouseout(function() {
		$(".oar").removeClass("oarhover");
		$(".obssr").removeClass("obssrhover");
		$(".odp").removeClass("odphover");
		$(".orwh").removeClass("orwhhover");
		$(".orip").removeClass("oriphover");
		$(".ose").removeClass("osehover");
		$(this).parent().parent().children(".boxtxt").show();
		$(this).parent().parent().children(".boxtxthover").hide();
	});
	
	$(".orip a").hover(function(){
		$(".oar").addClass("oarhover");
		$(".obssr").addClass("obssrhover");
		$(".odp").addClass("odphover");
		$(".orwh").addClass("orwhhover");
		$(".osc").addClass("oschover");
		$(".ose").addClass("osehover");
		$(this).parent().parent().children(".boxtxt").hide();
		$(this).parent().parent().children(".boxtxthover").show();
	});
	$('.orip a').mouseout(function() {
		$(".oar").removeClass("oarhover");
		$(".obssr").removeClass("obssrhover");
		$(".odp").removeClass("odphover");
		$(".orwh").removeClass("orwhhover");
		$(".osc").removeClass("oschover");
		$(".ose").removeClass("osehover");
		$(this).parent().parent().children(".boxtxt").show();
		$(this).parent().parent().children(".boxtxthover").hide();
	});
	
	$(".ose a").hover(function(){
		$(".oar").addClass("oarhover");
		$(".obssr").addClass("obssrhover");
		$(".odp").addClass("odphover");
		$(".orwh").addClass("orwhhover");
		$(".osc").addClass("oschover");
		$(".orip").addClass("oriphover");
		$(this).parent().parent().children(".boxtxt").hide();
		$(this).parent().parent().children(".boxtxthover").show();
	});
	$('.ose a').mouseout(function() {
		$(".oar").removeClass("oarhover");
		$(".obssr").removeClass("obssrhover");
		$(".odp").removeClass("odphover");
		$(".orwh").removeClass("orwhhover");
		$(".osc").removeClass("oschover");
		$(".orip").removeClass("oriphover");
		$(this).parent().parent().children(".boxtxt").show();
		$(this).parent().parent().children(".boxtxthover").hide();
	});

  // Saving original Font Sizes  
  var originalFontSize = $('h1, h2, h3, h4, p, li .readmore, #footer_links, .cont_left p, .cont_left li,.cont_right1 h1, .cont_left1 p, .zebra1, .cont_left1 li, .cont_right li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size');
  
   // Reset Font Size
  $(".default_txt").click(function(){
  $('h1, h2, h3, h4, p, li .readmore, #footer_links, .cont_left p, .cont_left li, .cont_left1 p,.cont_right1 h1, .cont_left1 li, .zebra1, .cont_right li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size', originalFontSize);
 
  });  
  // Increase Font Size
  $(".large_txt").click(function(){
  	var currentFontSize = $('h1, h2, h3, h4, p, li .readmore, #footer_links, .cont_left, .cont_left li,.cont_right1 h1, .cont_left1 p, .zebra1, .cont_left1 li, .cont_right li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size');
 	var currentFontSizeNum = parseFloat(currentFontSize, 10);
	
    var newFontSize = currentFontSizeNum*1.2;
	if (newFontSize < 18) {
	$('h1, h2, h3, h4, p, li .readmore, #footer_links, .cont_left, .cont_left li, .cont_left1 p,.cont_right1 h1, .cont_left1 li, .zebra1, .cont_right li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size', newFontSize);
	}return false;
  });  
  // Decrease Font Size
  $(".small_txt").click(function(){
  	var currentFontSize = $('h1, h2, h3, h4, p, li .readmore, #footer_links, .cont_left, .cont_left li,.cont_right1 h1, .cont_left1 p, .zebra1, .cont_left1 li, .cont_right li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size');
 	var currentFontSizeNum = parseFloat(currentFontSize, 10);
	
    var newFontSize = currentFontSizeNum*0.8;
	if (newFontSize > 7) {
	$('h1, h2, h3, h4, p, li .readmore, #footer_links, .cont_left li, .cont_left1 p, .cont_left1 li,.cont_right1 h1, .cont_right li, .zebra1, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size', newFontSize);
	}
	return false;
  });
  
   // Reset Font Size
  var originalFontSize = $('.defaulttxt,.texthd2,.accordtextarea,.accordtextarea2,p,#footer li,.cont_right h1,.cont_right1 h1, .zebra1, .cont_right li, .cont_left1 p, .cont_left1 li, .cont_left p, .cont_left li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size');
  $(".resetFont").click(function(){
  $('.defaulttxt,.texthd2,.accordtextarea,.accordtextarea2,.cont_text,p,#footer li,.cont_right h1,.cont_right1 h1, .cont_right li, .zebra1,.cont_left p, .cont_left li, .cont_left1 p, .cont_left1 li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size', originalFontSize);
  });
  // Increase Font Size
  $(".increaseFont").click(function(){
  	var currentFontSize = $('.defaulttxt,.texthd2,.accordtextarea,.cont_text,.accordtextarea2,p,.cont_right h1,.cont_right1 h1, .zebra1, .cont_right li,#footer li,.cont_left p, .cont_left li, .cont_left1 p, .cont_left1 li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size');
 	var currentFontSizeNum = parseFloat(currentFontSize, 10);
	
	
    var newFontSize = currentFontSizeNum*1.2;
	if (newFontSize < 18) {
	$('.defaulttxt,.texthd2,.accordtextarea,.accordtextarea2,.cont_text,p,#footer li,.cont_right h1,.cont_right1 h1, .cont_right li, .zebra1,.cont_left p,.cont_left li, .cont_left1 p, .cont_left1 li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size', newFontSize);
	}
	
	return false;
  });
  // Decrease Font Size
  $(".decreaseFont").click(function(){
  	var currentFontSize = $('.defaulttxt,.texthd2,.accordtextarea,.cont_text,.accordtextarea2,.cont_right h1,.cont_right1 h1, .zebra1, .cont_right li,p,#footer li,.cont_left p,.cont_left li, .cont_left1 p, .cont_left1 li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size');
 	var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*0.8;
	if (newFontSize > 7) {
	$('.defaulttxt,.texthd2,.accordtextarea,.accordtextarea2,p,.cont_text,#footer li,.cont_right h1,.cont_right1 h1, .cont_right li, .zebra1,.content_area,.content_area h1,.cont_left p,.cont_left li, .cont_left1 p, .cont_left1 li, .cntdvinleft, .cntdvinleft h1 h2 h4 , .cntdvinleft h4, .cntdvright, .cntdvright h4, .clblue, .clblue2, .clblue3,.readmore').css('font-size', newFontSize);
	}
	return false;
  });
//To move thumbnail image up and down on Rollover. 

	$(".thumb").hover(function() {
		$(this).find('a').addClass("hover");
			$(this).animate({
				marginTop: '-20px', 
				marginLeft: '0' 			
			}, 200, function() {
		// Animation complete.
	  });
	});
	$(".thumb").mouseout(function() {
		$(this).find('a').removeClass("hover");
		$(this).animate({
				marginTop: '0px', 
				marginLeft: '0' 			
		}, 400, function() {
		// Animation complete.
		});
	});
});







