 /* in no conflict mode */
jQuery(document).ready(function () {  

 
/* IMAGE SWAPS  example of usage: give img the .buttonswap class and make sure to get the on (mouse on) and off (mouse off) */
	jQuery(".buttonSwap").hover(
	function()
	 {this.src = this.src.replace("_up","_down");},
	 function()
	 {this.src = this.src.replace("_down","_up");}
	);


/* Catalog Flyout */

jQuery('#catalogFlyout').css('opacity',0);
	jQuery(function(){
	jQuery(".flyOut").click(function(){
		jQuery("#catalogFlyout").animate({opacity: '1',marginRight:'360px'},'slow');	
	});	
	});
	
	jQuery(function(){
	jQuery(".flyIn").click(function(){
		jQuery("#catalogFlyout").animate({opacity: '0',marginRight:'0'},'slow');	
	});	
});


/* Catalog goto page on error */
	if (jQuery("#catalogFlyout .validation_error").length){
    // do something here
    document.location.href = '/form-error';
}

/* add even odd to product line section */
jQuery("div.productLinesEvenOdd > div.productLineBlock:nth-child(2n)").addClass("productLineBlockEven");

/* Fade images on rollover */
	jQuery(".fadeImage,.gotoPictureOne,.gotoPictureTwo,.gotoPictureThree,.gotoPictureFour,.gotoPictureFive,.gotoPictureSix").hover(function(){
	    jQuery(this).stop().animate({"opacity": .4},200);
	},function(){
	    jQuery(this).stop().animate({"opacity": 1},600);
	});


/* home page image rotation */
	jQuery('#homePageSplash').cycle({ 
		timeout: 4500,
		delay:-1500, 
		speed:   1000,
		pause: 1,
		fastOnEvent: 1 ,
		startingSlide: 0});
		
	jQuery('.gotoPictureOne').click(function() { 
	    jQuery('#homePageSplash').cycle(0); 
	    return false; }); 
	 
	jQuery('.gotoPictureTwo').click(function() {  
	    jQuery('#homePageSplash').cycle(1);  
	    return false; });
	    
	jQuery('.gotoPictureThree').click(function() {  
	    jQuery('#homePageSplash').cycle(2);  
	    return false; });
	    
 	jQuery('.gotoPictureFour').click(function() { 
    jQuery('#homePageSplash').cycle(3); 
	    return false; }); 
	 
		jQuery('.gotoPictureFive').click(function() {  
	    jQuery('#homePageSplash').cycle(4);  
	    return false; });
	    
 	jQuery('.gotoPictureSix').click(function() { 
    jQuery('#homePageSplash').cycle(5); 
	    return false; });  
	 

/* code to clear input box of label when clicked in */
jQuery('.default-value, #gform_wrapper_1 .gfield input, #gform_wrapper_2 .gfield input').each(function() {
       var default_value = this.value;
       jQuery(this).focus(function(){
               if(this.value == default_value) {
                       this.value = '';
               }
       });

       jQuery(this).blur(function(){
               if(this.value == '') {
                       this.value = default_value;
               }
       });
});




  
  
  
}); 
