function doMenu() {
  return;

  jQuery('li.dropdown a').click(function(e) {
    e.preventDefault();
    
    if (jQuery(this).parent().children('ul:visible').length) {
      jQuery(this).parent().removeClass('dropdown');
      jQuery(this).addClass('dropdown');

      jQuery(this).parent().css({position: 'relative', height: (jQuery.rumors.menuh)+'px', width: (jQuery.rumors.menuw)+'px'});
      jQuery(this).parent().children('ul').hide();
    } else {
      jQuery(this).removeClass('dropdown');
      jQuery(this).parent().addClass('dropdown');

      var width=jQuery(this).parent().width();
      var height=jQuery(this).parent().height();
      jQuery.rumors.menuw=width;
      jQuery.rumors.menuh=height;
      var ulheight=jQuery(this).parent().children('ul').height();
      //alert(height + ulheight);
      jQuery(this).parent().css({zIndex: 10000, position: 'absolute', width: width+'px', height: (height + ulheight)+'px'});
      jQuery(this).parent().children('ul').show();
    }
  });

  return;

  jQuery('ul#mainmenu > li').each(function(i, val){
    c=jQuery(val).children('ul');
    if (c[0]) {
      //jQuery(c).css({paddingTop: '0', paddingBottom: '0'});
      //jQuery(c).find('li').css({width: '100%'});

      pos=parseInt(jQuery(val).children('a').position().top);
      h=parseInt(jQuery(c).height())-pos;

      //jQuery(c).css({visibility: 'hidden', position: 'absolute', left: parseInt(jQuery(this).position().left)+'px', width: 'auto'});
      jQuery(c).css({top: (jQuery(val).height()+pos)+'px', height: 'auto'});
    }

    jQuery(val).hover(function(e){
      jQuery(val).addClass('hover');
      //jQuery(this).children('a').css({color: '#ffffff', backgroundColor: '#4d4d4d'});
      p=jQuery(this).children('ul');
      
      if (p[0]) {
        //jQuery('div.post').find('embed').css({position: 'relative', zIndex: 1010});
        //jQuery('div.post').find('object').css({position: 'relative', zIndex: 1010});
        jQuery(p).css({visibility: 'visible', zIndex: 1000});
        jQuery(p).find('ul').css({visibility: 'visible'});
      }
    }, function(){
      jQuery(val).removeClass('hover');
      //jQuery(this).children('a').css({backgroundColor: 'transparent', color: '#ffffff'});
      p=jQuery(this).children('ul');
      
      if (p[0]) {
        jQuery(p).css({visibility: 'hidden'});
        jQuery(p).find('ul').css({visibility: 'hidden'});
      }
    });
  })
  
}

function doShareBox() {
  jQuery('#cformsform').append('<a href="#" id="presendbutton">Share</a>');
  
  jQuery('#cformsform').find('#presendbutton').click(function(e) {
    e.preventDefault();
    jQuery(this).css('visibility', 'hidden');
    jQuery('#cformsform').find('#sendbutton').css('visibility', 'visible');
    jQuery('#cformsform').find('fieldset').show();
  });
}

function doSocial() {
  jQuery('.sociallink').hover(function(){
    jQuery(this).animate({ right: '0px' },'fast');
  },function() {
    jQuery(this).animate({ right: '-5px' },'fast');
  });
}

function loadCameras(params) {
  if (jQuery("#cameras").length) {
    jQuery("#loadingcameras").show();
    jQuery("#cameras").html("&nbsp;");

    jQuery.get(
      RumorsAjax.ajaxurl+params,
      {
        action : 'rumors-get-cameras'
  //      postID : "postid"
  //      nonce : WPQAAjax.nonce
      },
      function( response ) {

        jQuery("#loadingcameras").hide();
        jQuery("#cameras").html(response);

        var owtscrollw=jQuery(".scrollable").width();
        var owtitemsh=0;
        
        jQuery(".scrollable .row").each(function() {
          if (jQuery(this).height()>owtitemsh) {
            owtitemsh=jQuery(this).height();
          }
        });

        owtitemsh+=20;

        jQuery(".scrollable").css('height',owtitemsh+'px');
        jQuery(".scrollable").find(".row").css('width',owtscrollw+'px');
        jQuery(".scrollable").scrollable({ vertical: false, next: '.scrollnext', prev: '.scrollprev' }).navigator();

        jQuery("#cameras .boxinfo").css({zIndex: 10000});
        
      }
    );
  }
}

function doCameras() {
  loadCameras("");
  
  jQuery("#cameras .owt-list-tabs a").live("click", function(){ 
    loadCameras(jQuery(this).attr("href"));
  
    return false;
  });
}

function doAuxMenu() {
  if (jQuery('#additionalmenu')[0] && jQuery('#dropdown')[0]) {
    jQuery('#additionalmenu').css({ width: jQuery('#dropdown').width()+30 });
    jQuery('a#dropdown').overlay({
      left: jQuery('#dropdown').position().left+jQuery('#dropdown').parent().parent().parent().position().left,
      top: jQuery('#dropdown').position().top+jQuery('#dropdown').parent().parent().parent().position().top,
      fixed: false,
      closeOnClick: true
    });
  }
}

jQuery(document).ready(function() {
  jQuery.rumors={};
  jQuery.rumors.menuh=0;

  doMenu();
  
  doShareBox();
  
  doCameras();

  doAuxMenu();

//  doSocial();

  Cufon.now();
});


