/* ********************************************************************************************************************
**
**	Name: 			qpr
**	
**	Version: 		0.1																			
** 	Author: 		Edd Hannay
**
******************************************************************************************************************** */

var qprVideo = Class.create();

qprVideo.prototype = {	
   	initialize: function() {
		Event.observe(window, "load", this.onLoadWindow.bindAsEventListener(this));
	},
	
	/* ****************************************************************************************************************** */
	
	onLoadWindow: function() {
    Shadowbox.init();
	}
}

var qprTour = Class.create();

qprTour.prototype = {	
   	initialize: function() {
		Event.observe(window, "load", this.onLoadWindow.bindAsEventListener(this));
	},
	
	/* ****************************************************************************************************************** */
	
	onLoadWindow: function() {
		$$('.tour #content ol li').each(function(el){
			el.addClassName('closed');
		}.bind(this));

		$$('.tour #content ol li span.date').each(function(el){
			Event.observe(el, "click", this.onClickHeading.bindAsEventListener(this)); 			
		}.bind(this));
		
	},
	
	onClickHeading: function(ev){
		var h3 = Event.findElement(ev, "span");
		h3.up('li').toggleClassName('closed');
		return false;
	}
	
}

function open_pop(aPage, aTarget, w, h, do_scroll)
{
	/*var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;*/
	
	var winl = 0;
	var wint = 0;
	
	var theDate = new Date();
	var timestamp = theDate.getTime();
	
	aTarget += timestamp;
	
	child = window.open(aPage,aTarget,'status=no,scrollbars=' +((do_scroll=='true' || do_scroll == true)? 'yes' : 'no')+ ',width='+w+',height='+h +',left = '+winl +',top = ' +wint);

	child.focus();
}