	function openWindow() {
		return OpenT('/reviews/read_reviews.jsp','560','760');
		return false;
	}
	
	function showTab(activated){
		var activeContent = '.'+activated+'Content';
		var activeTab = '#'+activated;
		
		$(activeTab).siblings().removeClass('papCMTBActive');
		$(activeTab).addClass('papCMTBActive');
		
		// hide all content and show associated content
		$('.papCMTBCopy').hide();
		$(activeContent).show();

		if (activeContent == '.OverviewContent'){
			if (message){
			$('.papCMTBRowContent').css('height','780px');
			}	
			else{
			$('.papCMTBRowContent').css('height','700px');
			}			
		} else if (activeContent == '.NewClientsContent'){
			$('.papCMTBRowContent').css('height','775px');		
		} else if (activeContent == '.TrainCertContent'){
			$('.papCMTBRowContent').css('height','530px');		
		} else if (activeContent == '.DiscountsContent'){
			$('.papCMTBRowContent').css('height','775px');		
		} else if (activeContent == '.SupportContent'){
			$('.papCMTBRowContent').css('height','530px');		
		} 		
	}
				   
    $(function(){
	
        $('a.fz').fancyZoom({scaleImg: true, closeOnClick: true, directory: '/images/zoom'});
		$('a.toolTipClr01').qtip({
			style: {
			width: 425,
			tip: true,
			color: '#505050',
			border: {
				width: 2,
				radius: 3,
				color: '#365EBF'
			}
			},
			position: {
				corner: {
				target: 'rightMiddle',
				tooltip: 'leftMiddle'
				}
			}
		});
		
		var activeContent = "";
		var customLink = "";
		
		
		$('.papCMTBTab').mouseover(function() {
			$(this).css('cursor','pointer').children('h4').addClass('mouseOver');
		}).mouseout(function() {
			$(this).children('h4').removeClass('mouseOver');
		});;
				
		$('.papCMTBTab').bind('click touchstart', function() {
			activeContent = '.'+$(this).attr('id')+'Content';
			customLink = 'ProAdvisor_Overview-V2_Tab-'+$(this).attr('id');
			
			sendClickEvent(customLink);
			
			//alert(activeContent);
			if (activeContent == '.papCMTBLastContent'){
				return false;
			} else{
				$(this).siblings().removeClass('papCMTBActive');
				$(this).addClass('papCMTBActive');
				
				// hide all content and show associated content
				$('.papCMTBCopy').hide();
				$(activeContent).show();
				
				if (activeContent == '.OverviewContent'){
					if (message){
					$('.papCMTBRowContent').css('height','780px');
					}	
					else{
					$('.papCMTBRowContent').css('height','700px');
					}	
				} else if (activeContent == '.NewClientsContent'){
					$('.papCMTBRowContent').css('height','775px');		
				} else if (activeContent == '.TrainCertContent'){
					$('.papCMTBRowContent').css('height','530px');		
				} else if (activeContent == '.DiscountsContent'){
					$('.papCMTBRowContent').css('height','775px');		
				} else if (activeContent == '.SupportContent'){
					$('.papCMTBRowContent').css('height','530px');		
				} 					
			}
			
		});

		if(location.hash != "") {
		
			var temp = location.hash.replace('#','');
			
			if (temp == "footnotes"){
				showTab("Overview");
			} else{
				showTab(temp);
				var target = "#"+location.hash.split("#")[1]; // link url from outside
				$(location.hash).show(); //show tab content
				$(".papCMTBTab:has(a[href="+target+"])").addClass("papCMTBActive").show();
			}
			
		}


		$('.papCMTBLink').bind('click touchstart', function() {
		
			if ($(this).attr('id') == 'NewClientsLink'){
				var temp = 'NewClients';
				showTab(temp);
			} else if ($(this).attr('id') == 'TrainCertLink'){
				var temp = 'TrainCert';
				showTab(temp);
			} else if ($(this).attr('id') == 'DiscountsLink'){
				var temp = 'Discounts';
				showTab(temp);
			} else if ($(this).attr('id') == 'SupportLink'){
				var temp = 'Support';
				showTab(temp);
			} else{
				showTab('Overview');
			}
			
		});	
		
    });
