// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

// create tab group
var tabGroup = Titanium.UI.createTabGroup();


//
// create base UI tab and root window
//
var Checkins_win = Titanium.UI.createWindow({  
    title:'我要打卡',
    url:'Checkins.js',
    backgroundColor:'#fff'
});
var Checkins_tab = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'我要打卡',
    window:Checkins_win
});



//
// create controls tab and root window
//
var LBS_win = Titanium.UI.createWindow({  
    title:'Instagram打卡',
    url:'LBS.js',
    backgroundColor:'#fff'
});
var LBS_tab = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Instagram打卡',
    window:LBS_win
});

var Camera_win = Titanium.UI.createWindow({  
    title:'Plurk',
    url:'Camera.js',
    backgroundColor:'#fff'
});
var Camera_tab = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Camera',
    window:Camera_win
});


var Plurk_win = Titanium.UI.createWindow({  
    title:'Plurk',
    url:'Plurk.js',
    backgroundColor:'#fff'
});
var Plurk_tab = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Plurk',
    window:Plurk_win
});

var Instagram_win = Titanium.UI.createWindow({  
    title:'Instagram',
    url:'Instagram.js',
    backgroundColor:'#fff'
});
var Instagram_tab = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Instagram',
    window:Instagram_win
});


tabGroup.setActiveTab(1);


//
//  add tabs
//
tabGroup.addTab(Checkins_tab);  
tabGroup.addTab(LBS_tab); 
tabGroup.addTab(Camera_tab); 
tabGroup.addTab(Plurk_tab); 
tabGroup.addTab(Instagram_tab); 

// open tab group
tabGroup.open();
