jQuery.fn.opacity=function(a){if(a>1)a=1;if(a<0)a=0;if($.browser.msie){a=parseFloat(a)*100;this.css("filter","alpha(opacity="+a+")")}else{this.css("opacity",a);this.css("-moz-opacity",a)}return this};jQuery.fn.zIndex=function(a){if(a!=null){this.css("z-index",a);return this}else return this.css("z-index")};jQuery.fn.swap=function(a){a=jQuery(a)[0];var b=this[0],c=b.cloneNode(true),d=a.cloneNode(true);b.parentNode.replaceChild(d,b);a.parentNode.replaceChild(c,a);this[0]=c;return this.pushStack(this)};
jQuery.fn.preloadImages=function(){for(var a=0;a<arguments.length;a++)$("<img>").attr("src",arguments[a])};jQuery.fn.setEnterHandler=function(a){this.keypress(function(b){if(b.which&&b.which==13||b.keyCode&&b.keyCode==13){typeof a=="function"&&a();return false}else return true})};
