

var $j = jQuery.noConflict();

$j (document).ready(function() {
							 														 	
	//$j('.single_product_display .imagecol a').colorbox({rel:'prod-slideshow'}) 
	$j("td.wpsc_checkout_form_19").next().addClass('check');
	$j("td.wpsc_checkout_form_19 label").append('<br /><a href="/terms-conditions/" title="Read the Terms and Conditions" rel="external">read here</a>');
	
	$j('.colorbox').colorbox();
														 
	$j('a[rel="external"]').click(function(){ 
		this.target = "_blank";
	});
	
	$j('#nav ul').superfish({
		hoverClass: 'sfHover',
		delay: 100,
		animation: {opacity:'show'},
		speed: 'normal'
	}); 

	$j("#sidebar .sub-nav li.slidey").accordion({ 										 
		event: "click",
		active: true,
		animated: 'slide',
		collapsible: true,
		autoHeight: false,
		header: '> span'
	});
	$j('.watermarked').watermark('watermark');	
	
	Cufon.replace('h2.pagetitle',{'fontFamily':'england'});
	Cufon.now();
});

(function($) {
	$.fn.watermark = function(c, t) {
		var e = function(e) {
			var i = $(this);
			if (!i.val()) {
				var w = t || i.attr('title'), $c = $($("<div />").append(i.clone()).html().replace(/type=\"?password\"?/, 'type="text"')).val(w).addClass(c);
				i.replaceWith($c);
				$c.focus(function() {
					$c.replaceWith(i); setTimeout(function() {i.focus();}, 1);
				})
				.change(function(e) {
					i.val($c.val()); $c.val(w); i.val() && $c.replaceWith(i);
				})
				.closest('form').submit(function() {
					$c.replaceWith(i);
				});
			}
		};
		return $(this).live('blur change', e).change();
	};
})(jQuery);

