<!--


function initFrontpage() {
		initFrontSplash();
		initFrontpageButtons('300');
		initVideoFront();
		initPng();
		initTinySlide();
}

function initUmitVideo() {
	UmitVideoHotspot();
}

function initPresseVideoer() {
	PresseVideoHotspot();
	PresseVideoer();	
	videoToolTip();
}


function mwAreaToolTip(orig,trgt) {

		var o = $("#" + orig);
		var o_left = o.offset().left;
		var o_top = o.offset().top;
//		var o_margin = o.css('margin-left') + o.css('margin-right') + o.css('margin-top') + o.css('margin-bottom');
		var o_height = o.height();
		var o_width = o.width();
		var content = $(this).attr("title");  
	  var t = $("#" + trgt);
  	t.html(content);
		t.css("position","absolute");
	  t.css("top",(o_top + 5) + "px");
	  t.css("left",((o_left + 148) + "px"));
	  t.css("display","block");
}

function mwAreaToolTipexit(trgt) {
		var t = $("#" + trgt);
		t.css("display","none");
}

function mwTitleToolTip(orig,trgt) {


$('#' + orig + " img").live('mouseover mouseout', function(event) {
		var o = $(this);
		var o_left = o.offset().left;
		var o_top = o.offset().top;
//		var o_margin = o.css('margin-left') + o.css('margin-right') + o.css('margin-top') + o.css('margin-bottom');
		var o_height = o.height();
		var o_width = o.width();
		var content = $(this).attr("title");  
	  var t = $("#" + trgt);
  if (event.type == 'mouseover') {
  	t.html(content);
		t.css("position","absolute");
	  t.css("top",(o_top - 70) + "px");
	  t.css("left",((o_left + ((o_width / 2) - 100) + "px")));
	  t.css("display","block");
  } else {
		t.css("display","none");
  }
});

}


function videoToolTip() {


$('#video_triggers img').live('mouseover mouseout', function(event) {
		var p = $(this);
		var o_left = p.offset().left;
		var o_top = p.offset().top;
		var o_height = p.height();
		var o_width = p.width();
		var t_tmp = $(this).attr("id");	  
	  var t = $("#" + t_tmp);
  if (event.type == 'mouseover') {
			t.css("position","absolute");
	  	t.css("top",(o_top - 70) + "px");
	  	t.css("left",((o_left + ((o_width / 2) - 100) + "px")));
	  	t.css("display","block");
  } else {
			t.css("display","none");
  }
});

}




function initNormalpage() {
			initBackLink();
			initTinySlide();
			initPng();
}

function initPng() {

  $(document).ready(function() {
		$(document).pngFix(); 
  });

	


}

function initBackLink() {
	var browsersize = $(window).height();
	var documentsize = $(document).height();


	
	if (documentsize > (browsersize + 100)) {
		$('.link_top').css('display','block');
	} 


	$('.link_top').click(function(){
		$('html, body').animate({scrollTop:0}, 'slow');
	});


}

function initFrontpageButtons(speedInput) {

	var speed = speedInput;

		var arr = [ "1", "2", "3", "4" ];

    jQuery.each(arr, function() {

		  $('#frontpage_btn_' + this).mouseenter(function() {
				$(this).find('img').stop(true, true).fadeOut();
				$(this).find('img').fadeIn(speed, function() {
		      });	});

			$('#frontpage_btn_' + this).mouseleave(function() {
				$(this).find('img').stop(true, true).fadeIn();
				$(this).find('img').fadeOut(speed, function() {
				});	});
      
      });
      
}

function initTinySlide() {

	jQuery.each(jQuery.browser, function(i, val) {
      $("<div>" + i + " : <span>" + val + "</span>")
                .appendTo('#browserinfo');
    });

	$('.link_slide').click(function(){

		$('.target_slide').slideToggle('slow', function() {
  	});		

	}); 
}

