var $ = jQuery
$(document).ready(function(){
    var cat = $('.categories')
    var arc = $('#archives')
    var rec = $('#recentposts')
    var mos = $('#mostcommented')

    function hide_all(){
	cat.hide()
	arc.hide()
	rec.hide()
	mos.hide()
    }

    $('#bcategories').click(function(){
        if(cat.is(":hidden")){
            hide_all();cat.show()
        } else {
            cat.hide()
	}})
    $('#barchives').click(function(){
        if(arc.is(":hidden")){
            hide_all();arc.show()
        } else {
            arc.hide()
	}})
    $('#brecentposts').click(function(){
        if(rec.is(":hidden")){
            hide_all();rec.show()
        } else {
            rec.hide()
	}})
    $('#bmostcommented').click(function(){
        if(mos.is(":hidden")){
            hide_all();mos.show()
        } else {
            mos.hide()
	}})

    var img = new Image()
    img.src = "/wp-content/themes/thesoundsofvtech/images/media_icons/rss_over.png"
    var imgtwo = new Image()
    imgtwo.src = "/wp-content/themes/thesoundsofvtech/images/media_icons/facebook_over.png"
    var imgthree = new Image()
    imgthree.src = "/wp-content/themes/thesoundsofvtech/images/media_icons/twitter_over.png"

    $('#rss-icon').hover(function(){this.src="/wp-content/themes/thesoundsofvtech/images/media_icons/rss_over.png"},function(){this.src="/wp-content/themes/thesoundsofvtech/images/media_icons/rss.png"})
    $('#fb-icon').hover(function(){this.src="/wp-content/themes/thesoundsofvtech/images/media_icons/facebook_over.png"},function(){this.src="/wp-content/themes/thesoundsofvtech/images/media_icons/facebook.png"})
    $('#t-icon').hover(function(){this.src="/wp-content/themes/thesoundsofvtech/images/media_icons/twitter_over.png"},function(){this.src="/wp-content/themes/thesoundsofvtech/images/media_icons/twitter.png"})

});


