(function (lib, img, cjs) {

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

// library properties:
lib.properties = {
	width: 1880,
	height: 1100,
	fps: 30,
	color: "#FFFFFF",
	manifest: [
		{src:"images/_9303389_xl.png", id:"_9303389_xl"},
		{src:"images/_9303389_xlcopy.png", id:"_9303389_xlcopy"},
		{src:"images/_9303389_xlcopysOuterStroke.png", id:"_9303389_xlcopysOuterStroke"},
		{src:"images/_9303389_xlsDropShadow.png", id:"_9303389_xlsDropShadow"},
		{src:"images/_9562492_xlcopy.png", id:"_9562492_xlcopy"},
		{src:"images/_9562492_xlcopysOuterStroke.png", id:"_9562492_xlcopysOuterStroke"},
		{src:"images/_9776107_xxl.png", id:"_9776107_xxl"},
		{src:"images/_9776107_xxlcopy.png", id:"_9776107_xxlcopy"},
		{src:"images/_9776107_xxlcopysOuterStroke.png", id:"_9776107_xxlcopysOuterStroke"},
		{src:"images/_9776107_xxlsDropShadow.png", id:"_9776107_xxlsDropShadow"},
		{src:"images/Layer2.png", id:"Layer2"},
		{src:"images/Layer2sDropShadow.png", id:"Layer2sDropShadow"},
		{src:"images/Layer3.png", id:"Layer3"},
		{src:"images/Layer3copy.png", id:"Layer3copy"},
		{src:"images/Layer3copysOuterStroke.png", id:"Layer3copysOuterStroke"},
		{src:"images/Layer3sDropShadow.png", id:"Layer3sDropShadow"},
		{src:"images/VectorSmartObject.png", id:"VectorSmartObject"},
		{src:"images/VectorSmartObjectcopy.png", id:"VectorSmartObjectcopy"},
		{src:"images/VectorSmartObjectcopysOuterStroke.png", id:"VectorSmartObjectcopysOuterStroke"},
		{src:"images/VectorSmartObjectsDropShadow.png", id:"VectorSmartObjectsDropShadow"}
	]
};

// 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(940,730,1768,916);
p.frameBounds = [rect];


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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

	// Layer 1
	this.instance = new lib.VectorSmartObjectsDropShadow();
	this.instance.setTransform(-289.5,-108);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-289.5,-108,579,216);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.VectorSmartObject();
	this.instance.setTransform(-271.5,-89.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-271.5,-89.5,543,179);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.VectorSmartObjectcopysOuterStroke();
	this.instance.setTransform(-279.5,-98);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-279.5,-98,559,196);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Layer3sDropShadow();
	this.instance.setTransform(-105,-74);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-105,-74,210,148);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Layer3();
	this.instance.setTransform(-86.5,-55.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-86.5,-55.5,173,111);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Layer3copysOuterStroke();
	this.instance.setTransform(-94.5,-63.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-94.5,-63.5,189,127);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Layer2sDropShadow();
	this.instance.setTransform(-116.5,-187);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-116.5,-187,233,374);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib.Layer2();
	this.instance.setTransform(-99,-170);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-99,-170,198,340);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib._9776107_xxlsDropShadow();
	this.instance.setTransform(-231,-152);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-231,-152,462,304);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib._9776107_xxl();
	this.instance.setTransform(-215,-136);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-215,-136,430,272);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib._9776107_xxlcopysOuterStroke();
	this.instance.setTransform(-223.5,-144);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-223.5,-144,447,288);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib._9562492_xlcopysOuterStroke();
	this.instance.setTransform(-107,-178);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-107,-178,214,356);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib._9303389_xlsDropShadow();
	this.instance.setTransform(-282.5,-198.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-282.5,-198.5,565,397);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib._9303389_xl();
	this.instance.setTransform(-265,-181.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-265,-181.5,530,363);
p.frameBounds = [rect];


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

	// Layer 1
	this.instance = new lib._9303389_xlcopysOuterStroke();
	this.instance.setTransform(-273,-189.5);

	this.addChild(this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-273,-189.5,546,379);
p.frameBounds = [rect];


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

	// Vector Smart Object copy
	this.instance = new lib.VectorSmartObjectcopy();
	this.instance.setTransform(-271.5,-90);

	// Vector Smart Object copy's Outer Stroke
	this.instance_1 = new lib.VectorSmartObjectcopysOuterStroke_1();

	this.addChild(this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-279.5,-98,559,196);
p.frameBounds = [rect];


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

	// Vector Smart Object
	this.instance_1 = new lib.VectorSmartObject_1();
	this.instance_1.setTransform(-2,-4.5);

	// Vector Smart Object's Drop Shadow
	this.instance_2 = new lib.VectorSmartObjectsDropShadow_1();

	this.addChild(this.instance_2,this.instance_1);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-289.5,-108,579,216);
p.frameBounds = [rect];


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

	// Layer 3 copy
	this.instance = new lib.Layer3copy();
	this.instance.setTransform(-86.5,-55.5);

	// Layer 3 copy's Outer Stroke
	this.instance_1 = new lib.Layer3copysOuterStroke_1();

	this.addChild(this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-94.5,-63.5,189,127);
p.frameBounds = [rect];


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

	// Layer 3
	this.instance_1 = new lib.Layer3_1();
	this.instance_1.setTransform(-2.5,-4.5);

	// Layer 3's Drop Shadow
	this.instance_2 = new lib.Layer3sDropShadow_1();

	this.addChild(this.instance_2,this.instance_1);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-105,-74,210,148);
