
$(document).ready(function() {

	// fix all PNG images for IE6
	if(IE6) {
		$("img[src$='.png']").each(function() {
			var src = $(this).attr('src');
			$(this).attr("src", "http://www.dynamit.us/img/spacer.gif").attr("style", "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "');");
		});
	}


	// ADMIN functions
	// .list pages

	// batch process handlers
	$('#batch-submit').click(function() {
		$('#batch-form').attr('action', $('#batch-action').val()).submit();
	});

	$('#batch-all').click(function() {
		var check = $("input[type='checkbox']").attr('checked');
		$('#batch-form').find("input[type='checkbox']").attr('checked', check);
	});

	// search box focus/blur effect
	$('input.search-box').focus(function() {
		var init = $(this).attr('init');
		if(!init || init.length == 0) {
			init = $(this).val();
			$(this).attr('init', init);
		}

		if($(this).val() == init) $(this).val('');
	}).blur(function() {
		var init = $(this).attr('init');
		if($(this).val() == '') $(this).val(init);
	});



});