$(document).ready(function(){
	var dashToggle = $('#dash-toggle');
	var dashDetails = $('#dash-details');
	if(dashToggle.length && dashDetails.length) {
		dashToggle.click(function() {
			dashDetails.toggle(function() {
				if(dashDetails.css('display') == 'block') {
					dashToggle.removeClass("dash_open");
					dashToggle.addClass("dash_close");
					dashToggle.html("close");
				} else {
					dashToggle.html("more");
					dashToggle.addClass("dash_open");
					dashToggle.removeClass("dash_close");
				}
			});
		});
	}
	$('a').focus(function() {
		if(this.blur) {
			this.blur();
		}
	});

	$("#navi_in ul.suba .head").click(function() {
		$(this).next().toggle("slow");
	});

	$("#alert_groups_tree ul").treeview({
		persist: "location",
		collapsed: true,
		unique: true
	});

/*

	$(".popup-alert_info").cluetip({
		showTitle: false,
		width: 600,
		height: 350,
		attribute: 'rel',
		waitImage: true,
		arrows: false,
		dropShadow: true,
		dropShadowSteps:  6,
		sticky:           true,    // keep visible until manually closed
		mouseOutClose:    false,    // close when clueTip is moused out
		activation:       'click',  // set to 'click' to force user to click to show clueTip
		closePosition:    'top',    // location of close text for sticky cluetips; can be 'top' or 'bottom' or 'title'
		closeText:        'Close',  // text (or HTML) to to be clicked to close sticky clueTips
		// effect and speed for opening clueTips
		fx: {
			open:       'fadeIn', // can be 'show' or 'slideDown' or 'fadeIn'
			openSpeed:  700
		},
	});
	$(".popup-alert_info").thickbox({
		width: 600,
		height: 350,
		animate: null,
		i18n: {
			close: { text: 'Close', title: 'Close this window' },
			count: { text: 'Image #{image} / #{count}' },
			next: { text: 'Next', title: 'Show next image' },
			prev: { text: 'Previous', title: 'Show previous image' },
			confirm: { what: 'Are you sure?', confirm: 'Yes', cancel: 'No' }
		}
	});
	$(".popup-alert_info").map(function() {
		url = $(this).attr('rel');
		$(this).createDialog(url, false);
	});

*/
});