var player = null;


	var ls_story = new Array;
	ls_story[0] = "<h2>Set Goals</h2>In the initial goal-setting phase of lesson study, teacher participants begin by setting a goal for their students that they are aiming to address in the research lesson.  This is often something that is difficult for the students to learn, or difficult for the teachers to teach (or both). Teachers work collaboratively to set goals, asking one another questions to hone in on the lesson goals. Further, teachers discuss the challenges they face in supporting deep student understanding of key mathematical ideas (such as proportional reasoning and understanding linear systems). At times, the learning goal is based on a testing of theories presented by other researchers and/or teachers – including seeing what students are capable of, given positive learning conditions. Often, &quot;the desire to improve is stimulated by seeing what’s not working&quot; (Lewis et al., 2006). Goal setting leads to an exploration for the best instructional strategies that could be used to achieve the goal (Fernandez, 2002).</p><p>The following clip is taken from the initial meeting of a group of lesson study teachers, administrators and researchers engaged in a two-year lesson study project (in four school teams). After reflecting upon the previous year of lesson study, individual schools broke off into their respective teams to brainstorm what their lesson study goal might look like. One member of the team summarizes the key issue that teachers identified during their initial discussions.";
	ls_story[1] = "<h2>Between Stages 1 & 2</h2>Participating mathematics teachers in our study identified five main activities between stage 1 (goal setting) and stage 2 (planning) of the lesson study cycle. These are: <ol><li>Searching - researching the internet, data-bases and teacher resources about the topic in focus;</li><li>Conceptualizing - brainstorming, self talk and informal conversations, exploring valuable tangents;</li><li>Investigating – exploring the use of manipulatives and technological tools with students to expand the teachers’ and students’ repertoire;</li><li>Exploring - deepening understanding of the mathematics concepts through exploration; and,</li><li>Monitoring - keeping up with details such as on-going student assessment which provides insights into student learning and assists in the planning of lessons.</li></ol><p>The teachers explained that this stage of “playing” and “figuring out” was deeply connected to their understanding of math concepts and how those concepts could be represented and investigated by students.</p><p>This video clip is taken from a planning session of one school team, where teachers were working through their understanding of how to represent growing linear patterns geometrically, and then using these geometric representations to reveal the linear function (rule) of the pattern. As one teacher later said, the value of this planning session for her lay not so much in the opportunity to plan as in the opportunity to develop her own mathematical understanding with her colleagues.";
	ls_story[2] = "<h2>Plan</h2>During the lesson planning stage, teacher participants access outside sources of information – both print (e.g., innovative materials and research articles) and human (e.g., outside educators, content specialists, researchers). Teachers collaborate with their colleagues in planning a lesson (the public lesson), and then set out to conduct exploratory lessons, constantly tweaking and reflecting on the scope of their lesson and the overall project. This often results in planning a three- or four-lesson sequence with one feature lesson that becomes the public lesson for formal observation. A common planning template may be used; for example, each lesson developed in this project demanded a three-part lesson format with an activation component, a development/inquiry-based component and a consolidation component. Planning may also involve selecting students to take part in the public lesson (selecting targeted students may be desirable to allow the team to focus on certain learning objectives).</p><p>The teacher in this video clip is exploring, with her lesson study team and researchers, what the lesson might look like and how students might interact with each other and with the materials/technology provided.";
	ls_story[3] = "<h2>Between Stages 2 & 3</h2>Teachers in our study identified ongoing backstage activities that carried on between stage 2 (planning) and stage 3 (lesson implementation). These included emailing one another with questions and suggestions (one team used a Wiki space for this), further experimenting with manipulatives and interactive whiteboard use, acclimatizing students to video use in the classroom and, most importantly, conducting exploratory lessons.</p><p>Exploratory lessons allow lesson study participants to see in advance of the public lesson how different elements of their lesson may function with different students with a view to understanding student learning and to making refinements to the lesson.</p><p>In this clip, teachers are discussing the value of the exploratory lessons and what they learned (such as the need for task revisions and determining optimal group size for students) to help revise the formal public lesson.";
	ls_story[4] = "<h2>Implement</h2>Once the formal public lesson is planned, teacher teams decide who will implement the lesson. On the day of the public lesson, the teacher team and invited observers meet to discuss the development of the lesson. The group discusses what they learned and how their lesson evolved through exploratory lessons. Further, they outline what the public lesson will look like and what they would like observers to look for. These types of meetings are enriching to not only the teacher team, but also to the observers and researchers. Understanding how the lesson evolved helps the group to more deeply understand what they are observing.</p><p>The public lesson is vital to lesson study. It is the day that the substantial work within the lesson study process culminates before colleagues, observers and researchers. It is the instrument that enables formal data collection to occur with an eye to learning more about student understanding and effectiveness of the lesson itself. During the public lesson, all observers make field notes based on <a target='_blank' href='/digitalpapers/observation-guides.php'>observation guides</a> or guiding questions provided by the lesson planning team. We have found these guides to be very helpful in focusing the discussions on issues and ideas the lesson study team are interested in examining closely.</p><p>This clip is taken from one school’s public lesson in May of 2009, in a Grade 9 classroom. Clips from the activation, development and consolidation parts of the lesson are documented here. In this lesson, students are learning about volume; they are taken through a ‘Minds On’ activity on the interactive whiteboard, followed by group work (in pairs) to investigate the volume of a range of prisms while rotating through stations. The students then come together at the end of their investigations to share their findings as a whole group. The teacher then poses a more challenging question, discovered by other students from one of the previous exploratory lessons, for these Grade 9 students to think about.";
	ls_story[5] = "<h2>Between Stages 3 & 4</h2>After the public lesson, teachers often experience a collective sense of accomplishment, and the debrief provides an opportunity to acknowledge this. Most importantly, the debrief provides a chance for teachers to reflect on their practice.  The immediate reflection-on-action teachers engage in often includes thoughts about: a) what might have been done differently to meet the needs of students even more explicitly; b) how the lesson could have been modified to solicit other particular kinds of thinking and representations of understanding from the students; and c) how to solve logistical issues such as optimal student groupings, and pacing of the lesson. At this time, the entire group should take a few minutes to pause for personal reflection and to make sense of their field notes taken during the observation of the public lesson.</p><p>In the following clip, a facilitator outlines the protocol for debriefing a public lesson. This protocol ensures that everyone contributes while carefully honouring the teacher who taught the public lesson and the lesson planning team.</p><p>Steps include:<ol><li>The teacher who taught the lesson speaks first and describes how (s)he felt about the lesson.</li><li>Teacher colleagues who also planned the lesson speak, describing how they felt the lesson went.</li><li>The observers are then given the opportunity to share their observations based on the <a target='_blank' href='/digitalpapers/observation-guides.php'>observation guides</a>.</li><li>The group discusses key learnings from the public lesson and often discusses next steps for future practice.</li></ol>";
	ls_story[6] = "<h2>Debrief</h2>The debriefing session is designed to enable communication amongst participants about student learning and teacher learning. The debrief stage drives the continuation of the cycle as the next set of goals is established. The final phases of the cycle – implementation / reflection / debrief – should feel less like a final performance and more like a catalyst for further study and improvement of practice (Lewis et al., 2006). This is often a site of deep learning for teachers; for example, one teacher team taught multiple exploratory lessons before realizing the importance of leaving time for consolidation. They recognized that they, like many others, were focused on “covering” curriculum, rather than teaching it in depth. The debrief is an opportunity for colleagues and observers to provide fresh feedback on teacher practice that is both positive and constructive. Teacher teams collaborate on the lesson development and implementation together. In this way, they rise and fall together, offering a foundation to more effective lessons in the future that lead to greater student understanding.</p><p>In this clip, there are two segments: 1. In the Teacher Debrief, (see ‘between stages 3 & 4’), the teacher who implemented the lesson discusses her thoughts on how the lesson went and things she noticed while teaching. 2. In the Participant Observer Debrief, we listen to a team member share his observations of the public lesson.";
	ls_story[7] = "<h2>Between Stages 4 & 1</h2>After the formal debriefing session where the teachers and observers discuss the lesson, the planning teachers often regroup informally as a small team. In our research, teachers expressed how valuable it was to have these opportunities to continue the dialogue as a team. The teachers immediately began planning the follow-up lessons based on the observations of the public lesson. This included revising plans that the teachers had already developed and finding ways to ensure that all students (beyond those involved in the public lesson) had the opportunity to participate in the lesson. </p><p>Much later, teachers continue to re-evaluate their learning and student learning. In this clip, a teacher is reflecting on her earlier experiences as the public lesson teacher and the benefits of watching the lesson with researchers while re-viewing the videotape made of her class during the public lesson.";

	var dc_vid = new Array;
	dc_vid[0] = "/digitalpapers/samples/dc/DC_Video_1.flv";
	dc_vid[1] = "/digitalpapers/samples/dc/DC_Video_2.flv";
	dc_vid[2] = "/digitalpapers/samples/dc/DC_Video_3.flv";
	dc_vid[3] = "/digitalpapers/samples/dc/DC_Video_4.flv";

	var ls_vid = new Array;
		ls_vid[0] = "/digitalpapers/samples/ls/LS_Video_1.flv";
		ls_vid[1] = "/digitalpapers/samples/ls/LS_Video_2.flv";
		ls_vid[2] = "/digitalpapers/samples/ls/LS_Video_3.flv";
		ls_vid[3] = "/digitalpapers/samples/ls/LS_Video_4.flv";
		ls_vid[4] = "/digitalpapers/samples/ls/LS_Video_5.flv";
		ls_vid[5] = "/digitalpapers/samples/ls/LS_Video_6.flv";
		ls_vid[6] = "/digitalpapers/samples/ls/LS_Video_7.flv";
		ls_vid[7] = "/digitalpapers/samples/ls/LS_Video_8.flv";

	var dc_story = new Array;
	dc_story[0] = "<h2>Pre-visit Discussion</h2>The first stage in a demonstration classroom project involves a pre-conference, during which participating teachers meet with the host teacher to discuss learning goals, issues around planning and assessment, anticipated student responses, and other issues of interest to the host or visiting teachers.<br/><br/>At this time, visitors may discuss and take on observation roles for the classroom visit, depending on the learning objectives of the lesson or of the visiting teachers. Just as teachers begin a lesson by activating the students’ prior knowledge, the pre-visit discussion may be seen as the “activation” phase of the demonstration classroom learning experience. The discussion gives the visiting teacher team an opportunity to talk to the host teacher, who may “set up” the lesson for the visiting teachers and point out important aspects of the lesson, the continuum of learning leading to that lesson, particular issues with the class or the curriculum, problems that the teacher is experiencing and/or attempting to address, and so on. As a result, teachers have more information going into the demonstration class and are able to make more precise observations.<p>In this clip, a visiting teacher is meeting with the host teacher and other observers prior to the demonstration lesson. He discusses his own goals and challenges with respect to implementation of the three-part math lesson. He has been working on his timing of each stage to ensure that the class has sufficient time for consolidation; teachers have consistently found it a struggle to reach consolidation, often running out of time. The visiting teacher discusses the challenge of finding time to address the needs of all learners in the room.";
	dc_story[1] = "<h2>Demonstration Classroom Visit</h2>Following the pre-conference, teachers attend the demonstration lesson, taking careful notes on student responses and interactions, teacher decision-making, features of the classroom or of the lesson. Observation guides, tailored to the goals of the demonstration classroom, may also be used.</p><p>Of paramount importance is the fact that this learning is situated in the classroom context, where the lessons place teacher learning in the familiarity of the classroom and act as the catalyst for change. According Lave and Wenger’s (1991) seminal work, situated learning occurs within communities of practice at the site at which the learner will be performing the activity and is accordingly embedded within that context. The learning is not transmitted from one person to another, but socially co-constructed through participation as well as through mechanisms of observation and discussion.</p><p>In our study, the visit to the demonstration classroom placed the learning within the context of the classroom and made it recognizable and accessible to teachers. Even though the three-part lesson was familiar to the teachers, seeing it enacted led to new observations and understandings of how it could work, what it could look like and sound like, in their classrooms with their students. The fact that they were able to actually see the lesson in the authentic setting of the classroom allowed teachers to immediately implement some practical strategies to support the implementation of the three-part lesson format in their own classroom.</p><p>In this clip, teachers are observing in a demonstration classroom.";
	dc_story[2] = "<h2>Debrief and Goal Setting</h2>Visitors meet with the host teacher for a post-lesson debrief, during which observations are shared and implications discussed.</p><p>This discussion is ideally facilitated by a support person (either a math researcher or board coach or math consultant) who invites the host teacher to speak first about how the lesson went. The host teacher has an opportunity to speak to the lesson, share feelings about how it went, and note unanticipated directions and student responses. Following these initial statements, the rest of the observers can then share what they noticed, and what they recorded using their <a target='_blank' href='/digitalpapers/observation-guides.php'>observation guides</a>. The purpose is not to evaluate the teacher or the lesson, but to examine how the lesson functioned for students and to relate this back to the observing teachers’ practices. It is important to create an atmosphere of safety and trust that will allow all teachers to share openly with colleagues without feeling judged or evaluated on performance. The discussion gives teachers the opportunity to build feelings of trust and collegiality while socially co-constructing knowledge based on their unpacking of the shared experience of the demonstration lesson.</p><p>In this clip, teachers talk about what they saw in the demonstration lesson. One teacher noticed how the host teacher had the classroom organized so that different parts of the room were used strategically for different purposes. Later, this observing teacher will adapt what she observed to her own classroom.";
	dc_story[3] = "<h2>Enactment</h2>Immediately following the demonstration classroom visit, the visiting teacher team may be afforded release time in which to pursue learning goals through further research, discussion, and co-planning. The fact that teachers are able to actually see the lesson in the authentic setting of the classroom can facilitate immediate implementation of some similar practices to support the enactment of their goals.</p><p>The demonstration classroom experience can end here, but the literature and this research shows how a very robust model would make these activities cyclical in nature and potentially more powerful. Ideally, goal setting and implementation would really be a launching point to a new cycle of activity. Teachers would use this opportunity to set goals for classroom implementation and for their learning in the next round of demonstration classroom activity. This iterative approach provides rich opportunities for learning, as teachers have a base of learning to drive their inquiry and implementation in the second round. This model can also be further expanded in between the activities outlined in this diagram to include support in the form of PD workshops before, during and/or after the demonstration classroom activity, visits to one another’s classrooms, observations and feedback from researchers and/or PD staff, and additional release time for co-planning/co-teaching. According to Luft (1998a; 1998b; 2001; Luft & Pizzini, 1998), who has completed extensive studies on demonstration classrooms, these features of the model attend to the principles of effective professional development because they address the specific needs of adult learners, provide ample opportunities for follow up and reflection, and utilize models and methods that represent sound pedagogy as well as content.</p><p>In this clip, one teacher reflects on how she adapted the strategy of using space to mark key points in the three-part math lesson, and how valuable her observations of the demonstration classroom were to help in meeting her goal of achieving consolidation in math lessons. By connecting physical spaces to the lesson structure, this teacher was able to cue herself to maintain the structured lesson format she was learning to implement.";

	var dc_trans = new Array;
	dc_trans[0] = "<p>Teacher: And so, working our way back to that…but what we found for both of us has been timing of the different stages.<br/>Researcher: you were focusing on the three-part lesson a lot.<br/>Teacher: Yeah, so, looking at each stage and how we find, okay, the first stage tends to be longer because we’re catching up a lot of our kids because they come in and their skill set is so low that you’re not actually teaching grade 6, or 5 in her instance. You’re actually working from 2, 3, 4, 5 – and I’m telling them, I’m saying, here’s what you learned in [grade] 2, and going through it. And here’s what you did in [grade] 3 and going through it with them. And seeing some of the leaves start to fall off. And that’s the piece in the beginning. And it gives you a sense of where they’re at, but it’s also difficult, because the majority of my kids are supposed to be working at a grade six level.<br/>Teacher 2: That’s been the frustration for me, is, okay, so you’ve got, you get a sense of where your kids are at… I’m getting much better at sort of the whole assessment piece, figuring out, oh, great, okay, now I know where they’re all at. And then it just all goes to hell in a hand bucket after that because you’re like, okay, well I’ve got this group of kids that need to redo the whole proportions piece because they didn’t get it, and then I’ve got this group of kids whose problem solving is great and I can really move them on, and then I have a couple of kids that are way low, and then a mid-range. And so now I’ve got five groups to manage, and it’s just…that’s where it starts to become very very challenging trying to keep that going. And so when you do your minds-on at the beginning, which of the groups do you kind of figure you’re going to go to.</p>";
	dc_trans[1] = "<p>Narration: Observation is the key catalyst for teacher learning in the demonstration classroom process. Teachers in our study talked about the power of seeing the lesson enacted, rather than reading about it or being told about it. The teachers valued that what they witnessed in the observation wasn’t a polished model, but a “piece in process” where the demonstration classroom teacher took risks to try new strategies.</p>";
	dc_trans[2] = "<p>Teacher: The first thing that struck me was the set up of the classroom – I love that kind of organizational stuff. So not that it had a lot to do with the math only, but I like the way she set up the class with her desk not the main focus anymore, and different areas of the room had different purposes – not just displaying purposes, but actually where she would actually teach or where the kids could go. The kids had lots of different places where they could go within the room to do work. So I really liked that as well. And she had them set up in groups. So those were some of the first things that I noticed. And then when she got to the teaching, it was interesting to see how the kids moved throughout that space and how she did as well. </p>";
	dc_trans[3] = "<p>Teacher: I think for me it’s been more of a heads up to attempt to do the three-part lesson as often as I can and when it fits. And for me one thing I had to do is set up reminders. So I have changed where I teach math, physically in the room, and that reminds me to do the activation piece and then I also change spots for when we consolidate. So just physically changing the room like that has given me just kind of a cue to, okay, yeah, I’m supposed to do this now. And I’m finding that I’m doing it more often and that it’s valuable to me.</p>";


	var ls_trans = new Array;
		ls_trans[0] = "Vice-principal: I think what I’m hearing you say, is that we really need to focus on the concept of volume is, area [of base] times height, right? And that seems really simple, but clearly it's not. So that could be our overall sort of theme. What does that look like in Grade 9?";
		ls_trans[1] = "Teacher: I don’t know what I have. [Laughter.]<br/>Researcher: Ok well, let’s help. The total number of tiles… <br/>Teacher: So I have 3, 6, 9, 10 … So I have my… my position number…<br/>Principal: You have 4 and 1… so you’ve got…<br/>Teacher: I know what it is – times 3 plus 1.<br/>Researcher: Beautiful!<br/>Teacher: There we go. [Laughter.]<br/>Researcher: Beautiful.";
		ls_trans[2] = "Teacher: You could have every group put their pattern up, and then, because you can move things around so nicely, they could group the ones that are actually the same pattern.<br/>Researcher: Sure.<br/>Teacher: So, like Cathy and Tara’s patterns turned out being the exact same concepts, and we could group them together…<br/>";
		ls_trans[3] = "Teacher 1: We’ve been fine tuning as we’ve gone through, you know we started with a 7/8 class, then we went to the 7 class, we made some changes between those two, and then um… we jumped to the 9 academic, and then we made some changes again to suit the 9 applieds. Some great things happened in the Grade 9 academic that came out, so we incorporated that into this next lesson… we’ve evolved.<br/>\
		Teacher 2: And we changed the ‘Minds On’… we tried to improve student understanding for the definition of volume, between the grade 7/8 and grade 7, so that was when we started to really make that change. <br/>\
		Researcher: The first ‘Minds On’ was the one you had the circumference…<br/>\
		(Chatter)<br/>\
		Teacher 3: So now its focused upon an aquarium with a fish…<br/>\
		Researcher: Prism displacement…<br/>\
		Teacher 4: Much better.<br/>\
		Teacher 5: We even fined tuned our grouping strategies too. We realized with a group of three, one student was always… it was easier to pull away from the activity, and groups of four we found the two weak students would go together and two strong students would go together, so with the group of four we had variants of two, now in Sandy’s class we’ll just have pairs.  <br/>";
		ls_trans[4] = "<strong>Activation</strong><br/>Teacher:First thing we’re going to look at is, we’ve got this fish here, how can we determine the volume of that fish? What can we do? Otis?<br/>\
		Student 1: Find the area of the base?<br/>\
		Teacher: Of the fish?<br/>\
		Student 1: Oh, of the fish?<br/>\
		Teacher: Ya… oh that’s how we could get the… to get the volume of the aquarium, how do we figure out the volume of this fish here? Cainen?<br/>\
		Student 2: Maybe if you found the volume of the water in the tank, you could put the fish in and see how much water it displaces. Then measure how much water with the fish in it and subtract that, or no, subtract the original from what’s ah, the one with the fish, and that would be how much your volume may be…<br/>\
		Teacher: What do you think of that? Does that sound reasonable?<br/>\
		Class: Yes.<br/>\
		Teacher: Alright, so, if we put the fish in, that’s the first step, what’s going to happen when I put the fish in?<br/>\
		Class: The water will go up.<br/>\
		Teacher: The water goes up. Did that happen? Mathemagic, look at that.<br/>\
		<strong>Development</strong><br/>Teacher:So I think we’re ready unless there are questions about any of the stations, we’re ready to get started.<br/>\
		---Class works in groups---<br/>\
		<strong>Consolidation</strong><br/>Teacher: Why in the world would we ever want to know the volume of this? Kay? I gave them this [heart]. Go ahead, find the volume. Why would you want to know that?";
		ls_trans[5] = "Researcher: So generally speaking, what we’ll do at this point in the debriefing is we’ll start with Heather... Heather will give us some general feedback on how she feels the lesson went, in terms of your own delivery of it and the response from students, that whole interaction piece and how you felt the flow was, things like that. Bits that you felt could have gone better maybe and why, or how you might change it. Just kind of your initial feedback. So we’ll go from there to the other teachers in the team and have you add on, just specifically to the lesson itself, so we won’t get into your observation foci at the time, so we’ll just do that kind of general feedback. And then after that loop’s done, then we’ll have a chance to go through each observer and look at targeted pieces.";
		ls_trans[6] = "<strong>Teacher Debrief</strong><br/>Teacher 1: It took some conscious decisions throughout that and, for example, just to kind of highlight one thing that happened… when I gave them the manipulatives, I was surprised that not very many people knew what I was asking, and I was like, \"Oh… obviously I wasn’t clear enough\", because they were… some were just using the tiles, they didn’t even look at the trapezoids, and I thought, \"It's a trapezoid... we just talked about trapezoid tables… obviously that’s not clear”, so I kind of had to go do some little interventions.<br/><strong>Participant Observer Debrief</strong><br/>Teacher 2: And I think Sandy did a good job of extending each center by, with prompting questions, because our timing was actually really quick because there was no off-task behaviour because you have two adults sitting right there beside them. But I noticed a bunch of times that Sandy came to ask the ‘what if?’ questions a number of times, and it kind of got kids, um, you know, thinking sideways instead of right on the task at hand.";
		ls_trans[7] = "Teacher: I guess this offered another chance to… and watching it by myself would have been fine, too, but having to talk about it and you pulling questions out the way that you [the researcher] did really made me think about it differently and probably better than I would have on my own, more deeply. So it almost added to that sense of the debrief. It gives you a little more time to digest when you really see it, I mean, that’s pretty neat. … so <em>that</em>, giving it time to digest the lesson, learn more about what worked and what didn’t work, getting the questions asked of me was good because I think that made me think about things… having other people looking and commenting, that also was good. Not enough time in that half hour or whatever after [meaning during the debrief]. So it’s adding on to that. And seeing the kids too, being able to do that, step back, and watching them – remembering what the lesson was about, and definitely talking about that – but watching them in action too, and just having that different perspective.";

	var loadPlayerURL = "";

