<?php

class Intense_Fullscreen_Video extends Intense_Shortcode {

  function __construct() {
    parent::__construct();

    global $intense_visions_options;

    $this->title = __( 'Fullscreen Video', 'intense' );
    $this->description = __( 'Use the fullscreen video shortcode to show off your favorite videos from YouTube or Vimeo that will fill the entire browser window. Fullscreen videos can also be used as backgrounds for pages.', 'intense' );
    $this->category = __( 'Media', 'intense' );
    $this->show_preview = false;    
  }

  function shortcode( $atts, $content = null ) {
    global $intense_visions_options;
    extract( shortcode_atts( $this->get_shortcode_defaults( null, $atts ), $atts ) );

    intense_add_script( 'okvideo' );

    return
      "<script>
      jQuery(function($){
          $.okvideo({
            video: '$video',
            disablekeyControl:  " . ( $key_control ? 0 : 1 ) . ",
            captions: " . $captions . ",
            loop: " . $loop . ",
            hd: " . $highdef . ",
            annotations: " . $annotations . ",
            volume: " . $volume . "
          });
      });
    </script>";
  }  
}
