extend(ItemShop, createjs.Container);

function ItemShop(name)
{	
	this.initialize();
	var th = this
	this.mouseChildren = false
	//-----------------//
	var coors = [["life", 171, 183, 47, 63], ["bombs", 171, 183, 47, 63], ["submarine", 154, 153, 44, 49], ["torpedo", 154, 153, 44, 49], ["air_strike", 154, 153, 44, 49]]
	var pr

	var podl = new createjs.Sprite(jsons["JSON2"]);
	podl.gotoAndStop("shop_" + name)

	var num = new Text(jsons["JSON2"], "numbers_red_", "Center", 20)
	var price = new Text(jsons["JSON2"], "numbers_green_small_", "Center", 20)
	for(var a=0; a<coors.length; a++){
		if(coors[a][0] == name){
			setCoor(num, coors[a][1], coors[a][2])
			setCoor(price, coors[a][3], coors[a][4])			
		}
	}

	// dragAndDrop(num)
	// dragAndDrop(price)

	this.addChild(podl)
	this.addChild(num)
	this.addChild(price)

	this.setNum = function(v){
		num.setText(v)
	}

	this.setPrice = function(v){
		pr = v
		price.setText(pr)
	}

	this.getPrice = function(){
		return pr
	}

	this.getName = function(){
		return name
	}
}