Basically I want to change the image src to add -active.png on hover.
So fb.png would become fb-active.png on hover, and fb.png when it\'s not hovering.
This can be done without javascript, with only css. Like this:
Give different classes for icons like fb for facebook,tw or twitter and so on.
HTML:
CSS:
.img-social{display:inline-block;height:20px;width:20px;}
.fb{background:url("images/fb.png");}
.fb:hover{background:url("images/fb-active.png");}
.tw{background:url("images/twitter.png");}
.tw:hover{background:url("images/twitter-active.png");}
.ln{background:url("images/linkedin.png");}
.ln:hover{background:url("images/linkedin-active.png");}
.wp{background:url("images/wordpress.png");}
.wp:hover{background:url("images/wordpress-active.png");}
You can use sprite for efficiency.