jQuery.noConflict();

jQuery(function(){
	if (!jQuery.browser.msie) {
		/*jQuery(".navdiv > .insideDiv:not(.selectedDiv)").hover(
			function(){
				jQuery(this).css('background-image', 'url(/images/background/nav_menu_background_over.png)');
				jQuery(this).css('border', 'e5b4e5');
			},
			function(){
				jQuery(this).css('background-image', 'url(/images/background/nav_menu_background.png)');
				jQuery(this).css('border', 'c0c0c0');
			}
		);*/
	}
	
	jQuery('.home_rotator > div').hide();
	jQuery('.home_rotator > div:first').show();
	append = '';
	for (i=1;i<=jQuery('.home_rotator > div').size();i=i+1){
		var src = (i!=1) ? '/images/rotator/dot_small.png' : '/images/rotator/dot_large.png';
		append = append + "<img class='rotate_button rotator_" + i + "' element_id='" + i + "' src='" + src + "' />"
	}
	
	jQuery('.home_rotator > div').prepend(append + "&nbsp;&nbsp;&nbsp;");
	
	var active = jQuery('.rotator_1');
	
	jQuery.fn.rotate = function() {
		var id = jQuery(this).attr('element_id')
		jQuery('.home_rotator > div:visible').fadeOut(500);
		jQuery('.home_rotator_' + id).fadeIn(500);
		jQuery('.rotate_button').attr('src', jQuery(this).attr('src').replace('large', 'small'));
		active = jQuery('.rotator_' + id);
		jQuery('.rotator_' + id).attr('src', jQuery(this).attr('src').replace('small', 'large'));
	};
	
	var rotator_obj = setInterval(function(){
		active = (active.next('.rotate_button').length == 0) ? jQuery('.rotator_1') : active = active.next();
		active.rotate();
	},5000);
	
	jQuery('.rotate_button').click(function(){jQuery(this).rotate();}).click(function(){clearInterval(rotator_obj);});
	
	jQuery('.homebox h3, .homebox h2, .homeboxsmall h4').css('text-indent', '-9999px');
	
	jQuery('.default-value').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;
	        }
	    });
	});
	
	jQuery('.submit_button').click(function(){
		item = jQuery(this).next().children().first().children().first()
		if (item.val() != "")
		{
			jQuery(this).next().children().first().submit();
		}
		
	})
	jQuery('.boxbottom').corner("bottom 6px");
	//jQuery('.navdiv .insideDiv').corner("top 6px");
	jQuery('.cartholder, .footer_bottom').corner("all 6px");
	
	//jQuery('#classic_years_dvd_cards').hover(function(){jQuery('#a_classic_years_dvd_cards').css('color', '#000')}, function(){jQuery('#a_classic_years_dvd_cards').css('color', '#FFF')});
	//jQuery('#classic_years_cd_cards').hover(function(){jQuery('#a_classic_years_cd_cards').css('color', '#000')}, function(){jQuery('#a_classic_years_cd_cards').css('color', '#FFF')});
});