/************************************************************************/
$(function(){
	// dropdown menu
	$("ul.sf-menu").supersubs({ 
		animation:{opacity:"show",height:"show"},
        delay:80,
        speed:"normal",
        dropShadows:false,  
        oldJquery:false,  
        disableHI:true,   
        autoArrows:false,   
		minWidth:12,   
		maxWidth:30,    
		extraWidth:1 
	}).superfish();	
	
	$('button, input:submit, .abutton').button();
	
	$("a[rel='colorbox']").colorbox({
		transition:"fade",
//		current: "{current} of {total}"
		current: ""
	});	

	// background rollover styles for news
	$('.homenews li').hover(function() {
		$(this).addClass('homenewshover');
	}, function() {
		$(this).removeClass('homenewshover');
	});		

	// background rollover styles for main menu	
	$('.menucell, .menurtcell, .menultcell').hover(function() {
		$(this).addClass('menucellhover');
	}, function() {
		$(this).removeClass('menucellhover');
	});			

	$("#faqcontent").accordion({
		active: false,
		collapsible: true,
		autoHeight: false,
		icons:{'header': 'ui-icon-circle-plus', 'headerSelected': 'ui-icon-circle-minus'}
	})		
	// round corners
	$(".roundedcorner").corner();

	// tooltip
	$('.tooltip').tipsy({gravity: 'w',fade:true}); 

	$("#errordialog").dialog({
		autoOpen: false,			 
		zIndex: 50000,
		modal: true,
		buttons: {
			OK: function() {
				$(this).dialog('close');
			}
		}
	});	
});
