	//cufon 
	Cufon.replace('#left_col h1', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col h2', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col h3', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col h4', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col h5', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col h1', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col h2', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col h3', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col h4', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col h5', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col_inside h1', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col_inside h2', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col_inside h3', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col_inside h4', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#left_col_inside h5', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col_inside h1', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col_inside h2', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col_inside h3', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col_inside h4', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#right_col_inside h5', {fontFamily: 'ConduitITCStd',hover: true});
	Cufon.replace('#search-prods', {fontFamily: 'ConduitITCStd'});
	Cufon.replace('.heading-drop', {fontFamily: 'ConduitITCStd'});
	
	

	Cufon.replace('.cuf-replace',  {textShadow: '0px 1px #000' , hover: true});

	//Cufon.replace('#tagline');Cufon.set('fontFamily', 'Univers');
	
	//Cufon.replace('#tagline', { fontFamily: 'Univers' });

	
	
	
	// Clear form fields on focus and blur
	function prefillClear(field) {

if (field.defaultValue==field.value) {field.value = '';}

else if (field.value == '') {field.value = field.defaultValue;}

}


/*sliding flags at the right  *****************/
$(function() {
     var offset = $("#flag_box").offset();
     var topPadding = 15;
     $(window).scroll(function() {
         if ($(window).scrollTop() > offset.top) {
             $("#flag_box").stop().animate({
                 marginTop: $(window).scrollTop()+ 50 - offset.top + topPadding
             },600);
         } else {
             $("#flag_box").stop().animate({
                 marginTop: 0
             },600);
         };
     });
 });


/******************************* change font size  ****************************/

$(document).ready(function() {
		
					$('.cuf-replace').fadeIn('slow');//show sufon fonts
					
					
				var change_by = 20;//change size by XX%
						//list of container to look after, must be an ID
					var containers = new Array ('left_col','right_col','left_col_inside','right_col_inside');//add containers within the array
		
					//list the HTML elements to update
					var elements = new Array('h1','h2','h3','h4','h5','p','span','li');
				
				
				function changeSize(action)
				{
				
				//loop through each area to change
						for (i=0;i<containers.length;i++)
						{
						
								//now loop through each element and change the size
								for (a=0;a<elements.length;a++)
								{
								
								if ($('#'+ containers[i]).find(elements[a]).length!=0){
								
										var this_size = $('#'+ containers[i]).find(elements[a]).css('font-size');
										if (this_size!='undefined')
										{
										
												this_size  = this_size.substring(0,this_size.indexOf('px'));
												
												var new_size;
												
												//increase or decrease
												if (action ==1)
												{
												
												new_size = parseInt(parseInt(this_size) + (parseInt(this_size) * change_by /100))
												}
												else if (action == 2){new_size = parseInt(parseInt(this_size) - (parseInt(this_size) * change_by /100))}
												
												
												
												//assign the new size
												$('#'+ containers[i]).find(elements[a]).css('font-size',new_size+'px');
												
										
										}
									}//closes if element exist
								}//closes loop (a)
								
								
						}//closes the for loop (i)
				}
		
					$('#increase_font').click(function() {changeSize(1);});
				$('#decrease_font').click(function() {changeSize(2);});
				
				});



/*
	jQuery - siteFeature Plugin
	@copyright Michael Kafka - http://www.makfak.com
	@version 2.6.2
*/

//*************************************  drop down menu  **********************************/


$(document).ready(function() {
	

	function megaHoverOver(){
		$(this).find(".sub").stop().fadeTo('fast', 1).show();
			
		//Calculate width of all ul's
		(function($) { 
			jQuery.fn.calcSubWidth = function() {
				rowWidth = 0;
				//Calculate row
				$(this).find("ul").each(function() {					
					rowWidth += $(this).width(); 
				});	
			};
		})(jQuery); 
		
		if ( $(this).find(".row").length > 0 ) { //If row exists...
			var biggestRow = 0;	
			//Calculate each row
			$(this).find(".row").each(function() {							   
				$(this).calcSubWidth();
				//Find biggest row
				if(rowWidth > biggestRow) {
					biggestRow = rowWidth;
				}
			});
			//Set width
			$(this).find(".sub").css({'width' :'auto'});//originally was biggestRow
			$(this).find(".row:last").css({'margin':'0'});
			
		} else { //If row does not exist...
			
			$(this).calcSubWidth();
			//Set Width
			$(this).find(".sub").css({'width' : rowWidth});
			
		}
	}
	
	function megaHoverOut(){ 
	  $(this).find(".sub").stop().fadeTo('fast', 0, function() {
		  $(this).hide(); 
	  });
	}


	var config = {    
		 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 70, // number = milliseconds for onMouseOver polling interval    
		 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)    
		 timeout: 250, // number = milliseconds delay before onMouseOut    
		 out: megaHoverOut // function = onMouseOut callback (REQUIRED)    
	};

	$("ul#topnav li .sub").css({'opacity':'0'});
	$("ul#topnav li").hoverIntent(config);



});




