
// constructor function //called from /includes/js/HU-GLOBAL/functions.js
function initSite() {	
	jQuery("body").removeClass("noJs").addClass("activeJs");
	//jQuery('.innerlabel', '.search').inputLabel();
	if (jQuery('#persona').length != 0) {initPersona();}
	if (jQuery('.listing', '#content').length != 0) { jQuery('.faqanswer').hide(); }
	//if (jQuery('#virtualworld').length != 0) { helloVirtualWorld(jQuery('#virtualworld')); }
	if (jQuery('#educationlist').length != 0) {
		jQuery("#educationlist ul").opleidingen({ numItems: 5 });
		initEducationButton();
	}
	slideShow();
}

	// Flash Helper //OPLEIDINGEN NAVIGATOR - BACH/FlashHomepage
//	function navigatorStatus(status) {
//		switch (status) {
//      case "open":
//        jQuery("#hu-navigator-find").width(800); break;
//      case "click":
//        clearTimeout(jQuery('#hu-navigator-find').data("timer")); break;
//      default:
//        jQuery("#hu-navigator-find").width(40); break;
//    }
//}

//function navigatorStatus(status, extraParameter) {
//    if (status == "open") {
//        //extraParameter = extraParameter - 85;
//        // Extra paremeter contains needed width
//        if (extraParameter) {
//            if (extraParameter == "349") 
//            {
//                extraParameter = extraParameter - 85;
//            }

