$(function(){

	//ie only
	if($.browser.msie && $.browser.version < 9){
		$('#steps li a')
			.append('<span class="lt"></span><span class="rt"></span>')
			.css('position' ,'relative');
			
		$('.price, #product_options button')
			.append('<span class="lt"></span><span class="rt"></span><span class="lb"></span><span class="rb"></span>')
			.css('position' ,'relative');
	}
	if ($.browser.mozilla) {
    	$('#product_options button span.cart').css('top' , '-3px');
 	}
	
	//textbox values
	swap_val = [];
	$("#subscribe input").each(function(i){
		swap_val[i] = $(this).val();
		$(this).focusin(function(){
			if ($(this).val() == swap_val[i]) {
				$(this).val("");
			}
		}).focusout(function(){
			if ($.trim($(this).val()) == "") {
				$(this).val(swap_val[i]);
			}
		});
	});
		
	//sitenav and breadcrumb last border
	$('#sitenav li:last-child, #breadcrumb li:last-child').addClass('last');
	
	//cart
	$('#cart').hover(function(){
		$(this).find('ul').slideDown('fast');	
	}, function(){
		$(this).find('ul').stop(true, true).slideUp('fast');	
	});
	
	//shirt size click add active class
	$('#product_options .size a').click(function(){
		$('#product_options .size a').removeClass('active');
		$(this).addClass('active');	
	});
	
	//shirt color click add classes
	$('#product_options .color a').click(function(){
		$('#product_options .color a').removeClass('active').addClass('blur');
		$(this).addClass('active');	
	});
	
	//shirt color click add classes
	$('#product_options .scolor a').click(function(){
		$('#product_options .scolor a').removeClass('active').addClass('blur');
		$(this).addClass('active');	
	});

});
