
function select_pestana(filter_link, view_url, pestana_slug){
    $.post(view_url, {}, function(data){  
	location.hash = pestana_slug;
        //$('#masinfo').html(data);             
	$('#product_info').html(data);
        
        return false;
    });
}


function select_subcategoria(filter_link, view_url){        
        $.post(view_url, {}, function(data){        
        $('#masinfo').html(data);
        var resultado = document.getElementById('masinfo').offsetHeight;
        
        var result2 = document.getElementById('product_bar').offsetHeight;
        
        document.getElementById('product_bar').style.height = resultado +'px';
        return false;
    });
}


function sleep(milliseconds) {
  var start = new Date().getTime();
  for (var i = 0; i < 1e7; i++) {
    if ((new Date().getTime() - start) > milliseconds){
      break;
    }
  }
}

function select_image(filter_link, view_url){
    $.post(view_url, {}, function(data){        
        $('#home').html(data);
        //sleep(1000);
        return false;
    });
}

function mylink(value){
    var enero = $('#enero').attr('class');
    if (enero == 'active'){
        location.href = '/descargar/';
    }
    var oferta = $('#oferta').attr('class');
    if (oferta == 'active'){
        location.href = '/foro/thread/47';
    }

}