$(document).ready(function () {	
	$('li.mainMenu').hoverIntent(
		function() { $('.subMenuContainer', this).slideDown('fast'); },					   
		function() { $('.subMenuContainer', this).slideUp('fast'); }
	).css('height','50px');

	$('li.mainMenu').hover(
		function() { $(this).addClass('mainMenuHover'); },					   
		function() { $(this).removeClass('mainMenuHover'); }					   
	).css('height','50px');
});

$(function() {
    $('a.mailingList').colorbox({iframe:true,width:350, height:470});
	$('a.popUp').colorbox({ iframe:true, width:350, height:470 });
	$('a.popUpInline').colorbox({ inline:true, width:350, height:470 });
	$('a.gallery').colorbox();
	$('a.gallery2').colorbox({ height: "600px" });
 
$('#slideShow .slidesContainer').cycle({ 
	fx:     	'fade', 
	speed:  	500,
	timeout: 	8000,
	pager:  	'.controls' 
});
 
  })

$('#background').cycle({ 
	fx:    'fade', 
	speed:  600,
	timeout: 9000
 });

$('#images').cycle({ 
	fx:    'fade', 
	speed:  600,
	timeout: 3000,
	cleartype: true, 
	cleartypeNoBg: true
 });
$('#slides').cycle({ 
	fx:    'fade', 
	speed:  500,
	timeout: 4000,
	cleartype: true, 
	cleartypeNoBg: true,
	pager:  '#featureNav'
});
$('.slides2').cycle({ 
	fx:    'fade', 
	speed:  500,
	timeout: 4000,
	cleartype: true, 
	cleartypeNoBg: true,
	pager:  '#featureNav',
	random: 1
});

$('.slide').bind('change', function() {
  alert('User clicked on "foo."');
});


$(function(){
	
	// Tabs
	$('#tabs').tabs();
				
	//hover states on the static widgets
	$('#dialog_link, ul#icons li').hover(
		function() { $(this).addClass('ui-state-hover'); }, 
		function() { $(this).removeClass('ui-state-hover'); }
	);
				
$('#tab-one').click(function() { $('#tabs').addClass('tab1');});
$('#tab-one').click(function() { $('#tabs').removeClass('tab2 tab3 tab4');});
$('#tab-two').click(function() { $('#tabs').addClass('tab2');});
$('#tab-two').click(function() { $('#tabs').removeClass('tab1 tab3 tab4');});
$('#tab-three').click(function() { $('#tabs').addClass('tab3');});
$('#tab-three').click(function() { $('#tabs').removeClass('tab1 tab2 tab4');});
$('#tab-four').click(function() { $('#tabs').addClass('tab4');});
$('#tab-four').click(function() { $('#tabs').removeClass('tab1 tab2 tab3');});

});



$(document).ready(function() { $('#tab-bioparkNews li:odd').addClass('white');});
$(document).ready(function() { $('#tab-tenantNews li:odd').addClass('white');});
$(document).ready(function() { $('#tab-universityNews li:odd').addClass('white');});


