(function (lib, img, cjs) {

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

// library properties:
lib.properties = {
	width: 1457,
	height: 778,
	fps: 30,
	color: "#FFFFFF",
	manifest: [
		{src:"images/drop.png", id:"drop"},
		{src:"images/jajo1.png", id:"jajo1"},
		{src:"images/jajo2.png", id:"jajo2"},
		{src:"images/jajo3.png", id:"jajo3"},
		{src:"images/jajo5.png", id:"jajo5"},
		{src:"images/jajo7.png", id:"jajo7"},
		{src:"images/jajo9.png", id:"jajo9"},
		{src:"images/koszyk10.png", id:"koszyk10"},
		{src:"images/koszyk8.png", id:"koszyk8"},
		{src:"images/koszyk9.png", id:"koszyk9"}
	]
};

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

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

	this.addChild(this.exercise);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(728.5,389,1456,778);
p.frameBounds = [rect];


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


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


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


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


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


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


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


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


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


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


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

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

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


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

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

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


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

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

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


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

	// Layer 1
	this.instance = new lib.jajo9();
	this.instance.setTransform(-100,-133.5);

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


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

	// Layer 1
	this.instance = new lib.jajo7();
	this.instance.setTransform(-97.5,-139.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-97.5,-139.5,195,279);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.jajo5();
	this.instance.setTransform(-98.5,-136.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-98.5,-136.5,197,273);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.jajo3();
	this.instance.setTransform(-96,-133.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-96,-133.5,192,267);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.jajo2();
	this.instance.setTransform(-114,-128);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-114,-128,228,256);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.jajo1();
	this.instance.setTransform(-112,-143);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-112,-143,224,286);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.drop();
	this.instance.setTransform(-73,-73,0.7,0.7);

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


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

	// timeline functions:
	this.frame_0 = function() {
		/* Sortowanie */
		var config = {
			id: '1228',
			title: 'Włóż po dwie kraszanki do koszyków, tak by liczby na kraszankach dały sumę, która jest na koszyku.',
			type: 'drag',
			container: this,
			/*
			groups: {		
				1: [1,2,3,4],
				2: [5,6],
				3: [7,8]
			},
			*/
			
			prefix: 'drag_',
			prefix2: 'drop_',
			results: [
				/*drop_1:*/ '1|6',
				/*drop_2:*/ '1|6',
				/*drop_3:*/ '2|4',
				/*drop_4:*/ '2|4',
				/*drop_5:*/ '3|5',
				/*drop_6:*/ '3|5',
			],
			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));

	// kosze
	this.instance = new lib.koszyk10_1();
	this.instance.setTransform(298.5,228,1,1,0,0,0,198.5,228);

	this.instance_1 = new lib.koszyk9_1();
	this.instance_1.setTransform(1146.5,228,1,1,0,0,0,198.5,228);

	this.instance_2 = new lib.koszyk8_1();
	this.instance_2.setTransform(722.5,228,1,1,0,0,0,198.5,228);

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

	// dropy
	this.drop_6 = new lib.drop_1();
	this.drop_6.setTransform(1322,289.9,1,1,0,0,0,100,100);
	this.drop_6.alpha = 0;

	this.drop_5 = new lib.drop_1();
	this.drop_5.setTransform(1162,289.9,1,1,0,0,0,100,100);
	this.drop_5.alpha = 0;

	this.drop_4 = new lib.drop_1();
	this.drop_4.setTransform(892,289.9,1,1,0,0,0,100,100);
	this.drop_4.alpha = 0;

	this.drop_3 = new lib.drop_1();
	this.drop_3.setTransform(742,289.9,1,1,0,0,0,100,100);
	this.drop_3.alpha = 0;

	this.drop_2 = new lib.drop_1();
	this.drop_2.setTransform(472,289.9,1,1,0,0,0,100,100);
	this.drop_2.alpha = 0;

	this.drop_1 = new lib.drop_1();
	this.drop_1.setTransform(322,289.9,1,1,0,0,0,100,100);
	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}]}).wait(1));

	// 1228-dev.psd
	this.drag_6 = new lib.jajo1_1();
	this.drag_6.setTransform(1456,778,1,1,0,0,0,112,143);

	this.drag_5 = new lib.jajo2_1();
	this.drag_5.setTransform(1209.2,778,1,1,0,0,0,114,128);

	this.drag_4 = new lib.jajo5_1();
	this.drag_4.setTransform(944.9,778,1,1,0,0,0,98.5,136.5);

	this.drag_3 = new lib.jajo7_1();
	this.drag_3.setTransform(695.1,778,1,1,0,0,0,97.5,139.5);

	this.drag_2 = new lib.jajo3_1();
	this.drag_2.setTransform(444.8,778,1,1,0,0,0,96,133.5);

	this.drag_1 = new lib.jajo9_1();
	this.drag_1.setTransform(200,778,1,1,0,0,0,100,133.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.drag_1},{t:this.drag_2},{t:this.drag_3},{t:this.drag_4},{t:this.drag_5},{t:this.drag_6}]}).wait(1));

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

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