(function (lib, img, cjs) {

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

// library properties:
lib.properties = {
	width: 1907,
	height: 672,
	fps: 30,
	color: "#FFFFFF",
	manifest: [
		{src:"images/_2075_03.png", id:"_2075_03"},
		{src:"images/_2075_05.png", id:"_2075_05"},
		{src:"images/_2075_07.png", id:"_2075_07"},
		{src:"images/Bitmap1.png", id:"Bitmap1"},
		{src:"images/Bitmap2.png", id:"Bitmap2"},
		{src:"images/Bitmap3.png", id:"Bitmap3"},
		{src:"images/Bitmap4.png", id:"Bitmap4"},
		{src:"images/Bitmap5.png", id:"Bitmap5"},
		{src:"images/Bitmap6.png", id:"Bitmap6"},
		{src:"images/Bitmap7.png", id:"Bitmap7"}
	]
};

// 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(953.5,336,1907.4,672.7);
p.frameBounds = [rect];


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


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


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


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


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


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


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


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


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


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


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

	// Layer 1
	this.instance = new lib.Bitmap6();
	this.instance.setTransform(0,0,0.661,0.661);

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


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

	// Layer 1
	this.instance = new lib.Bitmap5();
	this.instance.setTransform(0,0,0.414,0.414);

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


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

	// Layer 1
	this.instance = new lib.Bitmap4();
	this.instance.setTransform(0,0,0.64,0.64);

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


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

	// Layer 1
	this.instance = new lib.Bitmap3();
	this.instance.setTransform(0,0,0.564,0.564);

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


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

	// Layer 1
	this.instance = new lib.Bitmap2();
	this.instance.setTransform(0,0,0.393,0.393);

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


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

	// Layer 1
	this.instance = new lib.Bitmap1();
	this.instance.setTransform(0,0,0.577,0.577);

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


(lib.drop = 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,525,343);
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: '2091',
			title: 'Przeciągnij zwierzęta i upuść na fotografii, aby zwierząta znalazły się w ich naturalnym środowisku.',
			type: 'drag',
			container: this,
			endsound: 'ssGratuluje',
			prefix: 'drag_',
			prefix2: 'drop_',	
			groupdrags: {		
				1: ['3','6'],
				2: ['2','5'],
				3: ['1','4']
			},
			/*
			groupdrops: {
				1: [1,2,3],
				2: [4,5,6],
				3: [7,8,9]
			},
			*/	
			results: [
				/*drop_1:*/ '1',
				/*drop_2:*/ '1',
				/*drop_3:*/ '2',
				/*drop_4:*/ '2',
				/*drop_5:*/ '3',
				/*drop_6:*/ '3',
			],
			range: 20,
			alpha: 0,
			alpha2: 0,
			scale: 0.6,
			//rotation: 'auto',
			//size: 'auto',
			//zindex: 0
		}
		
		/* Ustawienia obiektow */ 
		
		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_2 = new lib.drop();
	this.drop_2.setTransform(484.8,322.6,1.067,1.06,-4.2,0,0,389.7,284.7);

	this.drag_6 = new lib.gfx_6();
	this.drag_6.setTransform(1631.9,630,1,1,0,0,0,185.3,182.6);

	this.drag_5 = new lib.gfx_5();
	this.drag_5.setTransform(1344.1,627.2,1,1,0,0,0,90.6,125.3);

	this.drag_4 = new lib.gfx_4();
	this.drag_4.setTransform(1082.7,594.9,1,1,0,0,0,167.7,174.5);

	this.drag_3 = new lib.gfx_3();
	this.drag_3.setTransform(812.3,620.3,1,1,0,0,0,120.5,328.7);

	this.drag_2 = new lib.gfx_2();
	this.drag_2.setTransform(574.6,609.2,1,1,0,0,0,99.7,128.7);

	this.drag_1 = new lib.gfx_1();
	this.drag_1.setTransform(257.8,608.2,1,1,0,0,0,139.2,117.7);

	this.drop_6 = new lib.drop();
	this.drop_6.setTransform(1733.1,348.7,1.063,1.073,1.9,0,0,408.7,260.9);

	this.drop_4 = new lib.drop();
	this.drop_4.setTransform(1101.8,176.6,1,1,0,0,0,395.6,133.5);

	this.drop_5 = new lib.drop();
	this.drop_5.setTransform(1434.1,328.7,1.063,1.073,1.9,0,0,127,251.5);

	this.drop_1 = new lib.drop();
	this.drop_1.setTransform(238.9,341.7,1.067,1.06,-4.2,0,0,158.5,285.7);

	this.drop_3 = new lib.drop();
	this.drop_3.setTransform(838.7,296.6,1,1,0,0,0,132.5,253.5);

	this.instance = new lib._2075_07();
	this.instance.setTransform(680.4,10.9);

	this.instance_1 = new lib._2075_05();
	this.instance_1.setTransform(1276.4,13.6);

	this.instance_2 = new lib._2075_03();

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

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

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