Checking for $.fn.slider would be more appropriate here. Also alleviates having to query twice.