function goToChoice()
{
	var url = $('#sorter').val();
	window.location = url;
}

	function showmenu(mid)
    		{
    			$("#" + mid).show();
    			$('#top' + mid).toggleClass('white');
    		}
    		function hidemenu(mid)
    		{
    			$('#top' + mid).toggleClass('white');
				$("#" + mid).hide();
    			
    		}
    		
function outOfStock(color,size,model)
{
	$('input[name="model"]').val(model);

	$.post(window.location.pathname, $('#uc-stock-notify-outofstock-form').serialize(),function(data){
		var start = data.indexOf('<div id="content">');
		var end = data.indexOf('<div id="bottom_links"');
		var sstr = data.substring(start,end);
		
		if(USER_LOGGED_IN)
		{
			$('#result').html('<p>Thank you for your request. We will notify you when this product is back in stock.</p>');
		}
		else
		{
			$('#result').html(sstr);
		}
		$('#result').dialog({ modal: true, width:500,position:'top',autoOpen:false });
		$('#result').dialog('open');
	});
	
	return false;
}

function displayCart(data)
{
	var start = data.indexOf('<div class="cartcontent">');
	var end = data.indexOf('<div id="bottom_links"');
	var sstr = data.substring(start,end);
	$('#result').html(sstr); 			
	$('#result').dialog({ modal: true, width:1000,position:'top' });
}

function show_bought_lightbox()
{
	$.post('/cart',function(data){
		var start = data.indexOf('<div class="cartcontent">');
		var end = data.indexOf('<div id="bottom_links"');
		
		var sstr = data.substring(start,end);
		
		$('#result').html(sstr); 			
		$('#result').dialog({ modal: true, width:800,position:'top' });
	
	});
}

    		$(document).ready(function(){
			$('#edit-keys').val('enter search term');
			$('#edit-keys').focus(function(){$('#edit-keys').val('');});
    		$('#edit-keys').blur(function(){if($('#edit-keys').val() == '') $('#edit-keys').val('enter search term');});
			$('.m_collection').html('<span>the</span> Collection');
 			});
			
			$(document).ready(function(){
				$('#checkout-form-bottom > input[type=submit]:first').css({'display':'none'});
			})
$(document).ready(function(){
	jQuery.fn.exists = function(){return jQuery(this).length>0;}
	/* CASE #5052: */
	

	
});

/*
$(document).ready(function(){
	$('.sos_inthepress > a').bind(
	{			$('#sizeguide').dialog({ modal: true, width:540,position:'top' });return false;
		click:function(event){$( this ).children('img').dialog({ modal: true, width:800,position:'top' });}
	});
});

*/
