$(document).ready(init);
function init()
{
	$('.winblogrollcat').children('ul').hide();
	$('.winblogrollcat .trigger').click(function(evt){
		$(this.parentNode).children('ul').slideToggle('fast');
	});
   $('.carousel ul').cycle({'prev':'.previous','next':'.next','play':'.play','pause':'.pause'});

$('.share_mod').click(function() {
    e.stopPropagation();
})

var prButton = $('#pr_box_button');
var prText = $('#pr_text');
prButton.click(function(){
	if(prText.is(':visible'))
		{
		prText.fadeTo('fast',0,function(){
			prText.slideUp('fast');
			prButton.css('background-image','url(http://www.blogsmithmedia.com/www.engadget.com/media/show_full_pr_button.jpg)');
		});
		}
	else
		{
		prText.fadeTo('fast',0).slideDown('fast',function(){
			prText.fadeTo('fast',1);
			prButton.css('background-image','url(http://www.blogsmithmedia.com/www.engadget.com/media/hide_full_pr_button.jpg)');
		});
		}
});

$(function(){
    var isItOn = 0;
    $('li.share a.trigger').click(function() {
        var thisIndex = $('li.share a.trigger').index(this);
        if($('.share_mod:eq('+thisIndex+')').is(":hidden"))
            {
            $('.share_mod').eq(thisIndex).show();
            $('.share_close').eq(thisIndex).show();
            $('.share').eq(thisIndex).css("background","#ddd");
            }
        else
            {
            $('.share_mod').eq(thisIndex).hide();
            $('.share_close').eq(thisIndex).hide();
            $('.share').eq(thisIndex).css("background","#fff");
            }
        return false;
        preventDefault();
    });
    $(document).click(function(){  
        $('.share_close').hide();
        $('.share_mod').hide();
        $('.share').css("background","#fff");
        isItOn = 0;
    });
}); 
}