(function (lib, img, cjs) {

var p; // shortcut to reference prototypes
var rect; // used to reference frame bounds

// library properties:
lib.properties = {
	width: 1648,
	height: 900,
	fps: 30,
	color: "#FFFFFF",
	manifest: [
		{src:"images/ananas.png", id:"ananas"},
		{src:"images/banan.png", id:"banan"},
		{src:"images/drop.png", id:"drop"},
		{src:"images/gfx_play.png", id:"gfx_play"},
		{src:"images/jakblko.png", id:"jakblko"},
		{src:"images/koszyk1.png", id:"koszyk1"},
		{src:"images/koszyk2.png", id:"koszyk2"},
		{src:"images/koszyk3.png", id:"koszyk3"},
		{src:"images/koszyk4.png", id:"koszyk4"},
		{src:"images/pomidor.png", id:"pomidor"}
	]
};

// stage content:
(lib.index = function() {
	this.initialize();

	// exercise
	this.container = new lib.exerciseContainer();
	this.container.setTransform(916.5,389,1,1,0,0,0,916.5,389);

	this.addChild(this.container);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(824,569.1,1632,762);
p.frameBounds = [rect];


// symbols:
(lib.ananas = function() {
	this.initialize(img.ananas);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,162,265);


(lib.banan = function() {
	this.initialize(img.banan);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,168,133);


(lib.drop = function() {
	this.initialize(img.drop);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,100,100);


(lib.gfx_play = function() {
	this.initialize(img.gfx_play);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,92,92);


(lib.jakblko = function() {
	this.initialize(img.jakblko);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,110,138);


(lib.koszyk1 = function() {
	this.initialize(img.koszyk1);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,315,330);


(lib.koszyk2 = function() {
	this.initialize(img.koszyk2);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,315,316);


(lib.koszyk3 = function() {
	this.initialize(img.koszyk3);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,315,325);


(lib.koszyk4 = function() {
	this.initialize(img.koszyk4);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,315,314);


(lib.pomidor = function() {
	this.initialize(img.pomidor);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,100,103);


(lib.soundPlayer = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.gfx_play();
	this.instance.setTransform(-46,-46);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-46,-46,92,92);
p.frameBounds = [rect];


(lib.pomidor_1 = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.pomidor();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,100,103);
p.frameBounds = [rect];


(lib.koszyk4_1 = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.koszyk4();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,315,314);
p.frameBounds = [rect];


(lib.koszyk3_1 = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.koszyk3();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,315,325);
p.frameBounds = [rect];


(lib.koszyk2_1 = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.koszyk2();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,315,316);
p.frameBounds = [rect];


(lib.koszyk1_1 = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.koszyk1();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,315,330);
p.frameBounds = [rect];


(lib.jablko = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.jakblko();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,110,138);
p.frameBounds = [rect];


(lib.drop_1 = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.drop();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,100,100);
p.frameBounds = [rect];


(lib.banan_1 = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.banan();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,168,133);
p.frameBounds = [rect];


(lib.ananas_1 = function() {
	this.initialize();

	// Layer 1
	this.instance = new lib.ananas();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,162,265);
p.frameBounds = [rect];


(lib.exerciseContainer = function(mode,startPosition,loop) {
if (loop == null) { loop = false; }	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		/* Sortowanie */
		var config = {
			id: '2075',
			title: 'Umieść owoce i warzywa w odpowiednim koszyku w ilości równej numerkowi na koszyku.',
			type: 'drag',
			container: this,
			groupdrags: {		
				1: [1,2,3,4,5],
				2: [6,7,8,9,10],
				3: [11,12,13,14,15],
				4: [16,17,18,19,20],
			},
			prefix: 'drag_',
			prefix2: 'drop_',
			results: [
				/*drop_1:*/ '3',
				/*drop_2:*/ '1',
				/*drop_3:*/ '1',
				/*drop_4:*/ '2',
				/*drop_5:*/ '2',
				/*drop_6:*/ '2',
				/*drop_7:*/ '4',
				/*drop_8:*/ '4',
				/*drop_9:*/ '4',
				/*drop_10:*/ '4',
			],
			range: 100,
			alpha: 0,
			alpha2: 0,
			//scale: 0.8,
			zindex: 0
		}
		
		exerciseOnInit(config);
		
		this.stop();
		
		/* Help */
		
		/* 
		id - Id cwiczenia
		title - Tytul cwiczenia
		type - Typ Cwiczenia
		contanier - Kontener cwiczenia
		groups - Lista grup oraz przypisane do nich identyfikatory (unikatowa liczba) obiektow bez prefixow
		prefix - Prefixy w nazwach obiektow
		results - Rozwiazanie jako tablica identyfikatorow. Znak '|' definuje alternatywe, a '&' oznacza sume.	
		Przyklad:
		Cwiczenie typu sort.
		Odpowiedzi: [5,2,1,4,5] - tablica z ulozonymi w odpowiedniej kolejnisci identyfikatorami obiektow sortowanych.
		Cwiczenie typu drag.
		Odpowiedzi: [5,1|3,2&4] - tablica z id obiektow przeciaganych lub grup. W tym wariancie kazdy kolejny element z indexem 'i' w tablicy odpowiada targetowi o nazwie 'prefix+i'.
		np. prawidlowa odpowiedzia dla drop_1 jest obiekt drag_5, dla drop_2 obiekt drag_1 lub drag_3, dla drop_3 obiekt drag_2 oraz drag_4.
		range - Zakres dociagania
		alpha - Przezroczystosc targetu
		alpha2 - Przezroczystosc targetu po najechaniu
		scale - Skalowanie obiektu po upuszczeniu
		zindex - Warstwa obiektu
		*/
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1));

	// drop
	this.drop_10 = new lib.drop_1();
	this.drop_10.setTransform(1560,577.1,1,1,0,0,0,50,50);
	this.drop_10.alpha = 0;

	this.drop_9 = new lib.drop_1();
	this.drop_9.setTransform(1500,577.1,1,1,0,0,0,50,50);
	this.drop_9.alpha = 0;

	this.drop_8 = new lib.drop_1();
	this.drop_8.setTransform(1440,577.1,1,1,0,0,0,50,50);
	this.drop_8.alpha = 0;

	this.drop_7 = new lib.drop_1();
	this.drop_7.setTransform(1380,577.1,1,1,0,0,0,50,50);
	this.drop_7.alpha = 0;

	this.drop_6 = new lib.drop_1();
	this.drop_6.setTransform(1198,577.1,1,1,0,0,0,50,50);
	this.drop_6.alpha = 0;

	this.drop_5 = new lib.drop_1();
	this.drop_5.setTransform(1138,577.1,1,1,0,0,0,50,50);
	this.drop_5.alpha = 0;

	this.drop_4 = new lib.drop_1();
	this.drop_4.setTransform(1078,577.1,1,1,0,0,0,50,50);
	this.drop_4.alpha = 0;

	this.drop_3 = new lib.drop_1();
	this.drop_3.setTransform(1530,179.1,1,1,0,0,0,50,50);
	this.drop_3.alpha = 0;

	this.drop_2 = new lib.drop_1();
	this.drop_2.setTransform(1428,179.1,1,1,0,0,0,50,50);
	this.drop_2.alpha = 0;

	this.drop_1 = new lib.drop_1();
	this.drop_1.setTransform(1156,169.1,1,1,0,0,0,50,50);
	this.drop_1.alpha = 0;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.drop_1},{t:this.drop_2},{t:this.drop_3},{t:this.drop_4},{t:this.drop_5},{t:this.drop_6},{t:this.drop_7},{t:this.drop_8},{t:this.drop_9},{t:this.drop_10}]}).wait(1));

	// content
	this.sound_4 = new lib.soundPlayer();
	this.sound_4.setTransform(1588.3,835.2,0.565,0.565);

	this.sound_3 = new lib.soundPlayer();
	this.sound_3.setTransform(1271.3,835.2,0.565,0.565);

	this.sound_2 = new lib.soundPlayer();
	this.sound_2.setTransform(1590.3,425.2,0.565,0.565);

	this.sound_1 = new lib.soundPlayer();
	this.sound_1.setTransform(1251.3,425.2,0.565,0.565);

	this.instance = new lib.koszyk4_1();
	this.instance.setTransform(1467.5,713,1,1,0,0,0,157.5,157);

	this.instance_1 = new lib.koszyk3_1();
	this.instance_1.setTransform(1138.5,718.5,1,1,0,0,0,157.5,162.5);

	this.instance_2 = new lib.koszyk2_1();
	this.instance_2.setTransform(1474.5,307,1,1,0,0,0,157.5,158);

	this.instance_3 = new lib.koszyk1_1();
	this.instance_3.setTransform(1145.5,311.5,1,1,0,0,0,157.5,162.5);

	this.drag_5 = new lib.banan_1();
	this.drag_5.setTransform(810,233.6,1,1,0,0,0,90,112.6);

	this.drag_4 = new lib.banan_1();
	this.drag_4.setTransform(623,225.5,1,1,0,0,0,83,104.5);

	this.drag_3 = new lib.banan_1();
	this.drag_3.setTransform(447,228.6,1,1,0,0,0,87,107.6);

	this.drag_2 = new lib.banan_1();
	this.drag_2.setTransform(266,232.6,1,1,0,0,0,86,111.6);

	this.drag_1 = new lib.banan_1();
	this.drag_1.setTransform(88,224.5,1,1,0,0,0,88,103.5);

	this.drag_10 = new lib.ananas_1();
	this.drag_10.setTransform(791,439.5,1,1,0,0,0,67,170.5);

	this.drag_15 = new lib.jablko();
	this.drag_15.setTransform(805,631,1,1,0,0,0,55,69);

	this.drag_20 = new lib.pomidor_1();
	this.drag_20.setTransform(804,790.5,1,1,0,0,0,50,51.5);

	this.drag_9 = new lib.ananas_1();
	this.drag_9.setTransform(610,439.6,1,1,0,0,0,66,170.6);

	this.drag_14 = new lib.jablko();
	this.drag_14.setTransform(625,631,1,1,0,0,0,55,69);

	this.drag_19 = new lib.pomidor_1();
	this.drag_19.setTransform(624,790.5,1,1,0,0,0,50,51.5);

	this.drag_8 = new lib.ananas_1();
	this.drag_8.setTransform(429,441.6,1,1,0,0,0,65,172.6);

	this.drag_13 = new lib.jablko();
	this.drag_13.setTransform(445,631,1,1,0,0,0,55,69);

	this.drag_18 = new lib.pomidor_1();
	this.drag_18.setTransform(444,790.5,1,1,0,0,0,50,51.5);

	this.drag_7 = new lib.ananas_1();
	this.drag_7.setTransform(251,438.6,1,1,0,0,0,67,169.6);

	this.drag_12 = new lib.jablko();
	this.drag_12.setTransform(265,631,1,1,0,0,0,55,69);

	this.drag_17 = new lib.pomidor_1();
	this.drag_17.setTransform(264,790.5,1,1,0,0,0,50,51.5);

	this.drag_6 = new lib.ananas_1();
	this.drag_6.setTransform(73,443.6,1,1,0,0,0,69,174.6);

	this.drag_11 = new lib.jablko();
	this.drag_11.setTransform(85,631,1,1,0,0,0,55,69);

	this.drag_16 = new lib.pomidor_1();
	this.drag_16.setTransform(84,790.5,1,1,0,0,0,50,51.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.drag_16},{t:this.drag_11},{t:this.drag_6},{t:this.drag_17},{t:this.drag_12},{t:this.drag_7},{t:this.drag_18},{t:this.drag_13},{t:this.drag_8},{t:this.drag_19},{t:this.drag_14},{t:this.drag_9},{t:this.drag_20},{t:this.drag_15},{t:this.drag_10},{t:this.drag_1},{t:this.drag_2},{t:this.drag_3},{t:this.drag_4},{t:this.drag_5},{t:this.instance_3},{t:this.instance_2},{t:this.instance_1},{t:this.instance},{t:this.sound_1},{t:this.sound_2},{t:this.sound_3},{t:this.sound_4}]}).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = rect = new cjs.Rectangle(0,119.1,1632,762);
p.frameBounds = [rect];

})(lib = lib||{}, images = images||{}, createjs = createjs||{});
var lib, images, createjs;