/******************************* horizontal menu at top  ******************************/


 
$(document).ready(function() {
	  
 
       $("#header_links li").hover(
  function () {$(this).find("ul").fadeIn(500); }, 
  function () {$(this).find("ul").fadeOut(100); }
	);

});


/********************************   advanced search layer  *********************************/


var search_open=0;
function showSearch()
{

		//adv_search
		if (search_open==0)
		{
		//open menu
		$('#adv_search').animate({width: '225px',height: '210px',left:'-68px', top:'45px',opacity: 1}, 250);
		
		search_open = 1;
		
		}
		else
		{
		
		//open menu
		$('#adv_search').animate({width: '0px',height: '0px',left:'0px',opacity: 0}, 250);
		
		search_open = 0;
		
		}
		
	
}


//open and close the login
var login_open = 0;
function openLogin()
{

	
	

	
	if (login_open==0)
	{
		
		$('#login_panel').slideDown(500);
		login_open = 1;
		
		
		
	}
	else
	{
		$('#login_panel').slideUp(500);
		login_open = 0;
		
	}
	
	
	
	
}//end function



//false login
function loginUser()
{
	
	alert("Sorry, wrong login!");
	document.login_top.log_email.value = '';
	document.login_top.log_password.value = '';
	
}



/***************************** tabs on some patient pages  *******************************/

$(document).ready(function() {

	//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


	//attribute an idea to each tab
	$('.tabs li').each(function(i) {
	var thisId = $(this).find("a").attr("href");
	thisId = thisId.substring(1,thisId.length) + '_top';
	$(this).attr("id",thisId);
	});	



	function changeTab(activeTab)
	{
	
				$("ul.tabs li").removeClass("active"); //Remove any "active" class
				$(activeTab + '_top').addClass("active"); //Add "active" class to selected tab, using the id created at document load
				
				$(".tab_content").hide(); //Hide all tab content
				$(activeTab).fadeIn(); //Fade in the active content
				
	
	}
	
	//check to see if a tab is called onload
	if (location.hash!=''){changeTab(location.hash);}
	
	
	
	//On Click Event
	$("ul.tabs li").click(function() {
	
			//call above function
			changeTab($(this).find("a").attr("href"));
			return false;
	});
	
	
	$(".external_link").click(function() {
	
			//call above function
			changeTab($(this).attr("href"));
			return false;
		});
	
	
		

});



/****************** keep over effect on drop down*********************/
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}


