S3_URL="http://screencasts.s3.amazonaws.com/opx/";
function get_mobile_info(model,link_mob) {
	new Ajax.Request('/mobile/get_mobile_info',
	{
		method:'get',
		parameters: {mobile_model:model},
		//onLoading: function(){
		//  document.getElementById("mobile_model").innerHTML = "<div style='margin:0 auto;'>Loading</div>";
		//},
		onSuccess: function(data){
			document.getElementById("mobile_model").innerHTML = data.responseText;
		}
		//onFailure: function(){ alert('Sorry! Something went wrong!'); }
	});  

	var mobNav123 = $('mobNav');	
	var x = mobNav123.getElementsByTagName('li');
	for (i=0; i<x.length; i++){
		x[i].className = '';
		$('first_listBox').className = 'noBorderLeft';
		$('last_listBox').className = 'noBorderRight';
	}
	y = mobNav123.getElementsByTagName('a');
	for (i=0; i<y.length; i++){
		y[i].className = 'normal';
	}
	 		
	switch(model){
		case 'winMobile': 
			$(link_mob).parentNode.parentNode.className = 'right';
			$(link_mob).className = 'selected';
		break;

		case 'symbian': 
			$(link_mob).parentNode.parentNode.className = 'mid';
			$(link_mob).className = 'selected';
		break;

		case 'blackberry': 
			$(link_mob).parentNode.parentNode.className = 'mid';
			$(link_mob).className = 'selected';
		break;

		case 'android': 
			$(link_mob).parentNode.parentNode.className = 'right';
			$(link_mob).className = 'selected';
		break;

		case 'iphone': 
			$(link_mob).parentNode.parentNode.className = 'left';
			$(link_mob).className = 'selected';
		break;
		
		default: 
			$(link_mob).parentNode.parentNode.className = '';
	}
	//this.className='selected';
}


