//Cufon 
Cufon.replace('H1')('H2')('#content .main-content .tabs UL.main-tabs LI A', {hover: true});

$(document).ready(function(){
	
	// Selectboxes
	if ($('.cusel').length) {
			var params = {
				changedEl: "SELECT",
				visRows: 5,
				scrollArrows: true
			}
			cuSel(params);
			
			$(".cusel").each(function(){
				var w = parseInt(jQuery(this).width()),
					scrollPanel = jQuery(this).find(".cusel-scroll-pane");
				if(w>=scrollPanel.width())
				{
					jQuery(this).find(".jScrollPaneContainer").width(w);
					scrollPanel.width(w);
				}
			});	
	}
	
	// Clear input
	$('INPUT.auto-hint').focus(function(){
		if ($(this).attr('value') == $(this).attr('title')) $(this).attr('value', '');
	});
	$('INPUT.auto-hint').blur(function(){
		if ($(this).attr('value') == '') $(this).attr('value', $(this).attr('title'));
	});
	
	// Radio inputs
	$('#content .sidebar .radio-inputs INPUT').each(function(){
		if ($(this).attr("checked")) 
			$(this).parent().children('label').addClass('checked');
	});
	
	$('#content .sidebar .radio-inputs INPUT').change(function(){
		$('#content .sidebar .radio-inputs INPUT').each(function(){
			if ($(this).attr("checked")) 
				$(this).parent().children('label').addClass('checked');
					else $(this).parent().children('label').removeClass('checked');
		});
	});
	
});




