// JavaScript Document
$(document).ready(function() {


//---Add a print button to the Orders Page

	$('tr.ucOrderClick-processed').each(function() {
		var oid= $(this).attr('id');
		var oidsubstr = oid.split('-')		
		$(this).children(":first").append('<a href="/admin/store/orders/' + oidsubstr[1] + '/invoice/print">Print</a>');
	});
	

//----  Sets the search input

	$('#solr-search-text').val('Use a keyword, title, author or ISBN');
	$('#solr-search-text').focus(function () {
		if($(this).val() == 'Use a keyword, title, author or ISBN') {
			$(this).val('').addClass('filled');
		}
	});
	$('#solr-search-text').blur(function () {
		if($(this).val() == '') {
			$(this).val('Use a keyword, title, author or ISBN').removeClass('filled');
		}
	});

//----  Creates an "All" link next to expanded TV Menu Items

	$('#block-tvmenu-0 .expanded>a, #block-tvmenu-0 .collapsed>a').each(function() {
		$(this).after('<a class="direct" href="'+$(this).attr('href')+'">&nbsp;</a>');
	});


//--- Hides the "clone" tab for products

	$('.node-type-product .tabs li:nth-child(3)').addClass('hide');


//--- Remove Delete Button from Taxonomy Term Edit Screen
	
	$('#taxonomy-form-term #edit-delete').css('display','none');
	$('.user-admin #taxonomy-form-term #edit-delete').css('display','inline-block');


});

