//var agent = navigator.userAgent;
//var isIphone = (agent.indexOf('iPhone') != -1);
//if (isIphone) {
//    window.location.href = 'mobile/';
//}
//
////ipad
//// For use within normal web clients 
//var isiPad = navigator.userAgent.match(/iPad/i) != null;
//
//// For use within iPad developer UIWebView
//var ua = navigator.userAgent;
//var isiPad = /iPad/i.test(ua) || /iPhone OS 3_1_2/i.test(ua) || /iPhone OS 3_2_2/i.test(ua);
//
//
//if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
//   if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "mobile/";
//}
//
//	if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) {
//		document.location = "iphone.html";
//	} 
//	
//if((navigator.userAgent.match(/iPhone/i)) || 
// (navigator.userAgent.match(/iPod/i))) {
//   if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "mobile/";

// var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));  
  //  if (mobile) {  
    //    window.top.location.href = "mobile/";  
    //} 


   // var iPad = navigator.userAgent.match(/iPad/i)  != null
//    var iPhone = ( (navigator.userAgent.match(/iPhone/i)  != null) || (navigator.userAgent.match(/iPod/i)  != null) )
//	
//	isMobile = iPad || iPhone
//	
//	//alert(isMobile)
//	
//	if (isMobile) {
//		window.top.location.href = "mobile/"
//		}				  

 var iPad = navigator.userAgent.match(/iPad/i)  != null
    var iPhone = ( (navigator.userAgent.match(/iPhone/i)  != null) || (navigator.userAgent.match(/iPod/i)  != null) )
	
	isApple = iPad || iPhone
	
	//alert(isApple)
	
	if (isApple) {
		window.top.location.href = "mobile/"
		}
		
	
	var mobile = (/android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));  
    if (mobile) {  
        window.top.location.href = "mobile/";  
    } 	
	
	var iBlackberry = navigator.userAgent.match(/blackberry/i)  != null
	var iBlackberry2 = navigator.userAgent.match(/Blackberry/i)  != null
	
	isBlackberry = iBlackberry || iBlackberry2
	
	if (isBlackberry) {
		window.top.location.href = "mobile/"
		}

	if (screen.width <= 699) {
		//document.location = "mobile.html";
		window.top.location.href = "mobile/"
	}

