(function (lib, img, cjs) {

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

// library properties:
lib.properties = {
	width: 1825,
	height: 849,
	fps: 30,
	color: "#FFFFFF",
	manifest: [
		{src:"images/Bitmap1.png", id:"Bitmap1"},
		{src:"images/Bitmap2.png", id:"Bitmap2"},
		{src:"images/gfx_point.png", id:"gfx_point"}
	]
};

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

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

	this.addChild(this.container);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(912.5,424.5,1825.4,849.5);
p.frameBounds = [rect];


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


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


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


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

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("#1B7C7C").ss(2.9,1,1).p("ADUjTQBYBYAAB7QAAB8hYBYQhYBYh8AAQh7AAhYhYQhYhYAAh8QAAh7BYhYQBYhYB7AAQB8AABYBYg");

	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.f("#FFFFFF").s().p("AjTDUQhYhYAAh8QAAh7BYhYQBYhYB7AAQB8AABYBYQBYBYAAB7QAAB8hYBYQhYBYh8AAQh7AAhYhYg");

	this.addChild(this.shape_1,this.shape);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-31.5,-31.5,63,63);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.gfx_point();
	this.instance.setTransform(-50,-50,1.887,1.887);

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


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

	// Layer 1
	this.instance = new lib.Symbol4();
	this.instance.setTransform(187.3,173.7);

	this.instance_1 = new lib.Symbol4();
	this.instance_1.setTransform(103.2,173.7);

	this.instance_2 = new lib.Symbol4();
	this.instance_2.setTransform(187.3,71.5);

	this.instance_3 = new lib.Symbol4();
	this.instance_3.setTransform(103.2,71.5);

	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("#1B7C7C").ss(2.9,1,1).p("APjy8QvjjBuWGCQrgE1DOMoQESQ4RjBcQRdBYFiwyQE0unvEly");
	this.shape.setTransform(149.5,127.8);

	this.addChild(this.shape,this.instance_3,this.instance_2,this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-1.4,-1.4,301.9,258.4);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Symbol4();
	this.instance.setTransform(107,179.1);

	this.instance_1 = new lib.Symbol4();
	this.instance_1.setTransform(107,76.9);

	this.instance_2 = new lib.Symbol4();
	this.instance_2.setTransform(276.7,179.1);

	this.instance_3 = new lib.Symbol4();
	this.instance_3.setTransform(192.7,179.1);

	this.instance_4 = new lib.Symbol4();
	this.instance_4.setTransform(276.7,76.9);

	this.instance_5 = new lib.Symbol4();
	this.instance_5.setTransform(192.7,76.9);

	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("#1B7C7C").ss(2.9,1,1).p("AZIj4QGURu1cFvQ0QFcu3s8QsQqrJ/saQIQqSO2AHQT/AKMMNUQAiAmAiAnQBoB5BTCE");
	this.shape.setTransform(204.1,135.6);

	this.addChild(this.shape,this.instance_5,this.instance_4,this.instance_3,this.instance_2,this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-1.4,-1.4,411,274.2);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Symbol4();
	this.instance.setTransform(290.4,126.2);

	this.instance_1 = new lib.Symbol4();
	this.instance_1.setTransform(185.8,126.2);

	this.instance_2 = new lib.Symbol4();
	this.instance_2.setTransform(81.2,126.2);

	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("#1B7C7C").ss(2.9,1,1).p("A3KPrQK+FCMLgDQMcAGJ0nFQFPjxBSmKQAMg8AHg/QAWjXgpi2Qhuniouj4Qr8lRtAAcQt4AYm4LWQiRDtAoEUQB7NkOECrQAnAJAnAI");
	this.shape.setTransform(186.7,132.2);

	this.addChild(this.shape,this.instance_2,this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-1.4,-1.4,376.3,267.4);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Symbol4();
	this.instance.setTransform(284,120.1);

	this.instance_1 = new lib.Symbol4();
	this.instance_1.setTransform(179.4,120.1);

	this.instance_2 = new lib.Symbol4();
	this.instance_2.setTransform(74.8,120.1);

	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("#1B7C7C").ss(2.9,1,1).p("A4otuQELh4I6hfQE2gzFFgeQEugcDNAAQLJAAFPC2QGKDVAAIBQAAEci9EQQi5ELlODUQlVDYm2B4QnNB+n5AAQq8AAkgjnQiGhqg8ikQg2iTAAjSQAAnfHymYQDki7EniT");
	this.shape.setTransform(184.5,120.4);

	this.addChild(this.shape,this.instance_2,this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-1.4,-1.4,371.9,243.6);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Symbol4();
	this.instance.setTransform(86.7,91.4);

	this.instance_1 = new lib.Symbol4();
	this.instance_1.setTransform(236.6,193.5);

	this.instance_2 = new lib.Symbol4();
	this.instance_2.setTransform(131.2,193.5);

	this.instance_3 = new lib.Symbol4();
	this.instance_3.setTransform(289.4,91.4);

	this.instance_4 = new lib.Symbol4();
	this.instance_4.setTransform(188,91.4);

	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("#1B7C7C").ss(2.9,1,1).p("AWawjQrMkjsIAlQqJAXoLFCQh4BKhxBZQl1EngdHiQgwMUMPE0QE1B5E/A+QHhBfHzgnQC4gNCjgrQJwiiFEpNQCFjzgzkQQiNr2rLjDQhkgbhvgQQgogHgngH");
	this.shape.setTransform(187,131.9);

	this.addChild(this.shape,this.instance_4,this.instance_3,this.instance_2,this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-1.4,-1.4,376.8,266.7);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Symbol4();
	this.instance.setTransform(-72.4,50.4);

	this.instance_1 = new lib.Symbol4();
	this.instance_1.setTransform(-72.4,-51.8);

	this.instance_2 = new lib.Symbol4();
	this.instance_2.setTransform(97.3,50.4);

	this.instance_3 = new lib.Symbol4();
	this.instance_3.setTransform(13.3,50.4);

	this.instance_4 = new lib.Symbol4();
	this.instance_4.setTransform(97.3,-51.8);

	this.instance_5 = new lib.Symbol4();
	this.instance_5.setTransform(13.3,-51.8);

	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("#1B7C7C").ss(2.9,1,1).p("A8njeQnNP5YcFKQXEE5Q8roQN9plrYrJQpapPw6AHQ3xAJuGNCQh3BtheB2");

	this.addChild(this.shape,this.instance_5,this.instance_4,this.instance_3,this.instance_2,this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-233.9,-123.2,467.9,246.5);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Symbol11();
	this.instance.setTransform(232.5,121.8);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-1.4,-1.4,467.9,246.5);
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: '1237',
			title: 'Połącz wężykiem zbiory, które mają tyle samo elementów.',
			type: 'rope',
			container: this,
			/*
			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]
			},
			*/
			prefix: 'drag_',
			prefix2: 'drop_',
			prefix3: 'ropepoint_',
			prefix4: 'rope_',
			results: [
				/*drop_1:*/ '1',
				/*drop_2:*/ '',
				/*drop_3:*/ '3',
			],
			range: 100,
			alpha: 1,
			alpha2: 1,
			//scale: 0.8,
			//zindex: 0
			color: '#000000',
			stroke: 10,
			
			exerciseAfterInit: function () {
					this.container['drop_2'].correct = true;
			},
			exerciseBeforeFinish: function() {		
			},
			exerciseExtraCheck: function() {
				if(this.container['drop_2'].isDrop !== true)
					this.container['drop_2'].correct = true;
			},
		}
		
		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));

	// drag
	this.drag_3 = new lib.gfx_point_mc();
	this.drag_3.setTransform(498,701.5,0.528,0.528);
	this.drag_3.filters = [new cjs.ColorFilter(0.5, 0.5, 0.5, 1, 127.5, 0, 0, 0)];
	this.drag_3.cache(-52,-52,104,104);

	this.drag_2 = new lib.gfx_point_mc();
	this.drag_2.setTransform(498,419.4,0.528,0.528);
	this.drag_2.filters = [new cjs.ColorFilter(0.5, 0.5, 0.5, 1, 127.5, 0, 0, 0)];
	this.drag_2.cache(-52,-52,104,104);

	this.drag_1 = new lib.gfx_point_mc();
	this.drag_1.setTransform(498,123.4,0.528,0.528);
	this.drag_1.filters = [new cjs.ColorFilter(0.5, 0.5, 0.5, 1, 127.5, 0, 0, 0)];
	this.drag_1.cache(-52,-52,104,104);

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

	// rope
	this.ropepoint_3 = new lib.gfx_point_mc();
	this.ropepoint_3.setTransform(498,701.5,0.528,0.528);

	this.ropepoint_2 = new lib.gfx_point_mc();
	this.ropepoint_2.setTransform(498,419.4,0.528,0.528);

	this.ropepoint_1 = new lib.gfx_point_mc();
	this.ropepoint_1.setTransform(498,123.4,0.528,0.528);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.ropepoint_1},{t:this.ropepoint_2},{t:this.ropepoint_3}]}).wait(1));

	// drop
	this.drop_2 = new lib.gfx_point_mc();
	this.drop_2.setTransform(715.5,697.4,0.528,0.528);

	this.drop_3 = new lib.gfx_point_mc();
	this.drop_3.setTransform(715.5,121.3,0.528,0.528);

	this.drop_1 = new lib.gfx_point_mc();
	this.drop_1.setTransform(735.5,419.4,0.528,0.528);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.drop_1},{t:this.drop_3},{t:this.drop_2}]}).wait(1));

	// content
	this.instance = new lib.Symbol17();
	this.instance.setTransform(907.2,720.3,1,1,0,0,0,149.5,127.8);

	this.instance_1 = new lib.Symbol16();
	this.instance_1.setTransform(986.5,433.3,1,1,0,0,0,204.1,135.7);

	this.instance_2 = new lib.Symbol15();
	this.instance_2.setTransform(941,148.7,1,1,0,0,0,186.7,132.3);

	this.instance_3 = new lib.Symbol14();
	this.instance_3.setTransform(282.2,709.6,1,1,0,0,0,184.5,120.4);

	this.instance_4 = new lib.Symbol13();
	this.instance_4.setTransform(276,419.4,1,1,0,0,0,187,131.8);

	this.instance_5 = new lib.Symbol12();
	this.instance_5.setTransform(232.5,149.1,1,1,0,0,0,232.5,121.8);

	this.instance_6 = new lib.Bitmap2();
	this.instance_6.setTransform(1066.9,0);

	this.instance_7 = new lib.Bitmap1();
	this.instance_7.setTransform(1227.5,129.4);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_7},{t:this.instance_6},{t:this.instance_5},{t:this.instance_4},{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(-1.4,0,1825.4,849.5);
p.frameBounds = [rect];

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