$(function(){
	// tabs
	$('#tabs').tabs();
	
	// accordion
	$(".accordion").accordion({
		autoHeight: false						  
	});
	
	// date picker
	$(".datePicker").datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: 'dd-M-yy'
    });
	
	// search results hover
	$(".imgResult").hover(function(){
		$(this).removeClass("imgResult").addClass("imgResultHover");						  				  
	}, function(){
		$(this).removeClass("imgResultHover").addClass("imgResult");	
	});
	
	// code generator modal dialog link
	$('#dialog').dialog({
		autoOpen: false,
		width: 420,
		resizable: false,
		modal: true
	});
				
	$('.dialog_link').click(function(){
		$('#dialog').dialog('open');
			return false;
		});
	
	// image modal dialog link
	$('#img_dialog').dialog({
		autoOpen: false,
		resizable: false,
		modal: true
	});
	
	$('.img_link').click(function(){
		$('#img_dialog').dialog('open');
			return false;
		});
	
	$(".hint, .error, .morehelp").hide();
	$("#Password, #URLName, #newPassword").focus(function() {
	    $(".hint").show("fast");
	});

	$("#Password, #URLName, #newPassword").focus(function() {
	    $(".hint, .error, .morehelp").hide();
	    $(".error").show("fast");
	});

	$("#Password, #URLName, #newPassword").blur(function() {
	    $(".hint").hide("fast");
	});
});

$(document).ready(function() {
    $(".tabs > li").css("white-space", "nowrap");
//    $(".tabsContainer").height($(".tabsContainer").attr("scrollHeight"));
    
});	
