(function($){
	$(document).ready(function() {
		$('input[type=text]').focus(function(){
			var currentVal = $(this).val();										// Read initial field value
			$(this).val('');														// Clear initial value

			$(this).blur(function(){
				var getNewVal = $(this).val();										// Read new input value
				if ( getNewVal == '' || getNewVal == ' ' ) {
					$(this).val(currentVal);										// Switch to initial value
				}
			});
		});
		
		// fix PNG for IE6
		//if ( $.browser.msie && $.browser.version == '6.0' )
			//DD_belatedPNG.fix('div, a, img, li');
		
		// remove any borders on last LI element
		$("ul").not('.product-images, .product-line, .nav').each(function(){
			 $(this).children("li:last").css({borderRight:"0",borderBottom:"0",background:"none",paddingRight:"0",marginRight:"0"});
		});

		$('ul.product-line li:nth-child(3n)').css({marginRight:'0'});

		if ( $("a[rel='prodimages']").length ){
			$("a[rel='prodimages']").colorbox({
				transition:"elastic",
				initialWidth:'160',
				initialHeight:'160'
			});
		}

		// hover on 3 links
		$('#office, #purchasing, #it').hover(
			function(){
				$('#hover-state').css('background','url("/layout/templates/images/hover/help.jpg") no-repeat');
			},
			function(){
				$('#hover-state').css('background','none');
			}
		);
	});
})(jQuery);
	
jQuery.fn.log = function (msg) {
  console.log("%s: %o", msg, this);
  return this;
};
