// JavaScript Document



window.addEvent('domready', function(){

$$('div.other_products div.other_products_column').addEvent('mouseover', function(){
		this.getElements('div.more_detail').setStyle('display','');
	});
	$$('div.other_products div.other_products_column').addEvent('mouseout', function(){
		this.getElements('div.more_detail').setStyle('display','none');
	});

// Footer
	$$('div.footer a.facebook').addEvent('mouseover', function(){
		$$('div.footer p').setStyle('display','none');
		$$('div.footer p.facebook').setStyle('display','');
	});
	
	$$('div.footer a.twitter').addEvent('mouseover', function(){
		$$('div.footer p').setStyle('display','none');
		$$('div.footer p.twitter').setStyle('display','');
	});
	$$('div.footer a.linked_in').addEvent('mouseover', function(){
		$$('div.footer p').setStyle('display','none');
		$$('div.footer p.linked_in').setStyle('display','');
	});
	$$('div.footer a.email_us').addEvent('mouseover', function(){
		$$('div.footer p').setStyle('display','none');
		$$('div.footer p.email_us').setStyle('display','');
	});
		
// Choose a Color
$$('div.color_block a.natural').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Natural'
		});
});
$$('div.color_block a.purple').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on'); // remove 'on' class to clicked color block
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value'); //remove the value of the form
	    $$('form.foxycart input.color').setProperties({		//add the selected color to the value
    		value: 'Purple'
		});		
});
$$('div.color_block a.dark_green').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Dark Green'
		});
});
$$('div.color_block a.kelley_green').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Kelley Green'
		});
});
$$('div.color_block a.teal').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Teal'
		});
});
$$('div.color_block a.evening_blue').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Evening Blue'
		});
});
$$('div.color_block a.tangerine').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Tangerine'
		});
});
$$('div.color_block a.navy_blue').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Navy Blue'
		});
});
$$('div.color_block a.royal_blue').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Royal Blue'
		});
});
$$('div.color_block a.pearl_grey').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Pearl Grey'
		});
});
$$('div.color_block a.black').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Black'
		});
});
$$('div.color_block a.sunshine_orange').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Sunshine Orange'
		});
});
$$('div.color_block a.lemon_yellow').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Lemon Yellow'
		});
});
$$('div.color_block a.violet').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Violet'
		});
});
$$('div.color_block a.fuchsia').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Fushsia'
		});
});
$$('div.color_block a.scarlet').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Scarlet'
		});
});
$$('div.color_block a.wine').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Wine'
		});
});
$$('div.color_block a.yellow').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Yellow'
		});
});
$$('div.color_block a.golden_yellow').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Golden Yellow'
		});
});
$$('div.color_block a.aquamarine').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');

	    $$('form.foxycart input.color').setProperties({
    		value: 'Aquamarine'
		});
});
$$('div.color_block a.denim_blue').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Denim Blue'
		});
});
$$('div.color_block a.tan').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Tan'
		});
});
$$('div.color_block a.cocoa_brown').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Cocoa Brown'
		});
});
$$('div.color_block a.dark_brown').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Dark Brown'
		});
});
$$('div.color_block a.apple_green').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Apple Green'
		});
});
$$('div.color_block a.petal_pink').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Petal Pink'
		});
});
$$('div.color_block a.cherry_red').addEvent('click', function(event){
		event.stop();
		$$('div.color_block a').removeClass('on');
		this.addClass('on');
		$$('form.foxycart input.color').removeProperty('value');
	    $$('form.foxycart input.color').setProperties({
    		value: 'Cherry Red'
		});
});



// Color Hover Sticky Windwow
new Tips.Pointy($$('div.pointyTips div.color_block a'));


});// end of dom ready



