var volumeIncrement = 10;
var maxVolume = 100;
var minVolume = 10;

function increaseVolume() {
	
    if 	(player.getConfig().volume >= (maxVolume - volumeIncrement)){
		player.sendEvent('VOLUME', maxVolume);
	} else{	
		player.sendEvent('VOLUME', player.getConfig().volume+volumeIncrement);
	}
}

function decreaseVolume() {
	
	if (player.getConfig().volume < (minVolume + volumeIncrement)){
		player.sendEvent('VOLUME', minVolume);
	} else{	
		player.sendEvent('VOLUME', player.getConfig().volume-volumeIncrement);
	}
}



function SimpleSwapSetup(){
	

	

//
	
  var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++){
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
    // preload image
    // comment the next two lines to disable image pre-loading
    x[i].oversrc_img = new Image();
    x[i].oversrc_img.src=oversrc;
    // set event handlers
    x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    x[i].onmouseout = new Function("SimpleSwap(this);");
	//
    x[i].onfocus = new Function("SimpleSwap(this,'oversrc');");
    x[i].onblur = new Function("SimpleSwap(this);");
  
    // save original src
    x[i].setAttribute("origsrc",x[i].src);
	
	
  }
}

function SimpleSwap(el,which){
		//alert(el.src + " " + which.src);
        el.src=el.getAttribute(which||"origsrc");
}
 