function ShowPicture(id,Source) {
	if (Source=="1"){
		if (document.layers) document.layers[''+id+''].visibility = "show"
		else if (document.all) document.all[''+id+''].style.visibility = "visible"
		else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
	} 
		else if (Source=="0"){
			if (document.layers) document.layers[''+id+''].visibility = "hide"
			else if (document.all) document.all[''+id+''].style.visibility = "hidden"
			else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
	}
}

	function initFrontSplash() {
/*
		var flashvars = {};

		var params = {
			menu								: 'false',
			quality 						:	'high',
			allowScriptAccess		:	'always',
			allowFullScreen			:	'false',
			wmode								:	'transparent',
			scale								:	'noscale'
			id									:	'splash'
		};
				
		var attributes = {
			name	:	'splash',
			id		:	'splash'
		};
		swfobject.embedSWF("photoStack3d_new.swf", "splash_control", "642", "316", "9.0.0","expressInstall.swf", flashvars, params, attributes);
*/
		function cancelFunction() {
		        alert("Express Install was cancelled");
		}
		if (swfobject.hasFlashPlayerVersion("6")) {
		        var fn = function() {
		                var att = {
		                	data				:	"photoStack3d_new.swf",
		                	width				:	"642",
		                	height			:	"316"
		                };
		                var par = {
											menu								: 'false',
											quality 						:	'high',
											allowScriptAccess		:	'always',
											allowFullScreen			:	'false',
											wmode								:	'transparent',
											scale								:	'noscale'		                	
		                };
		                var id = "splash_control";
		                swfobject.createSWF(att, par, id);
		        };
		        
		}
		else {
		        var fn = function() {
		                var att = {
		                	data				:	"expressInstall.swf",
		                	width				:	"642",
		                	height			:	"316"
		                };
		                var par = {
		                	
		                };
		                var id = "splash_control";
		                swfobject.showExpressInstall(att, par, id, cancelFunction);
		        }
		}
		swfobject.addDomLoadEvent(fn);
	}



function initVideoFront() {

	$(function() {
		$(".videoLink a[rel]").overlay({expose: {color: '#666', loadSpeed: 100, opacity: 0.5}, effect: 'apple', top: '17%'});
		$(".videoLink img[rel]").overlay({expose: {color: '#666', loadSpeed: 100, opacity: 0.5}, effect: 'apple', top: '17%'});		
	});

	var flashvars1 = {
		'bufferlength': '5',
		'skin': 'flash/players/jwplayer/skins/modieus/modieus_new.swf',
		'autostart': 'true',
		'file': '/uploads/videoer/handen_pa_hjertet.flv'
	};
	
	
	var params1 = {
		'quality': 'high',
		'allowScriptAccess': 'always',
		'allowFullScreen': 'true',
		'wmode': 'transparent',
		'scale': 'noscale',
		'id': 'frontflv',
		'bgcolor': '#FFFFFF'
	};
	
	var attributes1 = {
		'id': 'frontflv',
		'name': 'frontflv'
	};
	
	swfobject.embedSWF("flash/players/jwplayer/player-viral.swf", "frontvideo", "640", "500", "9.0.0","expressInstall.swf", flashvars1, params1, attributes1);

	$('.close').click(function() {
		var myVideoPlayer = document.getElementById('frontflv');
		myVideoPlayer.sendEvent('STOP');
	});

}

function PresseVideoHotspot() {

	var hotspotvars = {
		'bufferlength': '5',
		'image': 'uploads/videoer/video_thumb_large_haanden.jpg',
		'skin': 'flash/players/jwplayer/skins/modieus/modieus_new.swf',
		'autostart': 'false',
		'file': '/uploads/videoer/handen_pa_hjertet.flv'
	};
	
	
	var hotspotparams = {
		'quality': 'high',
		'allowScriptAccess': 'always',
		'allowFullScreen': 'true',
		'wmode': 'transparent',
		'scale': 'noscale',
		'id': 'hotspotflv',
		'bgcolor': '#FFFFFF'
	};
	
	var hotspotattr = {
		'id': 'hotspotflv',
		'name': 'hotspotflv'
	};
	
	swfobject.embedSWF("flash/players/jwplayer/player-viral.swf", "hotspot", "280", "190", "9.0.0","expressInstall.swf", hotspotvars, hotspotparams, hotspotattr);
}

function UmitVideoHotspot() {

	var hotspotvars = {
		'bufferlength': '5',
		'image': 'uploads/videoer/video_thumb_large_umit.jpg',
		'skin': 'flash/players/jwplayer/skins/modieus/modieus_new.swf',
		'autostart': 'false',
		'file': '/uploads/videoer/umit.flv'
	};
	
	
	var hotspotparams = {
		'quality': 'high',
		'allowScriptAccess': 'always',
		'allowFullScreen': 'true',
		'wmode': 'transparent',
		'scale': 'noscale',
		'id': 'hotspotflv',
		'bgcolor': '#FFFFFF'
	};
	
	var hotspotattr = {
		'id': 'hotspotflv',
		'name': 'hotspotflv'
	};
	
	swfobject.embedSWF("flash/players/jwplayer/player-viral.swf", "hotspot", "434", "326", "9.0.0","expressInstall.swf", hotspotvars, hotspotparams, hotspotattr);
}

