/*
* Image Swap and HTML5 audio effect
* Created: Dec 4th, 2011 by DynamicDrive.com. This notice must stay intact for usage
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/
function evteffect(selectorstr, fxoptions){
var $=jQuery
var $targets=$(selectorstr)
//define list of audio file extensions and their associated audio types. Add to it if your specified audio file isn't on this list:
var html5_audiotypes={"mp3": "audio/mpeg", "mp4": "audio/mp4", "ogg": "audio/ogg", "wav": "audio/wav"}
function setupeffect($anchor, wrapper, filetype, evttype, files){
if (filetype=="image"){
wrapper=new Image()
wrapper.src=files
$anchor.data('originalimage', $anchor.attr('src')) //remember original image src
$anchor.bind(evttype, function(){
$anchor.attr('src', files)
})
$anchor.bind((evttype=="mouseover")? "mouseout" : "mouseup", function(){
$anchor.attr('src', $anchor.data('originalimage'))
})
}
else if (filetype=="audio"){
var wrapper=document.createElement('audio')
if (wrapper.canPlayType){
for (var x=0; xx
Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586