if(isWeb){	
	if(document.useTransitions){
		/* transitions: scale up/down menu button images */
		$('.topic_select').mouseover(function(e){
			if($(this).children('.overlay').css('display')==='none'){
				$(this).children('.heading_area').children('img').addClass('menu_scale');
			}
		});
		/* transitions: scale up/down menu button images */
		$('.topic_select').mouseout(function(e){
			if($(this).children('.overlay').css('display')==='none'){
				$(this).children('.heading_area').children('img').removeClass('menu_scale');
			}
		});		
		/* transitions: scale up/down hotspot button images */
		$('.hotspot_btn').mouseover(function(e){
			var hspID = $(this).attr('id').split('btn_')[1];
			if (hspID != currHotSpotItem)
			{
				$(this).children('img').addClass('hotspot_scale');
			}
		});
		/* transitions: scale up/down hotspot button images */
		$('.hotspot_btn').mouseout(function(e){
			$(this).children('img').removeClass('hotspot_scale');
		});
	}
}

/* transitions: fade in topics one at a time */
function calcHeight(){	
	var tempArr = []
	$('.topic_select').each(function(){		
		tempArr.push($(this).height());		
	});	
	tempArr.sort(function(a, b){return b-a});	
	$('.topic_select').css('min-height', tempArr[0]+'px !important');
}

/* transitions: fade in topics one at a time */
function displayMenu(){	
	if(isWeb){
		if(document.useTransitions){
			calcHeight();
			topic_height();			
			var tileCount = $('.topic_select').length;
			var i = 1;
			$('.menu_topic_select_bg_'+i).fadeIn(300, function showNext() {
				if(i < tileCount+1){
					$(this).children('.top_wrapper').children('.select_title').animate({opacity:1}, 200, function(){					
						$(this).parent('.top_wrapper').children('.select_description').animate({opacity:1}, 200, function(){					
							topic_height()
							i++;
							$('.menu_topic_select_bg_'+i).fadeIn(300, showNext );
							if (i == tileCount)
							{
								$('.home-copyright').fadeIn(300);
							}	
						});					
					});
				}
			});			
		}else{
			$('.select_title').css('opacity',1);
			$('.select_description').css('opacity',1);
			$('.topic_select').css('display','block');
			$('.home-copyright').css('display','block');
		}
	}else{
		$('.select_title').css('opacity',1);
		$('.select_description').css('opacity',1);
		$('.topic_select').css('display','block');
		$('.home-copyright').css('display','block');
	}
	/* 101223 fix for custom menu topics appearing too low on Firefox */
	if (isFF)
	{
		$(".menu_flex_1").addClass("menu_flex_1_ff");
	}
}

function animateContent(sec){
	if(document.useTransitions){
		var winTop = Math.max($('body').scrollTop(), $('html').scrollTop());	

		var distance = -$(window).height();

		$("#sec_"+sec).find('.animation-element').each(function(index, element) {

			if (winTop > Math.round($(this).offset().top)+distance){

				$(this).addClass("in-view");

				if($(this).hasClass("content_video")){
					$(this).next().addClass("in-view")
				}
			}
		});
	}
	
}