p.frameBounds = [rect];


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

	// Layer 2
	this.instance_1 = new lib.Layer2_1();
	this.instance_1.setTransform(-2.5,-3);

	// Layer 2's Drop Shadow
	this.instance_2 = new lib.Layer2sDropShadow_1();

	this.addChild(this.instance_2,this.instance_1);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-116.5,-187,233,374);
p.frameBounds = [rect];


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

	// 9776107_xxl copy
	this.instance = new lib._9776107_xxlcopy();
	this.instance.setTransform(-215.5,-136);

	// 9776107_xxl copy's Outer Stroke
	this.instance_1 = new lib._9776107_xxlcopysOuterStroke_1();

	this.addChild(this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-223.5,-144,447,288);
p.frameBounds = [rect];


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

	// 9776107_xxl
	this.instance_1 = new lib._9776107_xxl_1();
	this.instance_1.setTransform(-4,-3);

	// 9776107_xxl's Drop Shadow
	this.instance_2 = new lib._9776107_xxlsDropShadow_1();

	this.addChild(this.instance_2,this.instance_1);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-231,-152,462,304);
p.frameBounds = [rect];


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

	// 9562492_xl copy
	this.instance = new lib._9562492_xlcopy();
	this.instance.setTransform(-99,-170);

	// 9562492_xl copy's Outer Stroke
	this.instance_1 = new lib._9562492_xlcopysOuterStroke_1();

	this.addChild(this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-107,-178,214,356);
p.frameBounds = [rect];


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

	// 9303389_xl copy
	this.instance = new lib._9303389_xlcopy();
	this.instance.setTransform(-265,-181.5);

	// 9303389_xl copy's Outer Stroke
	this.instance_1 = new lib._9303389_xlcopysOuterStroke_1();

	this.addChild(this.instance_1,this.instance);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-273,-189.5,546,379);
p.frameBounds = [rect];


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

	// 9303389_xl
	this.instance_1 = new lib._9303389_xl_1();
	this.instance_1.setTransform(-2.5,-4);

	// 9303389_xl's Drop Shadow
	this.instance_2 = new lib._9303389_xlsDropShadow_1();

	this.addChild(this.instance_2,this.instance_1);
}).prototype = p = new cjs.Container();
p.nominalBounds = rect = new cjs.Rectangle(-282.5,-198.5,565,397);
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() {
		/* Ustawienia */
		var config = {
			id: '2106',
			title: 'Przeciągnij obrazki w odpowiednie miejsca, aby poznać ich angielskie nazwy.',
			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',
				/*drop_4:*/ '5',
			],
			range: 20,
			alpha: 1,
			alpha2: 1,
			//scale: 0.8,
			//rotation: 'auto',
			//size: 'auto',
			//zindex: 0
			exerciseAfterInit: function () {
			},
			exerciseBeforeFinish: function () {
				var exerciseId = this.id; 
				var exerciseContainer = this.container;			
				var soundPrefix = 'drop_';
				
				var queue = new createjs.LoadQueue();
				queue.installPlugin(createjs.Sound);	
				createjs.Sound.alternateExtensions = ["ogg"];	
				
				for(var soundName in exerciseContainer) {
					if(soundName.indexOf(soundPrefix) > -1) {				
						var sound = exerciseContainer[soundName];
						var soundId = exerciseId+'_'+soundName.replace(soundPrefix, '');
						var soundSrc = getAssetDir()+'/sounds/'+soundId + '.mp3';
						sound.name = soundName;
						queue.loadFile({id:soundId, src:soundSrc});
					}
				}
			},
			exerciseExtraCheck: function (config, dragCurrent, dropIndex, isCorrect) {
				if(isCorrect === true) {
					createjs.Sound.play(config.id+'_'+(dropIndex+1));  
				}
			},
		}
		
		exerciseOnInit(config);
		
		this.stop();
		
		
		/*---------------------------------------------------------------------------------------------------------------
		/* Help
		/*---------------------------------------------------------------------------------------------------------------
		 
		id - Id cwiczenia
		title - Tytul cwiczenia
		type - Typ Cwiczenia
		contanier - Kontener cwiczenia
		groupdrags - Lista grup dagow oraz przypisane do nich identyfikatory (unikatowa liczba) obiektow bez prefixow
		groupdrags - Lista grup targetow 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
		rotation - Dostosowanie obrotu obiektu do targetu
		scale - Skalowanie obiektu po upuszczeniu
		size - Skalowanie obiektu do rozmiarow targetu
		zindex - Pozycja z obiektu
		/*-------------------------------------------------------------------------------------------------------------*/
	}

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

	// content
	this.drop_4 = new lib._9562492_xlcopy_1();
	this.drop_4.setTransform(623,358);

	this.drag_4 = new lib.Layer2_2();
	this.drag_4.setTransform(1380.5,851);

	this.drop_3 = new lib._9303389_xlcopy_1();
	this.drop_3.setTransform(273,375.5);

	this.drag_3 = new lib._9303389_xl_2();
	this.drag_3.setTransform(1037.5,831.5);

	this.drop_5 = new lib.Layer3copy_1();
	this.drop_5.setTransform(481.5,668.5);

	this.drag_5 = new lib.Layer3_2();
	this.drag_5.setTransform(1151,1022);

	this.drop_1 = new lib._9776107_xxlcopy_1();
	this.drop_1.setTransform(254.4,639);

	this.drag_1 = new lib._9776107_xxl_2();
	this.drag_1.setTransform(758,797);

	this.drop_2 = new lib.VectorSmartObjectcopy_1();
	this.drop_2.setTransform(360.5,940);

	this.drag_2 = new lib.VectorSmartObject_2();
	this.drag_2.setTransform(1478.5,608);

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

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = rect = new cjs.Rectangle(0,180,1768,916);
p.frameBounds = [rect];

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