PGX.js.push('http://www.tiypg.com/_pgx/shared/lightview/2.5.2/lightview.js');

var _class=Class.create({initialize:function(){typeof Lightview!="undefined"&&this.loaded();document.observe("lightview:loaded",this.loaded.bind(this))},loaded:function(){PGL.lightview=this.lightview},lightview:function(a){a=Object.extend({href:"#_lvajaxelement"},Object.clone(a));a.options=Object.extend({width:400,height:300},Object.clone(a.options));if(a.youtube){a.options.width=640;a.options.height=385;a.href="#_lvajaxelement";a.rel="set[inline]";if(typeof a.options.closeButton!="undefined"&&a.options.closeButton==
false)a.rel="inline"}if(a.href=="#_lvajaxelement"){var b=new Element("div",{id:"_lvajaxelement",style:"width:"+a.options.width+"px; height:"+a.options.height+"px; overflow:hidden;"});$("lightviewError").insert(b);a.youtube&&b.pgx("shared.youtube",{video:a.youtube,autoplay:true})}document.observe("lightview:hidden",function(){document.stopObserving("lightview:hidden");$("_lvajaxelement")&&$("_lvajaxelement").destroy()});Lightview.show(a);return a.href=="#_lvajaxelement"?b:Lightview[Lightview._contentPosition]}});
new _class;Element.addMethods({lightview:function(a,b){b=Object.clone(b);b.href="#"+$(a).identify();if(!b.rel){b.rel="set[inline]";if(b.options&&typeof b.options.closeButton!="undefined"&&b.options.closeButton==false)b.rel="inline"}return PGL.lightview(b)}});

PGX.js.push('/_templates/root/scripts/root.js');

function lightviewMedia (element) {
	sSrc = $(element).down(1).next(3).src;
	Lightview.show({
    href: sSrc,
    rel: 'image',
    options: {
      autosize: true,
      topclose: true
      
    }
  });
}

function closeYoutubeMovie() {		
	$('youtubeContainer').setStyle({'display':'none'});
	$('youtubeContainer').innerHTML = '';
}


function youtubeMovie(video) {
	aParams = {};
	aParams.source = '/_templates/youtube/player.html'
	aParams.video = video;
	
	$('youtubeContainer').pgx('core.html', aParams);
	
	// Center movie
	vp = document.viewport.getDimensions();
	sc = document.viewport.getScrollOffsets();
	
	oleft = (((vp['width'] - 600) / 2) + sc['left']);
	otop = (((vp['height'] - 500) / 2) + sc['top']);
	
	$('youtubeContainer').style.left = oleft + 'px';
	$('youtubeContainer').style.top = otop + 'px';
	$('youtubeContainer').setStyle({'display':'block'});
}


swfobject.switchOffAutoHideShow();
swfobject.registerObject("_f4c6b3d9", "9.0.0");

swfobject.switchOffAutoHideShow();
swfobject.registerObject("_71ce680e", "9.0.0");

swfobject.switchOffAutoHideShow();
swfobject.registerObject("_6d2e458b", "9.0.0");

swfobject.switchOffAutoHideShow();
swfobject.registerObject("_3a5185e9", "9.0.0");

swfobject.switchOffAutoHideShow();
swfobject.registerObject("_41851690", "9.0.0");

swfobject.switchOffAutoHideShow();
swfobject.registerObject("_908f558e", "9.0.0");

swfobject.switchOffAutoHideShow();
swfobject.registerObject("_49fa1544", "9.0.0");

swfobject.switchOffAutoHideShow();
swfobject.registerObject("_5799842f", "9.0.0");

swfobject.switchOffAutoHideShow();
swfobject.registerObject("_8b07aa28", "9.0.0");

PGX.js.push('/_templates/root/scripts/right.js');

function playVideo(flv) {	
	Lightview.show({
		href: PGX.path + '/_templates/root/flash/videoPlayer.swf?flvsource='+ PGX.prefix + PGX.path +'/'+ flv,
		rel: 'flash',
		options: {
			width: 491, 
			height: 428, 
			closeButton:false
		}
	});
}

function hidePlayer() {
	Lightview.hide();
}

_gaq.push(['_setAccount', 'UA-6282971-1'], ['_trackPageview']);

var addthis_config = addthis_config || {}; addthis_config.data_ga_property = 'UA-6282971-1'; addthis_config.data_ga_social = true;

PGX.js.push('/js/a1acb8aecc16aa6c12bafae9c25005961c10928b.js'); PGX.js.push('http://www.tiypg.com/_pgx/shared/lightview/2.5.2/scripts/lightview.js'); 
PGX.css.push('http://www.tiypg.com/_pgx/shared/lightview/2.5.2/styles/lightview.css'); PGX.css.push('/_templates/root/styles/root.css'); PGX.css.push('/_templates/menu/styles/menutop.css'); PGX.css.push('/_templates/search/styles/searchtop.css'); PGX.css.push('/_templates/menu/styles/menu.css'); PGX.css.push('/_templates/menu/styles/submenu.css'); PGX.css.push('/_templates/menu/styles/subsubmenu.css'); PGX.css.push('/_templates/footer/styles/footer.css'); 
PGX.track({"shared.lightview":[],"play.site":[],"play.site.config":[],"play.site.tdk":{"p":"13561","c":"13556","r":"13551"},"play.site.content":{"p":"13561","c":"13556","r":"13551"},"play.site.menu":{"p":"13561","c":"13556","r":"13551"},"shared.google.analytics":{"p":"13561","c":"13556","r":"13551"}});

