function changeVideo(t) {
	$(document).ready(function() {
		if(t == 'r') {
			$("#box_video").html("<object width=\"560\" height=\"340\"><param name=\"allowfullscreen\" value=\"true\" name=\"wmode\" value=\"opaque\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=8320867&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=8320867&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"560\" height=\"340\" wmode=\"opaque\"></embed></object>");	
		} else {
			$("#box_video").html("<object width=\"560\" height=\"340\"><param name=\"allowfullscreen\" value=\"true\" name=\"wmode\" value=\"opaque\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=8304934&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=8304934&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"560\" height=\"340\" wmode=\"opaque\"></embed></object>");	
		}
	});
	
	return false;
}

function changeVideo_2(t) {
	$(document).ready(function() {
		if(t == 'r') {
			$("#box_video").html("<object width=\"560\" height=\"340\"><param name=\"allowfullscreen\" value=\"true\" name=\"wmode\" value=\"opaque\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=8322212&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=8322212&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"560\" height=\"340\" wmode=\"opaque\"></embed></object>");	
		} else {
			$("#box_video").html("<object width=\"560\" height=\"340\"><param name=\"allowfullscreen\" value=\"true\" name=\"wmode\" value=\"opaque\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=8335302&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=8335302&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"560\" height=\"340\" wmode=\"opaque\"></embed></object>");	
		}
	});
	
	return false;
}

var xmlhttp;

function getCart() {
	xmlhttp=GetXmlHttpObject();
	if(xmlhttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
    
	var url="../../../shop/cart_short.php";
	url=url+"?sid="+Math.random();
	xmlhttp.onreadystatechange=stateChanged;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}

function stateChanged() {
	if(xmlhttp.readyState==4) {
		document.getElementById("cart-contents").innerHTML=xmlhttp.responseText;
	}
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

/*
$(document).ready(function()
{
   // Use the each() method to gain access to each of the elements attributes
   $('#lang-flag img').each(function()
   {
	  var lang = $(this).attr('id');
	  var str;
  	  switch(lang) {
	  	case 'Italian':
			str = 'Clicka su questa bandiera per vedere Snowboard Addiction in Italiano.';
			break;
		case 'Spanish':
			str = 'Haz click en esta bandera para ver Snowboard Addiction en Español.';
			break;
		case 'German':
			str = 'Klick auf diese Flagge um Snowboard Addiction auf Deutsch anzuzeigen.';
			break;	
		case 'Japanese':
			str = '日本語での Snowboard Addiction を<br />見るにはここをクリック';
			break;
		case 'French':
			str = 'Clique sur ce drapeau pour voir Snowboard Addiction en Francais';
			break;
	  	default:
			str = 'Click on this flag to view Snowboard Addiction in ' + lang + '.';
	  }			  
      $(this).qtip(
      {
		 content: str, // Give it some content		         
         position: {
          corner: {
             tooltip: 'topRight', // Use the corner...
             target: 'bottomMiddle' // ...and opposite corner
          }
       	 },
         hide: {
            fixed: true // Make it fixed so it can be hovered over
         },
         style: {
		  border: {
             width: 5,
             radius: 7,
			 color: '#006599'
          },
          padding: 10, 
          textAlign: 'center',
          tip: true, // Give it a speech bubble tip with automatic corner detection
          name: 'blue', // Style it according to the preset 'cream' style
          classes: { content: 'tool-tip-text' }
         }
      });
   });
});	
*/

