(function (lib, img, cjs) {

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

// library properties:
lib.properties = {
	width: 1920,
	height: 1198,
	fps: 30,
	color: "#FFFFFF",
	manifest: [
		{src:"images/Bitmap111.png", id:"Bitmap111"},
		{src:"images/Bitmap10.png", id:"Bitmap10"},
		{src:"images/Bitmap11.png", id:"Bitmap11"},
		{src:"images/Bitmap121.png", id:"Bitmap121"},
		{src:"images/Bitmap211.png", id:"Bitmap211"},
		{src:"images/Bitmap311.png", id:"Bitmap311"},
		{src:"images/Bitmap4.png", id:"Bitmap4"},
		{src:"images/Bitmap5.png", id:"Bitmap5"},
		{src:"images/Bitmap6.png", id:"Bitmap6"},
		{src:"images/Bitmap7.png", id:"Bitmap7"},
		{src:"images/Bitmap8.png", id:"Bitmap8"},
		{src:"images/Bitmap9.png", id:"Bitmap9"}
	]
};

// 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(1123.4,714.3,1689.7,1040.6);
p.frameBounds = [rect];


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


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


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


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


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


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


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


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


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


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


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


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


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

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

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


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

	// Layer 2
	this.instance = new lib.Bitmap6();

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


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

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

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


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

	// Layer 2
	this.instance = new lib.Bitmap5();

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


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

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

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


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

	// Layer 2
	this.instance = new lib.Bitmap4();

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


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

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

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


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

	// Layer 3
	this.instance = new lib.Bitmap11();

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


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

	// Layer 3
	this.instance = new lib.Bitmap111();

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


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

	// Layer 6 (mask)
	var mask = new cjs.Shape();
	mask._off = true;
	mask.graphics.p("EhYhAK3ICg3bMCujgBaImub9g");
	mask.setTransform(566.6,102.5);

	// Layer 2
	this.instance = new lib.Bitmap211();

	this.instance.mask = mask;

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


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

	// Layer 4
	this.instance = new lib.Bitmap311();

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


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

	// Layer 4
	this.instance = new lib.Bitmap121();

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,977,206);
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: '2169',
			title: 'Uzupełnij brakujące wyrazy w rymowance.',
			type: 'drag',
			container: this,
			prefix: 'drag_',
			prefix2: 'drop_',
			/*
			groupdrags: {		
				1: ['1','2','3'],
				2: ['4','5','6'],
				3: ['7','8','9']
			},
			
			groupdrops: {
				1: ['1','2','3'],
				2: ['4','5','6'],
				3: ['7','8','9']
			},
			*/
			results: [
				/*drop_1:*/ '1',
				/*drop_2:*/ '2',
				/*drop_3:*/ '3',
				/*drop_4:*/	'4',
			],
			range: 100,
			alpha: 1,
			alpha2: 1,
			//scale: 0.8,
			//rotation: 'auto',
			//size: 'auto',
			//zindex: 0,
			exerciseAfterInit: function (container) {
			},
			exerciseBeforeFinish: function(container) {		
			},
			exerciseExtraCheck: function(container) {		
			},
		}
		
		exerciseOnInit(config);
		
		
		/* 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.drag_4 = new lib.gapa4();
	this.drag_4.setTransform(1599.9,1121.9,1,1,0,0,0,85,32);

	this.drag_3 = new lib.gapa3();
	this.drag_3.setTransform(1787.6,1066.3,1,1,0,0,0,85,32);

	this.drag_2 = new lib.gapa2();
	this.drag_2.setTransform(1547.9,1027.3,1,1,0,0,0,85,32);

	this.drag_1 = new lib.gapa();
	this.drag_1.setTransform(1766.1,953.9,1,1,0,0,0,85,32);

	this.drop_4 = new lib.gapa4copy();
	this.drop_4.setTransform(1167,854,1,1,0,0,0,85,32);

	this.drop_3 = new lib.gapa3copy();
	this.drop_3.setTransform(1418.8,642.4,1,1,0,0,0,85,32);

	this.drop_2 = new lib.gapa2copy();
	this.drop_2.setTransform(1072.1,426.1,1,1,0,0,0,85,32);

	this.drop_1 = new lib.gapacopy();
	this.drop_1.setTransform(821.9,217.6,1,1,0,0,0,85,32);

	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.drag_1},{t:this.drag_2},{t:this.drag_3},{t:this.drag_4}]}).wait(1));

	// content
	this.instance = new lib._01();
	this.instance.setTransform(781.5,200.3,1,1,0,0,0,618.1,85);

	this.instance_1 = new lib._02();
	this.instance_1.setTransform(1003.2,422,1,1,0,0,0,618.1,85);

	this.instance_2 = new lib._03();
	this.instance_2.setTransform(1151.2,624,1,1,0,0,0,618.1,85);

	this.instance_3 = new lib._04();
	this.instance_3.setTransform(790.2,848.1,1,1,0,0,0,618.1,85);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_3},{t:this.instance_2},{t:this.instance_1},{t:this.instance}]}).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = rect = new cjs.Rectangle(163.4,115.3,1689.7,1040.6);
p.frameBounds = [rect];

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