
/* redirects to product page */

function continueShopping( url )
{
	url = "http://" + window.location.hostname +"/products";
	window.location = url;
	return false;
}

/* checks current position of Coutry selector and places error div there */
function setCorrectErrorPosition()
{
	errordiv = jQuery('#error');
	countryselector = jQuery('.cart-shipping');
	
	
	if( typeof errordiv == "object" && typeof countryselector == "object" )
	{
		pos = countryselector.offset().top;
		
		errordiv.css("top", (pos- 5) +"px");
		errordiv.css("left", "0" );
		errordiv.css("width", "270px");
		errordiv.css("font-size", "14px");
		errordiv.css("text-transform", "uppercase");
		errordiv.css("border-color", "0xFFFFFF");
		
		li = errordiv.find("li");
		text = li.text();
		
		li.text( text + " »" );

	}
}

/* UPCLOAD TESTING */

function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}

setTimeout(function(){ 
    var div = jQuery("#upcload_widget"); 
	if( upCloadAllowed ) div.show();
  }, 5000 ); 
