
jQuery(document).ready(function() {
  jQuery('#video').hide();
  
  jQuery('#dd').click(function() {
    jQuery('body').removeClass("bc");
    jQuery('#h').removeClass("bc");
    jQuery('body').animate({ backgroundColor: "#000"}, 'slow',function() {
     
      jQuery('.hi').fadeOut('fast');
      jQuery('.ub').fadeOut('fast');
      jQuery('#menu').fadeOut('fast');
      jQuery('#nav').fadeOut('fast');
      jQuery('#vidsp').fadeIn('fast');
      jQuery('.vis').fadeIn('fast');
      jQuery('.visb').fadeIn('fast');
      jQuery('#closevid').fadeIn('fast');
      jQuery('body').css({"backgroundColor":"#000"});
      jQuery('#mpc').fadeOut("slow", function() {
        jQuery('#video').fadeIn("fast",function() {
        });
      });
    });
  });
  
  jQuery('.sl').hover(function() {
    jQuery(this).animate({"height":350},"slow");
  },
  function() {
    jQuery(this).animate({"height":75},"slow");
  });
  
  jQuery('.gt').click(function() {
    jQuery('.gt').removeClass('gton');
    jQuery(this).addClass('gton');
    var efw=jQuery(this).attr('md');
    jQuery('.fss').hide();
    jQuery('#'+efw).fadeIn();
  });
  
  jQuery('#mpc').after('<div id="nav" class="nav">').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 5000,
        pager:  '#nav',
        pause:  1
  });


  jQuery('.vidlinks').click(function() {
    jQuery('.vis').removeClass('vidlinkson');
    jQuery(this).addClass('vidlinkson');
    var which =jQuery(this).attr('id');
    //alert("/video/"+which);
    //var replaceclip = {'url':'/videos/'+which, 'autoplay':true};
    jQuery.vzx.play('/videos/'+which);
  });
  
  jQuery('#closevid').click(function() {
    jQuery('#video').html('');
    /*jQuery('#video').fadeOut("slow", function() {
      jQuery('#mpc').fadeIn("fast",function() {
        jQuery('body').animate({ "backgroundColor": "#fff" }, 'slow',function() {
          jQuery('body').addClass("bc");
          jQuery('#h').addClass("bc");
          jQuery('.hi').fadeIn('fast');
          jQuery('.ub').fadeIn('fast');
          jQuery('#menu').fadeIn('fast');
          jQuery('#nav').fadeIn('fast');
          jQuery('#closevid').fadeOut('fast');
          jQuery('.vis').fadeOut('fast');
          jQuery('.visb').fadeOut('fast');
          jQuery('#vidsp').fadeOut('fast');
        });
      });
    });*/
    document.location=document.location;
  });
  

});



