/* 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 />' +

					(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!'
				  
			).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: 'Lejátszás',
	replayLabel: 'Újra lejátszás'
    },

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

	tooltips: {
          buttons: true,
          pause: 'Szünet',
          play: 'Lejátszás'
        }

      }
    }
  },

  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 />' +
					(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!'

			).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: 'Lejátszás',
	replayLabel: 'Újra lejátszás'
    },

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

	tooltips: {
          buttons: true,
          pause: 'Szünet',
          play: 'Lejátszás'
        }

      }
    }
  }
}
