var LevelPageToggle = cc.Layer.extend({
	_menu:null,
	_leftButton:null,
	_rightButton:null,
	_pageLabel:null,
	
	ctor:function () {
		this._super();
		var winSize = cc.director.getWinSize();
		
		//==========LEFT BUTTON=========
		var leftButtonSpriteNormal = new cc.Sprite(res.left_png);
		var leftButtonSpriteSelected = new cc.Sprite(res.left_selected_png);
		var leftButtonSpriteDisabled = new cc.Sprite(res.left_png);

		this._leftButton = new cc.MenuItemSprite(leftButtonSpriteNormal, 
												leftButtonSpriteSelected,
												leftButtonSpriteDisabled, 
												 function () {
													 		 this.LeftButtonCallback();
														 	 }.bind(this));	
		this._leftButton.attr({
			anchorX: 0.5,
			anchorY: 0.5,
			x: winSize.width/2 - 100,
			y: winSize.height*0.83

		})
		//==========RIGHT BUTTON=========
		var rightButtonSpriteNormal = new cc.Sprite(res.right_png);
		var rightButtonSpriteSelected = new cc.Sprite(res.right_selected_png);
		var rightButtonSpriteDisabled = new cc.Sprite(res.right_png);

		this._rightButton = new cc.MenuItemSprite(rightButtonSpriteNormal, 
												rightButtonSpriteSelected,
												rightButtonSpriteDisabled, 
												function () {
											this.RightButtonCallback();
										}.bind(this));	
		this._rightButton.attr({
			anchorX: 0.5,
			anchorY: 0.5,
			x: winSize.width/2 + 100,
			y: winSize.height*0.83

		})

		this._menu = new cc.Menu(this._leftButton);
		this._menu.attr({
			anchorX: 0.5,
			anchorY: 0.5,
			x: 0,
			y: 0

		})
		this._menu.addChild(this._rightButton);
		this.addChild(this._menu, 1, 2);
		//======PAGE LABEL====		
		this._pageLabel = new cc.LabelTTF("Page 1", "Old English Text MT", 45);
		this._pageLabel.color = cc.color(253, 211,129);
		this._pageLabel.attr({
			anchorX: 0.5,
			anchorY: 0.5,
			x: winSize.width/2,
			y: winSize.height*0.83
		})
		this.addChild(this._pageLabel, FOREGROUND);
	},

	LeftButtonCallback:function(){
		
	},

	RightButtonCallback:function(){
	},
});


