jQuery.noConflict();


// when DOM is ready
jQuery(document).ready(function($) {
	// clear search default text on focus
	$(".clearDefault").focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
	// initialize the partners slideshow
	$('#partners').cycle({
		fx: 	'fade', 
    	speed:   700,   
    	timeout: 2500
	});
	// fade product grid images on hover
	$('.productGrid a img')
		.css( {opacity: 1} );
	$('.productGrid a')
		.mouseover(function(){
			$(this).find('img').stop().animate({opacity: .75}, 200)
		})
		.mouseout(function(){
			$(this).find('img').stop().animate({opacity: 1}, 200)
		})
});

/* Random quotes */
jQuery(document).ready(function($){
	$i = Math.floor(Math.random() * $("#allQuotes h2").length);
	if($("#allQuotes h2").get($i) != undefined){
		$quote = $("#allQuotes h2").get($i);
		//$author = $("#allQuotes h2").get($i).next();
		$author = $("#allQuotes h2 ~ p").get($i)
		$(".quote").html($quote);
		$(".quote").append($author);
	}else{
		$(".quote").hide();
	}
	
	// init Cufon
	Cufon.replace('h1, h2, h4');
	
});

