////  jump menu
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

$(document).ready(function(){
    
    $('a#promoShow').click(function() { 
        $("div#promo_popup").fadeIn("slow");    
    }); 
    $('a#promo_popupHide').click(function() {  
        $("div#promo_popup").fadeOut("slow");    
    }); 
    
    $('a#how_it_works').click(function() { 
         
        $("div.how_it_works div#console").load("/index.php?page=how_it_works");    
        $("div.how_it_works").fadeIn("slow");    
        
    }); 
    
    $('a#popupHide').click(function() {  
        $("div#popup").fadeOut("slow");    
    });
    
    // DEMO PROFILE
    $("a#demo").fancybox({
        'overlayColor':    '#000',
        'overlayOpacity':  0.6,
        'width'            : 1100,
        'height'            : '90%',
        'showCloseButton'    : true,
        'autoScale'        : true,
        'transitionIn'        : 'none',
        'transitionOut'        : 'none',
        'type'            : 'iframe'
    });

    

    // member left nav highlight function    
    var pathname = window.location.href;
    //alert(pathname);
    $('a[href="'+pathname+'"]').addClass("on");  
    
    // search
    $('span#search_hover').hover(function(){

        $('img#search_arrow').animate({opacity: "hide", left:"-375"}, "slow");

        $('input#search_input').delay('400').animate({opacity: "show", left:"-75"}, "slow");

    });
    
    
    // Memeber logged in 
    
    $('a#video_url_demo').fancybox({
        'transitionIn'    :    'elastic',
        'transitionOut'    :    'elastic',        
        'overlayColor':    '#000',
        'overlayOpacity':  0.6,
        'width'            : 700,
        'height'            : 580,
        'showCloseButton'    : true,
        'autoScale'        : true,
        'transitionIn'        : 'none',
        'transitionOut'        : 'none',
        'type'            : 'iframe'
    });
    
  
     
});

// header search text replacement
function textReplacement(input){var originalvalue = input.val();input.focus( function(){if( $.trim(input.val()) == originalvalue ){ input.val(''); }});input.blur( function(){if( $.trim(input.val()) == '' ){ input.val(originalvalue); }});}$(document).ready( function(){textReplacement($('.searchInput'));});


