(function (lib, img, cjs) {

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

// library properties:
lib.properties = {
	width: 1474,
	height: 833,
	fps: 30,
	color: "#FFFFFF",
	manifest: [
		{src:"images/domek.png", id:"domek"},
		{src:"images/drop.png", id:"drop"},
		{src:"images/kwiatek.png", id:"kwiatek"},
		{src:"images/latawiec.png", id:"latawiec"},
		{src:"images/ramka.png", id:"ramka"},
		{src:"images/samochodzik.png", id:"samochodzik"}
	]
};

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

	// 3203.psd
	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(737,416.5,1475,833);
p.frameBounds = [rect];


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


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


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


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


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


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


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

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

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


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

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

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


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

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

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


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

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

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,154,139);
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,180,180);
p.frameBounds = [rect];


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

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

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(0,0,138,152);
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: '1227',
			title: 'Przeciągnij elementy spoza tabeli w puste pola w taki sposób, aby w każdym rzędzie pionowym i poziomym oraz w dużych, pogrubionych kwadratach był tylko jeden z czterech różnych elementów.',
			type: 'drag',
			container: this,
			groupdrags: {		
				1:[1],
				2:[2,3,4],
				3:[5,6],
				4:[7,8,9]
			},
			prefix: 'drag_',
			prefix2: 'drop_',
			results: [
				/*drop_1:*/ '4',
				/*drop_2:*/ '3',
				/*drop_3:*/ '2',
				/*drop_4:*/ '1',
				/*drop_5:*/ '3',
				/*drop_6:*/ '4',
				/*drop_7:*/ '2',
				/*drop_8:*/ '4',
				/*drop_9:*/ '2',
			],
			range: 20,
			alpha: 0,
			alpha2: 0,
			//scale: 0.8,
			//zindex: 0
		}
		
		/* Ustawienia obiektow */ 
		
		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_9 = new lib.drop_1();
	this.drop_9.setTransform(1168.3,728,1,1,0,0,0,90,90);
	this.drop_9.alpha = 0;

	this.drop_6 = new lib.drop_1();
	this.drop_6.setTransform(1368.3,308,1,1,0,0,0,90,90);
	this.drop_6.alpha = 0;

	this.drop_8 = new lib.drop_1();
	this.drop_8.setTransform(1170.3,528,1,1,0,0,0,90,90);
	this.drop_8.alpha = 0;

	this.drop_7 = new lib.drop_1();
	this.drop_7.setTransform(948.3,528,1,1,0,0,0,90,90);
	this.drop_7.alpha = 0;

	this.drop_4 = new lib.drop_1();
	this.drop_4.setTransform(948.3,307,1,1,0,0,0,90,90);
	this.drop_4.alpha = 0;

	this.drop_5 = new lib.drop_1();
	this.drop_5.setTransform(1168.3,307,1,1,0,0,0,90,90);
	this.drop_5.alpha = 0;

	this.drop_3 = new lib.drop_1();
	this.drop_3.setTransform(1370.3,107,1,1,0,0,0,90,90);
	this.drop_3.alpha = 0;

	this.drop_2 = new lib.drop_1();
	this.drop_2.setTransform(948.3,107,1,1,0,0,0,90,90);
	this.drop_2.alpha = 0;

	this.drop_1 = new lib.drop_1();
	this.drop_1.setTransform(748.3,107,1,1,0,0,0,90,90);
	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_5},{t:this.drop_4},{t:this.drop_7},{t:this.drop_8},{t:this.drop_6},{t:this.drop_9}]}).wait(1));

	// 1226-dev.psd
	this.instance = new lib.latawiec_1();
	this.instance.setTransform(949.8,728,1,1,0,0,0,81.5,80);

	this.instance_1 = new lib.kwiatek_1();
	this.instance_1.setTransform(1368.3,722.6,1,1,0,0,0,77,69.5);

	this.drag_9 = new lib.latawiec_1();
	this.drag_9.setTransform(441.5,750,1,1,0,0,0,81.5,80);

	this.drag_8 = new lib.latawiec_1();
	this.drag_8.setTransform(261.5,750,1,1,0,0,0,81.5,80);

	this.drag_6 = new lib.domek_1();
	this.drag_6.setTransform(286,511,1,1,0,0,0,69,76);

	this.drag_4 = new lib.samochodzik_1();
	this.drag_4.setTransform(496,307,1,1,0,0,0,79,38.5);

	this.drag_3 = new lib.samochodzik_1();
	this.drag_3.setTransform(296,307,1,1,0,0,0,79,38.5);

	this.instance_2 = new lib.domek_1();
	this.instance_2.setTransform(748.3,727.1,1,1,0,0,0,69,76);

	this.instance_3 = new lib.domek_1();
	this.instance_3.setTransform(1372.3,528.5,1,1,0,0,0,69,76);

	this.instance_4 = new lib.kwiatek_1();
	this.instance_4.setTransform(748.3,528,1,1,0,0,0,77,69.5);

	this.instance_5 = new lib.samochodzik_1();
	this.instance_5.setTransform(748.3,307,1,1,0,0,0,79,38.5);

	this.instance_6 = new lib.kwiatek_1();
	this.instance_6.setTransform(1170.3,106.5,1,1,0,0,0,77,69.5);

	this.drag_7 = new lib.latawiec_1();
	this.drag_7.setTransform(81.5,750,1,1,0,0,0,81.5,80);

	this.drag_5 = new lib.domek_1();
	this.drag_5.setTransform(86,511,1,1,0,0,0,69,76);

	this.drag_2 = new lib.samochodzik_1();
	this.drag_2.setTransform(96,307,1,1,0,0,0,79,38.5);

	this.drag_1 = new lib.kwiatek_1();
	this.drag_1.setTransform(91,114.5,1,1,0,0,0,77,69.5);

	this.instance_7 = new lib.ramka_1();
	this.instance_7.setTransform(848.5,206.5,1,1,0,0,0,206.5,206.5);

	this.instance_8 = new lib.ramka_1();
	this.instance_8.setTransform(1268.5,206.5,1,1,0,0,0,206.5,206.5);

	this.instance_9 = new lib.ramka_1();
	this.instance_9.setTransform(848.5,626.5,1,1,0,0,0,206.5,206.5);

	this.instance_10 = new lib.ramka_1();
	this.instance_10.setTransform(1268.5,626.5,1,1,0,0,0,206.5,206.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_10},{t:this.instance_9},{t:this.instance_8},{t:this.instance_7},{t:this.drag_1},{t:this.drag_2},{t:this.drag_5},{t:this.drag_7},{t:this.instance_6},{t:this.instance_5},{t:this.instance_4},{t:this.instance_3},{t:this.instance_2},{t:this.drag_3},{t:this.drag_4},{t:this.drag_6},{t:this.drag_8},{t:this.drag_9},{t:this.instance_1},{t:this.instance}]}).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = rect = new cjs.Rectangle(0,0,1475,833);
p.frameBounds = [rect];

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