/************************************************************************/
$(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 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();

	$("#errordialog").dialog({
		autoOpen: false,			 
		zIndex: 50000,
		modal: true,
		buttons: {
			OK: function() {
				$(this).dialog('close');
			}
		}
	});	
});
//***********************************************************************************
/*function getElementHeight(Elem) {
	if (ns4) {
		var elem = getObjNN4(document, Elem);
		return elem.clip.height;
	} else {
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all){
			var elem = document.all[Elem];
		}
		if (op5) { 
			xPos = elem.style.pixelHeight;
		} else {
			xPos = elem.offsetHeight;
		}
		return xPos;
	} 
}*/
//*****************************************************************************************
/*String.prototype.trim = function() {
	return this.ltrim().rtrim();
};

String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}

String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}*/
//***********************************************************************************