//            document.getElementById("hu-navigator-find").style.width = parseInt(extraParameter) + "px";
//        } else {
//            document.getElementById("hu-navigator-find").style.width = "800px";
//        }
//    } else if (status == "close") {
//        // Closed
//        document.getElementById("hu-navigator-find").style.width = "40px";
//    } else if (status == "click") {
//        clearTimeout(jQuery('#hu-navigator-find').data("timer"));
//    }
//}

	
	// Flash Helper // THEMA NAVIGATOR
	function themaStatus(status) {
		//log("themaStatus called");
		if (status == "open") {
			jQuery("#hu-navigator-discover").css({ "width": "538px" });
			//jQuery("#hu-navigator-discover").css({ "left": "446px" });
		} else {
			// Closed
			//setTimeout(function(){ jQuery("#hu-navigator-discover").css({ "width": "40px" }) }, 1000);
			jQuery("#hu-navigator-discover").css({ "width": "40px" });
			//jQuery("#hu-navigator-discover").css({ "left": "446px" });
		}
	}
	
	// Flash Helper //this function is called when Flash is ready loading (thema.swf & navigator.swf)
	function flashElementReady(whichElement) {
        if (jQuery("body").hasClass('T00')) {        
			switch(whichElement) {
				case 'opleidingNavigator':
					//log('Opleidingen Flash element is locked & loaded');
					var flash = jQuery('#flash-navigator-find'), container = jQuery('#hu-navigator-find');
          flash[0].open();
          //container.data("timer", setTimeout(function() { flash[0].close(); }, 4000));
					break;
				case 'themaNavigator':
					//log('Thema navigator Flash element is locked & loaded');
					jQuery('#flash-navigator-discover')[0].open();                
					setTimeout(function(){ jQuery('#flash-navigator-discover')[0].close() }, 2000);
					break;
			}
		}
    }
    

	//declare Google Analytics events
	//_trackEvent(category, action, opt_label, opt_value)
	jQuery("#hu-navigator-find").click(function(){
		if (typeof _gaq != 'undefined') {
			_gaq.push(['_trackEvent','Flash elements','navigator opened','Opleiding Navigator']);
		}
		else {
			log("no tracking code found");
		}
	});
	
	jQuery("#hu-navigator-discover").click(function(){
		if (typeof _gaq != 'undefined') {
			_gaq.push(['_trackEvent','Flash elements','navigator opened','Thema Navigator']);
		}
		else {
			log("no tracking code found");
		}
	});

	// init virtual world window
	function helloVirtualWorld(e) {
		var target = e.attr('href');
		jQuery(e).attr('href', 'javascript:void(0)').click(
			function() {
				window.open(target, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=800, height=600")
			}
		)
	}
	
	function initEducationButton() {
		
	}

	(function($) {
		$.fn.opleidingen = function(options) {

        
			var defaultSettings = {
				numItems: 3
				, cycle: {
					fx: 'turnDown'
					, timeout: 5000
					, pause: 1
				}
				, flashId: "flash-navigator-find"
			};

			if (options && options.cycle) {
				options.cycle = $.extend({}, defaultSettings.cycle, options.cycle);
			}

			settings = $.extend({}, defaultSettings, options);

			var numChildren = this.children().length;

			for (var i = 0; i < settings.numItems - 1 && i < numChildren - 1; i++) {
				this.filter(":last").clone().insertAfter(this.filter(":last"));
			}

			var divider = Math.floor(numChildren / settings.numItems);
			var rand = Math.floor(Math.random() * numChildren);
			var cycle = settings.cycle;

			jQuery(this.selector).each(function(i) {
				//cycle.startingSlide = ((i * divider) + rand) % numChildren;
				cycle.startingSlide = ((i) + 1);
				jQuery(this).cycle(cycle);
			});

			return this;

		}
	})(jQuery);

    //init weblog listing in persona
    function initPersona() {

        if (jQuery('.flickrthumbs', '#persona').length > 0) {
            var target = jQuery('.flickrthumbs', '#persona');

            target.addClass('clearfix');
            target.children().find('a').attr('href', 'javascript:void(0)');
            target.children().find('a>img').css({ width: '60px' }).end().find('div').hide();

            target.children().find('p.comments').after(
				jQuery(document.createElement('a'))
					.addClass('closebutton')
					.attr('href', 'javascript:void(0)')
					.append(jQuery(document.createTextNode('sluiten')))
			);
            target.children().find('a.closebutton').hide();

            target.children().toggle(
				function() {

				    jQuery(this).siblings().hide();
				    var all = jQuery(this).parent().find(">li");
				    var position = "0";
				    if (all.index(this) == 1) { position = "72px"; }
				    if (all.index(this) == 2) { position = "144px"; }
				    if (all.index(this) == 3) { position = "216px"; }

				    jQuery(this).css({ // make <li> wider 
				        width: "285px"
				    }).children(':first').css({ // give margin to <a> 
				        marginLeft: position
				    }).animate({ // animate <a> to full width
				        width: "285px",
				        marginLeft: "0px"
				    }).children(':first').animate({ // animate <img> to full width
				        width: "285px"
				    });

				    jQuery(this).children('div.reactions').show();
				    jQuery(this).children('a.closebutton').show();

				},
				function() {

				    var all = jQuery(this).parent().find(">li");
				    var position = "0";
				    if (all.index(this) == 1) { position = "72px"; }
				    if (all.index(this) == 2) { position = "144px"; }
				    if (all.index(this) == 3) { position = "216px"; }

				    jQuery(this).css({ // make <li> original width
				        width: "60px"
				    }).children(':first').animate({ // animate <a> to original width
				        width: "60px",
				        marginLeft: position
				    }).children(':first').animate({	// animate <img> to original width
				        width: "60px"
				    }, "1500",
						function() {
						    jQuery(this).parent().css({ margin: "0" });
						    jQuery(this).parent().parent().siblings().show();
						}
					);

					jQuery(this).children('div.reactions').hide();
				    jQuery(this).children('a.closebutton').hide();
				}
			);

        }


        if (jQuery('.youtubethumbs', '#persona').length > 0) {
            var target = jQuery('.youtubethumbs', '#persona');

            target.addClass('clearfix');
            target.children().find('a').attr('href', 'javascript:void(0)');
            target.children().find('a>img').css({ width: '60px' }).end().find('div').hide();
            target.children().find('div.movie').css({position:'absolute',zIndex:'1',top:'0',left:'0'}).hide();

            target.children().find('p.comments').after(
				jQuery(document.createElement('a'))
					.addClass('closebutton')
					.attr('href', 'javascript:void(0)')
					.append(jQuery(document.createTextNode('sluiten')))
			);
            target.children().find('a.closebutton').hide();


            target.children().toggle(
				function() {

				    jQuery(this).siblings().hide();

				    var all = jQuery(this).parent().find(">li");
				    var position = "0";
				    if (all.index(this) == 1) { position = "72px" }
				    if (all.index(this) == 2) { position = "144px" }
				    if (all.index(this) == 3) { position = "216px" }


				    jQuery(this).css({ // make <li> wider 
				        width: "285px"
				    }).children(':first').css({ // give margin to <a> 
				        marginLeft: position
				    }).animate({ // animate <a> to full width and fixed height (equal to movie)
				        width: "285px",
				        height: "231px",
				        marginLeft: "0px"
				    }).children(':first').animate({ // animate <img> to full width and fixed height (equal to movie)
				        width: "285px",
				        height: "231px"
				    }, "1500",
				        function() {
				            jQuery(this).parent().parent().children('div.movie').show();
				        }
				    );

				    jQuery(this).children('div.reactions').show();
				    jQuery(this).children('a.closebutton').show();


				},
				function() {

				    var all = jQuery(this).parent().find(">li");
				    var position = "0";
				    if (all.index(this) == 1) { position = "72px"; }
				    if (all.index(this) == 2) { position = "144px"; }
				    if (all.index(this) == 3) { position = "216px"; }


				    jQuery(this).css({ // make <li> original width
				        width: "60px"
				    }).children(':first').animate({ // animate <a> to original width and auto height
				        width: "60px",
				        height: "45px",
				        marginLeft: position
				    }).children(':first').animate({	// animate <img> to original width and auto height
				        width: "60px",
				        height: "45px"
				    }, "1500",
						function() {
						    jQuery(this).parent().css({ margin: "0" });
						    jQuery(this).parent().parent().siblings().show();
						}
					);

				    jQuery(this).children('div.reactions').hide();
				    jQuery(this).children('a.closebutton').hide();
				    jQuery(this).children('div.movie').hide();
				}
			);


        }

        if (jQuery('.weblog','#persona').length > 0) {
            var target = jQuery(".weblog",'#persona');
            jQuery("ol", target).slideUp();
            jQuery("div a", target).attr('href', 'javascript:void(0)')
            jQuery("div", target).click(function() {
	            jQuery(this).nextAll('ol').toggleClass("expanded");
	            jQuery(this).nextAll('ol').slideToggle();
            })
        }
	}

	function firstVisit() 
	{
		
		var cookievalue = readCookie('visitedHUBachelor');
		if (cookievalue == null) {
			createCookie('visitedHUBachelor', ("true"));
			return true;
		}

		function createCookie(name, value, days) 
		{
			if (days) 
			{
				var date = new Date();
				date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
				var expires = "; expires=" + date.toGMTString();
			}
			else 
			{
				var expires = "";
			}
			
			document.cookie = name + "=" + value + expires + "; path=/";
		}

		function readCookie(name) 
		{
			var nameEQ = name + "=";
			var ca = document.cookie.split(';');
			for (var i = 0; i < ca.length; i++) 
			{
				var c = ca[i];
				while (c.charAt(0) == ' ') c = c.substring(1, c.length);
				if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
			}
			return null;
		}

		function eraseCookie(name) 
		{
			createCookie(name, "", -1);
		}

	}
	
	//slideshow on homepage middle block;
	
	function slideShow() {

    var slideshow = jQuery("#slideShow");
    
		if(slideshow.length==0){
			return false;
		}
		
		var canvasWidth = 0;
    var slides = jQuery(".slide", slideshow);
    var canvas = jQuery(".canvas", slideshow);
		var slideTime = 4;
		var WaitTime = 15;
		var timeUnit = 310;
		var slideTimer = null;
		var position = 0;
    
    slides.each(function() { canvasWidth += jQuery(this).width(); });
    canvas.width(canvasWidth);
			
		jQuery("#ctrMorelink a:not(:first)").hide();

		slides.each(function(i){
			jQuery(".directaccess ul").append("<li><a href='#'>"+i+"</a></li>");
		});

		var tempPos = jQuery(".directaccess li:first",slideshow).position().left;
		
		jQuery(".currentslide",slideshow).css("left",tempPos-20).css("margin-left",20);
			
		jQuery(".directaccess a").bind("click",function(e){
			stop(e);
			position = jQuery(".directaccess a").index(jQuery(this));

			canvas.animate({"margin-left":-position*310},timeUnit);				    
			jQuery(".currentslide",slideshow).animate({"margin-left":(position+1)*20},timeUnit);
			
			updateMorelink(position)
			clearInterval(slideTimer);
			slideTimer = setInterval(function(){nextSlide()},WaitTime * 3 * timeUnit)
		});			

		canvas
      .bind("mouseover",function(e){
        clearInterval(slideTimer);
      })
      .bind("mouseout",function(e){
        slideTimer = setInterval(function(){nextSlide()},WaitTime * 3 * timeUnit)
      });
		
    var margin = 0;
		function nextSlide(from){
			if (margin - 310 <= -canvasWidth) {
				position = 0;
        margin = 0;
				canvas.animate({"margin-left":margin},slideTime * timeUnit)				    
				jQuery(".currentslide",slideshow).animate({"margin-left":20},timeUnit);
			} else {
				position = position + 1;
        margin -= 310;
				canvas.animate({"margin-left":margin},slideTime * timeUnit)				    
				jQuery(".currentslide",slideshow).animate({"margin-left":"+=20"},timeUnit);
			}
			updateMorelink(position)
		}

		function updateMorelink(position) {		
			jQuery("#ctrMorelink a").hide();
			jQuery("#ctrMorelink a:eq(" + position + ")").show();
		}

		slideTimer = setInterval(function(){nextSlide()},WaitTime * timeUnit)
	}
 

(function($,undef) {
  $(function() {

    function initthumb(e, lightboxtype) {
      //show popup
      var trigger = $(e).find("span.video")
        .append($(document.createElement('img')).attr('src', '/includes/img/HU-GLOBAL/playbut.png').addClass('play'))
        .mouseenter(function() { $(this).find(".play").attr('src', '/includes/img/HU-GLOBAL/playbutover.png'); })
        .mouseleave(function() { $(this).find(".play").attr('src', '/includes/img/HU-GLOBAL/playbut.png'); });

      if (lightboxtype == "plugin") {
        var target = $(trigger).siblings(':last').attr('id');
        target = "#" + target;
        $(trigger).colorbox({ width: "50%", inline: true, href: target });
      }
      else {
        $(trigger).click(function() {
          //check if swfobject embedding has taken place 
          if ($(this).parent().find('object').length == 0) { return false }
          //get the currentflashID to pass to flash video player
          currentflashID = $(this).siblings(':last').find('object').attr('id');
          $(this).siblings(":last")
            .css({
              display: 'block',
              opacity: 0.7
            })
            .animate({
              width: 380,
              height: 310,
              top: 0,
              left: 20,
              padding: "15px 10px",
              opacity: 1
            }, { duration: 400 });
        });
      }

      //add close button and set behaviour
      if (lightboxtype == "plugin") { return false }
      $(e).children(":last").append(
        $(document.createElement('a'))
          .addClass('closebutton')
          .attr('href', 'javascript:void(0)')
          .click(function() {
            $(this).parent()
              .animate({
                width: 0,
                height: 0,
                top: 125,
                left: 220,
                marginTop: 15,
                opacity: 0.1,
                padding: 0
              }, {
                duration: 600,
                easing: 'easeOutExpo',
                complete: function() { 
                  document[currentflashID].pauseMovie();
                  $(this).hide();
                }
              });
          })
      );
    }

    $("#sidebar ul.thumbs").children().each(
      function() { initthumb(this, "plugin"); }
    );
  });
  
  $(function() {
    var details = $(".detail-personas > div");
    $(".bachelor-persona:not(.bachelor-persona-focused)").each(function(i) {
      if ($("img", this).length === 0) {
        $(this).add(details[i]).remove();
      }
    });
    $(".bachelor-personas-container").bachelorPersonas({ details: ".detail-personas > div", buttons: ".bachelor-persona-button" });
  });
  
  $.fn.bachelorPersonas = function(options) {
    options = $.extend({
      details: "",
      buttons: ""
    }, options);
    
    options.details = $(options.details);     
    options.buttons = $(options.buttons);     
    
    var createHandler = function(container, glows, shadows, silhouets, photos, focus) {
      var minleft = -1, mintop = -1, maxright = 0, maxbottom = 0,
          components = glows.add(shadows).add(silhouets).add(photos),
          positions = [ ], sorted = false, current = null;
      
      var ensureSort = function() {
        if (!sorted) {
          positions.sort(function(a, b) { return a.position - b.position; });
          sorted = true;
        }
      };
      
      var handler = {
        init: function(index) {
          var t = $(this), 
              left = parseInt(t.css("left"), 10) || parseInt(t.get(0).style.left, 10) || 0, top = parseInt(t.css("top"), 10) || parseInt(t.get(0).style.top, 10) || 0,
              imgs = $("img", this).css({ left: left, top: top }).data("title", this.title),
              width = imgs.width() || 0, height = imgs.height() || 0;
          
          positions.push({ index: index, position: Math.round(left + width / 2) });
          
          if (minleft === -1 || left < minleft) { minleft = left; }
          if (mintop === -1 || top < mintop) { mintop = top; }
          if (left + width > maxright) { maxright = left + width; }
          if (top + height > maxbottom) { maxbottom = top + height; }
          
          if (imgs.length >= 1) { glows.append(imgs.get(0)); }
          if (imgs.length >= 2) { shadows.append(imgs.get(1)); }
          if (imgs.length >= 3) { silhouets.append(imgs.get(2)); }
          if (imgs.length >= 4) { photos.append(imgs.get(3)); }
        },
        buttonclick: function(e) {
          var isbutton = this.nodeName && $(this).is("button"), isnext = $(this).hasClass("bachelor-persona-button-next"), initial = e.initial,
              newindex = isbutton ? (isnext ? handler.getnext() : handler.getprev()) : (e.index || 0),
              nextcomponent = components.children(":nth-child(" + (newindex + 1) + ")"),
              showdetails = options.details.eq(newindex),
              hidedetails = options.details.not(showdetails).filter(":visible");
          
          var afterfoldout = function() {
            var w = nextcomponent.first().data("fold.width"),
                titletext = $.trim(nextcomponent.first().data("title")),
                title = titletext ? $("<div/>").text(titletext) : $();
            
            if (initial || !$.support.opacity) {
              title.show();
            }
            else {
              title.fadeIn(200);
            }
            
            focus
              .children("div").remove().end()
              .append(title);
            
            title
              .css({ left: (w - title.width()) / 2 });
          };
          var afterfoldin = function() {
            var w = nextcomponent.first().data("fold.width"),
                nextfocus = nextcomponent
                  .not(glows.children())
                  .clone(true)
                  .css({ top: 0, left: w / 2, width: 0 })
                  .data({ "fold.left": 0, "fold.width": w });                  
            
            
            focus
              .css({ left: (container.width() - w) / 2 })
              .children().remove().end()
              .append(nextfocus);
            
            nextfocus
              .fold({ foldin: false, duration: initial ? 0 : 250, callback: afterfoldout })

          };
          
          if ($.support.opacity && !initial) {
            hidedetails.fadeOut(250, "swing", $.one(function() {
              showdetails.fadeIn(250, "swing");
              options.details.not(showdetails).hide();
            }));
          }
          else {
            hidedetails.hide();
            showdetails.show();
          }
          
          components
            .children()
            .not(nextcomponent.fold({ foldin: true, duration: initial ? 0 : 250 }))
            .fold({ foldin: false, duration: initial ? 0 : 250 });
                      
          focus
            .children("div").remove().end()
            .children().fold({ foldin: true, duration: initial ? 0 : 250, callback: afterfoldin });
        },
        getminmax: function() {
          return { 
            minleft: minleft,
            mintop: mintop,
            maxright: maxright,
            maxbottom: maxbottom
          };
        },
        getnext: function() {
          ensureSort();
          current = current === null || current >= positions.length - 1 ? 0 : current + 1;
          return positions[current].index;
        },
        getprev: function() {
          ensureSort();
          current = current === null || current === 0 ? positions.length - 1 : current - 1;
          return positions[current].index;
        },
        getrandom: function() {
          var newindex;
          do {
            newindex = Math.round(Math.random() * (positions.length) - 0.5)
            if (newindex < 0) { newindex = 0; }
            else if (newindex >= positions.length) { newindex = positions.length - 1; }
          } while (newindex === current);
          return positions[current = newindex].index;
        },
        components: function() { 
          return components;
        }
      };
      return handler;
    };
    
    return this.each(function() {
      var glows, shadows, silhouets, photos, focus, handler, minmax, pausing = false, stopped = false;
      
      var container = $(".bachelor-personas", this)
        .prepend(photos = $("<div class=\"bachelor-personas-components bachelor-personas-photos\"/>"))
        .prepend(silhouets = $("<div class=\"bachelor-personas-components bachelor-personas-silhouets\"/>"))
        .prepend(shadows = $("<div class=\"bachelor-personas-components bachelor-personas-shadows\"/>"))
        .prepend(glows = $("<div class=\"bachelor-personas-components bachelor-personas-glows\"/>"));
      
      focus = $(".bachelor-persona-focused", this).addClass("bachelor-personas-components");
      handler = createHandler(container, glows, shadows, silhouets, photos, focus);
      
      $(".bachelor-persona", this)
        .not(focus)
        .each(handler.init)
        .remove();
      
      minmax = handler.getminmax();
      handler.components().find("img")
        .css({ 
          left: function(i, left) { return parseInt(left, 10) - minmax.minleft; },
          top: function(i, top) { return parseInt(top, 10) - minmax.mintop - 20; }
        });
      container.css({
        left: minmax.minleft,
        top: minmax.mintop,
        width: minmax.maxright - minmax.minleft,
        height: minmax.maxbottom - minmax.mintop - 20
      });
      
      options.buttons.click(function() { 
        stopped = true;
        handler.buttonclick.call(this, Array.prototype.slice.call(arguments, 0));
      });
      
      options.details.hover(function(e) {
        pausing = e.type === "mouseenter";        
      });
      
      var autoplay = function() {
        if (!stopped) {
          if (!pausing) {
            handler.buttonclick({ index: handler.getrandom(), initial: false });
          }
          window.setTimeout(autoplay, 5000);
        }
      };
      
      options.details.hide();
      $(window).load(function() {
        handler.buttonclick({ index: handler.getrandom(), initial: true });
        window.setTimeout(autoplay, 5000);
      });
    });
  };
  
  $.fn.fold = function(options) {
    options = $.extend({
      foldin: true, //true to collapse, false to expand
      duration: 250,
      easing: "swing",
      callback: null
    }, options);     
    
    var callback = (function(count) {
      return function() {
        if (count++ === 0) {
          if ($.isFunction(options.callback)) {
            options.callback.call(this, Array.prototype.slice.call(arguments, 0));
          }
        }
      };
    }(0));
    
    if (!this.length) {
      callback.call(this);
      return this;
    }
    
    return this.each(function() {
      var t = $(this), left = t.data("fold.left"), width = t.data("fold.width");
      if (!left && left !== 0) {
        t.data("fold.left", left = parseInt(t.css("left"), 10) || parseInt(t.get(0).style.left, 10) || 0);
      }
      if (!width && width !== 0) {
        t.data("fold.width", width = t.width() || 0);
      }
      
      if (options.foldin) {
        if (options.duration === 0) {
          t.css({ left: left + width / 2, width: 0 });
          callback.call(this);
        }
        else {
          t.animate({ left: left + width / 2, width: 0 }, options.duration, options.easing, callback);
        }
      }
      else {
        if (options.duration === 0) {
          t.css({ left: left, width: width });
          callback.call(this);
        }
        else {
          t.animate({ left: left, width: width }, options.duration, options.easing, callback);
        }
      }
    });
  };
  
  $.one = function(fn) {
    var called = 0, extra = Array.prototype.slice.call(arguments, 1);
    return function() {
      if (!called++) {
        fn.apply(this, Array.prototype.concat.apply([ ], arguments).concat(extra));
      }
    };
  };
  
}(jQuery));

// Video LightBox
function CloseVideoLightBox(nr) {
    jQuery("#VideoLightBox").hide();
    jQuery("#VideoLightBox_Fade").hide();

    jQuery("#videoTitle" + nr).hide();
    jQuery("#videoText" + nr).hide();
}

function OpenVideoLightBox(nr, videoUrl) {
    if (videoUrl != '') {
        jQuery("#VideoLightBox").show();
        jQuery("#VideoLightBox_Fade").show();

        jQuery("#videoTitle" + nr).show();
        jQuery("#videoText" + nr).show();

        var flashvars = {};
        flashvars.canvasWidth = '278';
        flashvars.canvasHeight = '235';
        flashvars.videoUrl = videoUrl;
        flashvars.firstFrame = '5';
        flashvars.autoplay = 'false';

        var attributes = {};
        attributes.wmode = 'transparent';
        attributes.scale = 'scale';

        swfobject.embedSWF('/includes/Flash/HU-GLOBAL/EviVideoPlayer1.3.swf', 'flash-videoplayer', '278', '235', '9.0.0', false, flashvars, attributes);
    };
}

  



	
	
	
	
	
	