function playerReady(thePlayer) {
	player = window.document[thePlayer.id];
	if (loadPlayerURL) {
			player.sendEvent('STOP');
			player.sendEvent('LOAD',loadPlayerURL);
			//alert('Player ID: ' + loadPlayerURL);
			loadPlayerURL = "";
	}
}

  function gid(name)
  {
    return document.getElementById(name);
  };

function createPlayer(pFile, elId,startAuto) {
		var flashvars = {
			file:pFile,
			autostart:startAuto,
			stretching: "exactfit"
		}

		var params = {
			allowfullscreen:"true",
			allowscriptaccess:"always"
		}

		var attributes = {
			id:elId,
			name:elId
		}

		swfobject.embedSWF("/media/player.swf", elId, "320", "240", "9.0.115", false, flashvars, params, attributes);
	}


$(function() {

	createPlayer("/digitalpapers/samples/ls/LS_Video_1.flv",'player1',"false");
	createPlayer("/digitalpapers/samples/dc/DC_Video_1.flv",'player2',"false");
	createPlayer("/digitalpapers/DPhowto.flv",'player3',"true");

	$("#tabs").tabs().addClass('ui-tabs-vertical ui-helper-clearfix');
	$("#tabs li").removeClass('ui-corner-top').addClass('ui-corner-left');

	function resetScrolls() {
		$('#dc_story').scrollTop(0); //= 0;
		$('#dc_transcript').scrollTop(0); //= 0;
		$('#ls_story').scrollTop(0); //= 0;
		$('#ls_transcript').scrollTop(0);
	}

// Demonstration Listeners
function resetLSimgs() {
		$('#ls1 >img').attr('src','/digitalpapers/images/ls_cycle_02.png');
		$('#ls12 >img').attr('src','/digitalpapers/images/ls_cycle_03.png');
		$('#ls2 >img').attr('src','/digitalpapers/images/ls_cycle_06.png');
		$('#ls23 >img').attr('src','/digitalpapers/images/ls_cycle_09.png');
		$('#ls3 >img').attr('src','/digitalpapers/images/ls_cycle_08.png');
		$('#ls34 >img').attr('src','/digitalpapers/images/ls_cycle_07.png');
		$('#ls4 >img').attr('src','/digitalpapers/images/ls_cycle_04.png');
		$('#ls41 >img').attr('src','/digitalpapers/images/ls_cycle_01.png');
		 resetScrolls();
}

function resetDCimgs() {
		$('#dc1 >img').attr('src','/digitalpapers/images/dc/ov/01.png');
		$('#dc2 >img').attr('src','/digitalpapers/images/dc/ov/02.png');
		$('#dc3 >img').attr('src','/digitalpapers/images/dc/ov/03.png');
		$('#dc4 >img').attr('src','/digitalpapers/images/dc/ov/04.png');
		 resetScrolls();
}


function setActive(pType,ident) {
	if (pType =='dc') {
		resetDCimgs();
		changeEl = '#dc'+ident+' >img';
		console.log(changeEl);
		$(changeEl).attr('src','/digitalpapers/images/dc/ov/'+ident+'_on.png');
	}
	if (pType =='ls') {
		resetLSimgs();
		changeEl = '#ls'+ident+' >img';
		$(changeEl).attr('src','/digitalpapers/images/ls/ov/01_on.png');
	}
}
	$('#tab-2').click(function() {
		$('#ov_ls').show();
		$('#lv_container').hide('fast');
	});

	$('#tab-3').click(function() {
		$('#ov_dc').show();
		$('#dc_container').hide('fast');
	});


// Lesson Study Listeners
	$('#dc1').click(function() {
		$('#dc_story').html(dc_story[0]);
		$('#dc_transcript').html(dc_trans[0]);
		resetDCimgs();
		$('#dc1 >img').attr('src','/digitalpapers/images/dc/ov/01_on.png');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/dc/DC_Video_1.flv');
		//player.sendEvent('PLAY');
	}
	);

	$('#dc2').click(function() {
		$('#dc_story').html(dc_story[1]);
		$('#dc_transcript').html(dc_trans[1]);
		resetDCimgs();
		$('#dc2 >img').attr('src','/digitalpapers/images/dc/ov/02_on.png');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/dc/DC_Video_2.flv');
		//player.sendEvent('PLAY');

	}
	);
	$('#dc3').click(function() {
		$('#dc_story').html(dc_story[2]);
		$('#dc_transcript').html(dc_trans[2]);
		resetDCimgs();
		$('#dc3 >img').attr('src','/digitalpapers/images/dc/ov/03_on.png');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/dc/DC_Video_3.flv');
		//player.sendEvent('PLAY');
	}
	);
	$('#dc4').click(function() {
		$('#dc_story').html(dc_story[3]);
		$('#dc_transcript').html(dc_trans[3]);
		resetDCimgs();
		$('#dc4	 >img').attr('src','/digitalpapers/images/dc/ov/04_on.png');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/dc/DC_Video_4.flv');
		//player.sendEvent('PLAY');
	}
	);

	$('.mapClick').click(function(what,where) {
		// handle clicks on any of the image maps {groan.. image maps}
		//console.log(what.target);

		// reset scroll type
		$('#dc_story').scrollTop(0); //= 0;
		$('#dc_transcript').scrollTop(0); //= 0;
		$('#ls_story').scrollTop(0); //= 0;
		$('#ls_transcript').scrollTop(0);

		rel = $(what.target).attr('rel');
		relArr = rel.split('|');
		page = relArr[0];
		subPage = relArr[1];
		hideEl = "#ov_" + page;
		showEl = "#"+page+"_container";
		trans = "#"+page+"_transcript";
		story = "#"+page+"_story";
		dcNum = parseFloat(subPage) + 1;
		$(hideEl).hide('slow');

		if (page == 'ls') {

			$(story).html(ls_story[where]);
			$(trans).html(ls_trans[where]);
			$('#lv_container').show('fast');
			resetLSimgs(); // reset clicked images

			switch (dcNum) {
				case 8:
					$('#ls41 >img').attr('src','/digitalpapers/images/ls_cycle_on_01.png');
					break;
				case 1:
					$('#ls1 >img').attr('src','/digitalpapers/images/ls_cycle_on_02.png');
					break;
				case 2:
					$('#ls12 >img').attr('src','/digitalpapers/images/ls_cycle_on_03.png');
					break;
				case 7:
					$('#ls4 >img').attr('src','/digitalpapers/images/ls_cycle_on_04.png');
					break;
				case 3:
					$('#ls2 >img').attr('src','/digitalpapers/images/ls_cycle_on_06.png');
					break;
				case 6:
					$('#ls34 >img').attr('src','/digitalpapers/images/ls_cycle_on_07.png');
					break;
				case 5:
					$('#ls3 >img').attr('src','/digitalpapers/images/ls_cycle_on_08.png');
					break;
				case 4:
					$('#ls23 >img').attr('src','/digitalpapers/images/ls_cycle_on_09.png');
					break;
		}

			$('#ls_story').html(ls_story[subPage]);
			$('#ls_transcript').html(ls_trans[subPage]);
			loadPlayerURL = ls_vid[subPage];
			//set active image
			//$().attr('src','/digitalpapers/images/dc/ov/03_on.png');

		}

		if (page == 'dc') {
			imgclick = "#"+page+dcNum+" >img";
			$(story).html(dc_story[where]);
			$(trans).html(dc_trans[where]);
			$('#dc_container').show('fast');
			$('#dc_story').html(dc_story[subPage]);
			$('#dc_transcript').html(dc_trans[subPage]);
			//set active image
			resetDCimgs(); // reset clicked images
			$(imgclick).attr('src','/digitalpapers/images/dc/ov/0'+dcNum+'_on.png');

			//We can't send events to the player yet because it only exists when display = true
			// so we set a global URL, which is loaded when the player fires its playerReady() event.


			loadPlayerURL = dc_vid[subPage];
		}

	//	$('#ls1 >img').attr('src','/digitalpapers/images/ls_cycle_on_02.png');
		//$('#ls1 >img').attr('src');

	});

// Lesson Study Listeners
	$('#ls1').click(function(self, el) {
		$('#ls_story').html(ls_story[0]);
		$('#ls_transcript').html(ls_trans[0]);
		resetLSimgs();
		$('#ls1 >img').attr('src','/digitalpapers/images/ls_cycle_on_02.png');
		//$('#ls1 >img').attr('src');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_1.flv');
		//player.sendEvent('PLAY');
	}
	);

	$('#ls12').click(function() {
		$('#ls_story').html(ls_story[1]);
		$('#ls_transcript').html(ls_trans[1]);
		resetLSimgs();
		$('#ls12 >img').attr('src','/digitalpapers/images/ls_cycle_on_03.png');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_2.flv');
		//player.sendEvent('PLAY');

	}
	);
	$('#ls2').click(function() {
		$('#ls_story').html(ls_story[2]);
		$('#ls_transcript').html(ls_trans[2]);
		resetLSimgs();
		$('#ls2 >img').attr('src','/digitalpapers/images/ls_cycle_on_06.png');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_3.flv');
		//player.sendEvent('PLAY');
	}
	);
	$('#ls23').click(function() {
		$('#ls_story').html(ls_story[3]);
		$('#ls_transcript').html(ls_trans[3]);
		resetLSimgs();
		$('#ls23 >img').attr('src','/digitalpapers/images/ls_cycle_on_09.png');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_4.flv');
		//player.sendEvent('PLAY');
	}
	);
	$('#ls3').click(function() {
		$('#ls_story').html(ls_story[4]);
		$('#ls_transcript').html(ls_trans[4]);
		resetLSimgs();
		$('#ls3 >img').attr('src','/digitalpapers/images/ls_cycle_on_08.png');
		player.sendEvent('STOP');
		player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_5.flv');
		//player.sendEvent('PLAY');
	}
	);

		$('#ls34').click(function() {
			$('#ls_story').html(ls_story[5]);
		    $('#ls_transcript').html(ls_trans[5]);
			resetLSimgs();
			$('#ls34 >img').attr('src','/digitalpapers/images/ls_cycle_on_07.png');
			player.sendEvent('STOP');
			player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_6.flv');
			//player.sendEvent('PLAY');
		}
		);

			$('#ls4').click(function() {
				$('#ls_story').html(ls_story[6]);
				$('#ls_transcript').html(ls_trans[6]);
				resetLSimgs();
				$('#ls4 >img').attr('src','/digitalpapers/images/ls_cycle_on_04.png');
				player.sendEvent('STOP');
				player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_7.flv');
				//player.sendEvent('PLAY');
			}
			);

				$('#ls41').click(function() {
					sIndex = 7;
					$('#ls_story').html(ls_story[sIndex]);
					$('#ls_transcript').html(ls_trans[sIndex]);
					resetLSimgs();
					$('#ls41 >img').attr('src','/digitalpapers/images/ls_cycle_on_01.png');
					player.sendEvent('STOP');
					player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_8.flv');
					//player.sendEvent('PLAY');
				}
				);

					$('#ls_img').click(function() {
						$('#ov_ls').hide('slow');
						$('#lv_container').show('fast');
						//player.sendEvent('STOP');
						//player.sendEvent('LOAD','/digitalpapers/samples/ls/LS_Video_1.flv');
						//player.sendEvent('PLAY');
					}
					);

					$('#dc_img').click(function() {
						$('#ov_dc').hide('slow');
						$('#dc_container').show('fast');
						player.sendEvent('STOP');
						player.sendEvent('LOAD','/digitalpapers/samples/dc/DC_Video_1.flv');
						//player.sendEvent('PLAY');
					}
					);



//
//							player.sendEvent('LOAD','/digitalpapers/samples/dc/DC_Video_1.flv');

	$('#ls_1').hover(function() {
		$(this).children().attr("src","/digitalpapers/images/ls_cycle_02.png");
			}, function() {
		$(this).attr("src","/digitalpapers/images/ls_cycle_01.png");
	});

	var lastImage = '';
	var lastWidth = 0;
	var lastHeight = 0;

		var poArr = new Array();
			poArr[0] = new Array();
			poArr[1] = new Array();
			poArr[2] = new Array();
			poArr[3] = new Array();
			poArr[4] = new Array();

			poArr[0]['w'] = 108;
			poArr[0]['h'] = 75;
			poArr[1]['w'] = 103;
			poArr[1]['h'] = 75;
			poArr[2]['w'] = 105;
			poArr[2]['h'] = 75;
			poArr[3]['w'] = 104;
			poArr[3]['h'] = 75;



		$('#lv_container').hide();
//	$('#ls_story').jScrollPane({scrollbarWidth:20, scrollbarMargin:10});

});