/* flowplayer's defaults */
var flowconf = {
  header: { /*** videos on the start page***/

	onBeforeLoad: function(){
		var container = $( this.getParent() );
		var version = flashembed.getVersion();
		var supported = flashembed.isSupported([9, 115]);
		if(!supported) {
			container.html(
				'<img src="/frame/getflash.jpg" style="margin:15px;" /><br />' +
				( site_lang == "hu_HU" ?
					(version == "0,0" ? 'A videó megtekintéséhez Flashplayer szükséges' : 'A meglévő Flashplayer verziója (' + version + ') túl régi') +
					'.<br /><br />A legújabb változat letöltése!'
				  :
					(version == "0,0" ? 'You need Flashplayer to watch this video' : 'Your version of Flashplayer (' + version + ') is outdated') +
					'.<br /><br />Download the latest version!' )
			).css({'font-size':'12px', 'color':'#111111' }).click(function(){
				window.location = "http://get.adobe.com/flashplayer/";
			});
			return false;
		}
		return true;
	},
    onBeforeBegin: function(){
      try {
        $( this.getParent() ).next('div.video_content').fadeOut();
      } catch(e) {
        this.getStatus();
      }
      $('div.video_content:visible').fadeOut();
      this.getControls().show();
    },

    onMouseOver: function(){
      this.getControls().animate({'top': '206px'});
    },

    onMouseOut: function(){
      this.getControls().animate({'top': '236px'});
    },

    clip: {
      scaling: 'fit',
      autoPlay: true,
      autoBuffering: true,
      onFinish: function() {
        var li = $( 'li.li_' + this.getParent().getAttribute('rel') );
        var link = li.children('a');
	$( this.getParent() ).next('div.video_content').css({
	    'margin-top': '-236px',
	    'background-color': li.css('background-color')
	}).fadeIn().children('a.show_more').attr('href', link.attr('href'));
        this.unload();
      }

    },

    play: {
	label: (site_lang == "hu_HU" ? 'Lejátszás' : 'Play'),
	replayLabel: (site_lang == "hu_HU" ? 'Újra lejátszás' : 'Play again')
    },

    plugins: {
      controls: {
        all:false,
        scrubber:true,
        play: true,
        height: 30,
        autoHide: 'always',
        hideDelay: 1000,
        backgroundColor: 'transparent',
        backgroundGradient: 'none',

	tooltips: {
          buttons: true,
          pause: (site_lang == "hu_HU" ? 'Szünet' : 'Pause'),
          play: (site_lang == "hu_HU" ? 'Lejátszás' : 'Play')
        }

      }
    }
  },

  other: {
	onBeforeLoad: function(){
		var container = $( this.getParent() );
		var version = flashembed.getVersion();
		var supported = flashembed.isSupported([9, 115]);
		if(!supported) {
			container.html(
				'<img src="/frame/getflash.jpg" style="margin:15px;" /><br />' +
				( site_lang == "hu_HU" ?
					(version == "0,0" ? 'A videó megtekintéséhez Flashplayer szükséges' : 'A meglévő Flashplayer verziója (' + version + ') túl régi') +
					'.<br /><br />A legújabb változat letöltése!'
				  :
					(version == "0,0" ? 'You need Flashplayer to watch this video' : 'Your version of Flashplayer (' + version + ') is outdated') +
					'.<br /><br />Download the latest version!' )
			).css({'font-size':'12px', 'color':'#111111' }).click(function(){
				window.location = "http://get.adobe.com/flashplayer/";
			});
			return false;
		}
		return true;
	},

    clip: {
      scaling: 'fit',
      autoPlay: true,
      autoBuffering: true
    },

    play: {
	label: (site_lang == "hu_HU" ? 'Lejátszás' : 'Play'),
	replayLabel: (site_lang == "hu_HU" ? 'Újra lejátszás' : 'Play again')
    },

    plugins: {
      controls: {
        all:false,
        scrubber:true,
        play: true,
        height: 30,
        autoHide: 'always',
        hideDelay: 1000,
        backgroundColor: 'transparent',
        backgroundGradient: 'none',

	tooltips: {
          buttons: true,
          pause: (site_lang == "hu_HU" ? 'Szünet' : 'Pause'),
          play: (site_lang == "hu_HU" ? 'Lejátszás' : 'Play')
        }

      }
    }
  }
}

