var a_title = '';
$(document).ready(function(){ 
	$("ul.sf-menu").superfish({
		autoArrows: false
	}); 
	TopUp.addPresets({
	   ".zoom": {
	      	shaded: 1,
			layout: "quicklook",
			resizable: 1
	    }
	  });
	$('a').hover(function() {
		a_title = $(this).attr('title');
		$(this).attr('title', '');
	}, function() {
		$(this).attr('title', a_title);
	});
});
function stripCurrentClass(ele_class){
	return ele_class.split(" ")[0];
};
function stripPrefix(ele_class, prefix){
	return ele_class.split(prefix)[1];
};
function getAnchorTag(){
	return location.href.split('#')[1];
};
function addCloseButton(){
	$('a.te_close_link').append('<img src="/images/buttons/close_button.png" width="12" height="12" alt="Close Button" />&nbsp;Close');
};
function removeCloseButton(){
	$('a.te_close_link').html('');
};
function getShortestChildHeight(parent){
	var shortestcopy = 0;
	$(parent).each(
		function(index) {
			var height = $(this).height();
		    if (height < shortestcopy) { 
		            shortestcopy = height; 
		    }
		}
	);
	return shortestcopy;
};
function getTallestChildHeight(parent){
	var tallestcopy = 0;
	$(parent).each(
		function(index) {
			var height = $(this).height();
		    if (height > tallestcopy) { 
		            tallestcopy = height; 
		    }
		}
	);
	return tallestcopy;
};
function redirectToTab(tabName){
	new_location = location.href.split('#')[0] + '#' + tabName;
	window.location = new_location;
	location.reload();
	return;
};
