$(document).ready( function() {
	
	$('#miasto').change(function() {
                changeLocationCookie($(this).val());
	})

        $(".tabs").tabs();
});


function stripslashes(str) {
	str=str.replace(/\\'/g,'\'');
	str=str.replace(/\\"/g,'"');
	str=str.replace(/\\0/g,'\0');
	str=str.replace(/\\\\/g,'\\');
	return str;
	}

function verifyEmail( str )
{	
	var reg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!reg.test (str) )
	{
		return false;
	}
	else
	{
		return true;
	}
}

function changeLocationCookie(locationValue) {
        var today = new Date();
	var expire = new Date();
	expire.setTime(today.getTime() + 3600000*24*14);
	document.cookie = 'plus_getlocation=' + locationValue + ";expires="+expire.toGMTString() + ";path=/";
        window.location.reload();
}