function PresseVideoer() {

	$(function() {
		$("#video_triggers img[rel]").overlay({expose: {color: '#666', loadSpeed: 100, opacity: 0.5}, effect: 'apple', top: '17%'});
	});


	var videos = new Array();
		videos[0] = "frivillig_paa_tvaers";
		videos[1] = "handen_pa_hjertet";
		videos[2] = "haslev";
		videos[3] = "paa_tvaers_gennem_landet";
		videos[4] = "samarbejdspartnere";
		videos[5] = "team_albertslund_mb";	
		videos[6] = "ikke_uden_glaeden";
		videos[7] = "umit";
		//videos[8] = "enis";
		//videos[9] = "onder";

	for (i=0;i<videos.length;i++) {
		var count = i + 1;

		var flashlistvars = window['variables_' + count];
		flashlistvars  = { 
			'bufferlength': '5',
			'skin': 'flash/players/jwplayer/skins/modieus/modieus_new.swf',
			'autostart': 'true',
			'showdownload': 'true',
			'file': '/uploads/videoer/' + videos[i] + '.flv'
		};
		
		flashlistparams = window['params_' + count];
		var flashlistparams = {
			'quality': 'high',
			'allowScriptAccess': 'always',
			'allowFullScreen': 'true',
			'wmode': 'transparent',
			'scale': 'noscale',
			'bgcolor': '#FFFFFF',
			'id': 'p_video' + count
			};
			
		var flashlistattr = window['attributes_' + count];
		flashlistattr = {
			'id': 'p_video' + count,
			'name': 'p_video' + count
		};
		
		swfobject.embedSWF('flash/players/jwplayer/player-viral.swf', 'video' + count, "640", "500", "9.0.0","expressInstall.swf", flashlistvars, flashlistparams, flashlistattr);

	}

		$('#VidCont1 > .close').click(function() {
				var p_video1 = swfobject.getObjectById('p_video1');
				p_video1.sendEvent('STOP');
		});
		
		$('#VidCont2 > .close').click(function() {
				var p_video2 = swfobject.getObjectById('p_video2');
				p_video2.sendEvent('STOP');
		});		

		$('#VidCont3 > .close').click(function() {
				var p_video3 = swfobject.getObjectById('p_video3');
				p_video3.sendEvent('STOP');
		});
		
		$('#VidCont4 > .close').click(function() {
				var p_video4 = swfobject.getObjectById('p_video4');
				p_video4.sendEvent('STOP');
		});
		
		$('#VidCont5 > .close').click(function() {
				var p_video5 = swfobject.getObjectById('p_video5');
				p_video5.sendEvent('STOP');
		});
		
		$('#VidCont6 > .close').click(function() {
				var p_video6 = swfobject.getObjectById('p_video6');
				p_video6.sendEvent('STOP');
		});				

		$('#VidCont7 > .close').click(function() {
				var p_video7 = swfobject.getObjectById('p_video7');
				p_video7.sendEvent('STOP');
		});		

		$('#VidCont8 > .close').click(function() {
				var p_video8 = swfobject.getObjectById('p_video8');
				p_video8.sendEvent('STOP');
		});	
/*
		$('#VidCont9 > .close').click(function() {
				var p_video9 = swfobject.getObjectById('p_video9');
				p_video9.sendEvent('STOP');
		});	

		$('#VidCont10 > .close').click(function() {
				var p_video10 = swfobject.getObjectById('p_video10');
				p_video10.sendEvent('STOP');
		});
                */
}

function toggleSlide(obj) {
 e = document.getElementById(obj);
 if (e.style.display == 'none')
 {
  new Effect.Opacity(obj, { from: 0.0, to: 1.0, duration: 1.3 });
	Effect.BlindDown(obj, { duration: 1.5 });
 }
 else if (e.style.overflow == 'visible')
 {
	Effect.BlindUp(obj, { duration: 1.5 });
  new Effect.Opacity(obj, { from: 1.0, to: 0.0, duration: 1.3 });
 }
}

/**
	* Playlist example here for JWplayer
  var so = new SWFObject('flash/players/jwplayer/player-viral.swf','flv','640','587','9','#ffffff');
	so.addVariable("skin", playerskin); 
	so.addVariable('overstretch','false');
  so.addParam('allowfullscreen','true');
  so.addParam('allowscriptaccess','always');
  so.addParam('wmode','opaque');
  so.addVariable('autostart','true');
  so.addVariable('mute','false');
  so.addVariable('file','flvplaylist.php');
  so.addVariable('duration','true');
  so.addVariable('playlist','bottom');
  so.addVariable('playlistsize', '200');
  so.addVariable('showdownload','true');
	so.addVariable('shuffle', 'false');
	so.addVariable('repeat', 'list');
	so.addVariable('thumbsinplaylist', 'true');
  so.write('play_video1');
 */


//-->
