$(document).ready(function() {
	$('#cart_top').toggle(function() {
		$('#cart_bot').slideDown(300);
    $('#cart_arrow img',this).attr('src', RootURL + '/images/cart_arrow_w_up.gif');
	}, function() {
		$('#cart_bot').slideUp(300);
    $('#cart_arrow img',this).attr('src', RootURL + '/images/cart_arrow_w.gif');
	})

	function initRollovers() {
    $('.replace a').bind('mouseover', function() {
      $(this).css('background-position','0 -100px');
    })
    $('.replace a').bind('mouseout', function() {
      $(this).css('background-position','0 0');
    })
  }

  function initRollovers2() {
    $('.replace2 a').bind('mouseover', function() {
      $(this).css('background-position','0 -40px');
    })
    $('.replace2 a').bind('mouseout', function() {
      $(this).css('background-position','0 0');
    })
  }


	$('.large_button').toggle(function() {
		$('.replace a').unbind('mouseover').unbind('mouseout');
		$('.hidden',this).slideDown(300);
		$('.replace a',this).css('background-position','0 -200px');
	}, function() {
    $('.hidden',this).slideUp(300);
		$('.replace a',this).css('background-position','0 0');
		initRollovers();
	})

  $('.replace2 a').toggle(function() {
    $('.replace2 a').unbind('mouseover').unbind('mouseout');
    $(this).parent().parent().find('.hidden').slideDown(120);
    $(this).css('background-position','0 -80px');
  }, function() {
    $(this).parent().parent().find('.hidden').slideUp(120);
    $(this).css('background-position','0 0');
    initRollovers2();
  })


  initRollovers();
  initRollovers2();
	/*
	if($.browser.msie){
		$('div').each(function() {
			$(this).css('z-index','1');
		})
		$('#cart').css('z-index','100');
	}
	*/
});