function removeBrMess()
	{
		
		createCookie('browsermess1','1',1);
		
		$('#IE6_message').fadeOut(500);
		
	}
	
	
	
	$(document).ready(function() {
							   
							  


	$("#topnav li .sub").hover(
							
  function () {$(this).prev().css('background', '#3c3c3c'); }, 
  function () {$(this).prev().css('background', ''); }
  
  
  );
	
	
	
	
	/****************** browser detection*******************/
	
	
	var donotshowmessage = readCookie('browsermess1');
								
	
	
	if (navigator.appName == 'Microsoft Internet Explorer' && navigator.appVersion.indexOf("MSIE 6.")!=-1 && donotshowmessage!=1)
	{
		
		//don't forget to upload the images!!!!
		var url = 'http://' + window.location.hostname + '/';
		
		
		
		$('body').append('<div id="IE6_message"><br /><p><strong>Did you know that your version of Internet Explorer is out of date?</strong></p><br /><br /><p>To get the best possible experience using our website we recommend that you upgrade to a newer version or another web browser. </p><p>A list of the most popular web browsers can be found below.<br />Just click on the icons to get to the download page.</p><p><a href="http://www.mozilla.com/firefox/" target="_blank"><img src="'+url+'library/browsers/browser_firefox.gif" alt="Firefos" width="100" height="100" border="0" /></a>&nbsp;&nbsp;&nbsp;<a href="http://www.google.com/chrome" target="_blank"><img src="'+url+'library/browsers/browser_chrome.gif" alt="Google Chrome" width="100" height="100" border="0" /></a>&nbsp;&nbsp;&nbsp;<a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx" target="_blank"><img src="'+url+'library/browsers/browser_ie.gif" alt="Internet Explorer" width="100" height="100" border="0" /></a>&nbsp;&nbsp;&nbsp;<a href="http://www.apple.com/safari/download/" target="_blank"><img src="'+url+'library/browsers/browser_safari.gif" alt="Safari" width="100" height="100" border="0" /></a></p><p><strong>Important:</strong> Some of the functionalities / layout on this website may not render as expected on your current browser.</p><p>&nbsp;</p><p>Upgrading is FREE!<br />Why not select a new browser now.</p><p>&nbsp;</p><p><a href="javascript:removeBrMess();">Dismiss this message</a></p><p>&nbsp;</p></div>') 

		
		
	}
	
	
	
	
	
	
	
	
	
	
	});


/**************************  news ticker ************************************/
function pickEffect()
		{
		
		var effects = new Array('cover','fadeZoom','growX','growY','scrollUp','scrollDown','scrollLeft','scrollRight','scrollHorz','scrollVert','shuffle','slideX','slideY','turnUp','turnDown','turnLeft','turnRight','uncover','wipe','zoom')
		//create a random number
		var randno = Math.floor ( Math.random() * effects.length ); 
		
		return effects[randno];
		
		}



$(document).ready(function() {
    $('#newsticker').cycle({
	delay:  500,
		fx:  'scrollUp' /*pickEffect()*/ // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});

//doc and samples at http://www.malsup.com/jquery/cycle/

/*      clinic listings    *************/

			
			var lastOP = 0;
			function showArea(id)
					{
					
					$('.clinics_list_more').slideUp('slow');
					
					$('#more_'+id).slideDown('slow');
					
					$('#button_container_'+id).html('<a href="javascript:hideArea('+id+')"><img src="http://www.Globaldiagnostics.ie/library/clinics_less.jpg" alt="Collapse information" /></a>');
					
					if (lastOP!=0)
					{
					$('#button_container_'+lastOP).html('<a href="javascript:showArea('+lastOP+')"><img src="http://www.Globaldiagnostics.ie/library/clinics_plus.jpg" alt="Collapse information" /></a>');
					
					
					}
					
					lastOP = id;
						
					}




function hideArea(id)
					{
					
					
					
					$('#more_'+id).slideUp('slow');
					
					$('#button_container_'+id).html('<a href="javascript:showArea('+id+')"><img src="http://www.Globaldiagnostics.ie/library/clinics_plus.jpg" alt="Collapse information" /></a>');
					
				
					}






