    /*
function follow_us(){
    if(typeof SHARETHIS != "undefined"){
        // Attach Share This button
        var object = SHARETHIS.addEntry(
            {title:'share', summary:'isentu out to spread the word...'},
            {popup:true,button:false});
        object.attachButton($("#share")[0]);
        $("#share").attr("href","javascript:void(0);")
    } else {
        $('#share').parent('span').remove();
    }
}
*/
var featureDetailHeight = [];
$().ready(function(){
//    resize();
    
    var categoryNav = location.pathname;
    categoryNav = categoryNav.substr(0,categoryNav.lastIndexOf("/")) + "/index.html";
    categoryNav = $("#nav a[href='"+categoryNav+"']").parent().addClass("current");
    while(categoryNav.length > 0 && categoryNav.parent().length > 0 && categoryNav.parent().attr('id') != 'nav')
	categoryNav = categoryNav.parent().parent('li').addClass('current');

    /*
    $("#nav li").not(".current").hover(
        function(){
            $(this).find("ul:first").slideDown();
        }, function(){
            $(this).find("ul:first").stop(true,true).slideUp();
        }
    ).not(".current").find("ul:first").hide();
    */
   $(".feature").hover(function(){
	   var height = featureDetailHeight[$(".feature").index($(this))];
       $(this).find(".details").css({
    	   height:height+"px",
    	   padding:"10px",
    	   "border-top":"1px dashed #999"
       })
   }, function(){
       $(this).find(".details").css({
    	   height:"0px",
    	   padding:"0px 10px",
    	   "border-top":"0px"
       })
   }).each(function(){
	   featureDetailHeight.push($(this).find(".details").height());
   }).trigger("mouseout");
})

//$(window).bind('resize',resize);

function resize(){
	// Min: 750; Max: 1110
    var total = $(this).width();
    var wrapper = Math.min(total-40, 1110);
    if(wrapper < 750)
        wrapper = 750;
    var content = wrapper - 210;
    var num = 4; // can be set to 5
    if(content < 900)
        num = 4;
    if(content < 720)
        num = 3
    if(content < 540)
        num = 2;
    var padding = content / num ;
    padding = padding - 170;
    padding = padding / 2;
    padding = Math.floor(padding)

    $("#wrapper_in").width(wrapper);
    $("section#content").width(content);
    /*
    if(content < 800)
        $("#screenshot-wrapper").css({"width":"640px"});
    else
        $("#screenshot-wrapper").css({"width":"800px"});
    $(".category_button").css({"padding-left":padding+"px","padding-right":padding+"px"});
    */
}

