//this file needs to be included on all app pages.  It allows users who have access to multiple sellers to change the seller

$(document).ready(function(){
	var scc = $('#sellerChangeControl');
	scc.change(function(){
	
		var newSellerId = scc.val();
		
		var handleSellerChanged = function(data) {
			if (data.Result == 'Success')
			{
				window.location = '/dashboard/';
			}
		};
		
		var params = {
			sellerId: newSellerId
		};
		$.post('/dashboard/changeseller/', params, handleSellerChanged, 'json');
	}
);
}
);

