/* jQuery slidePanel plugin * Examples and documentation at: http://www.jqeasy.com/ * Version: 1.0 (22/03/2010) * No license. Use it however you want. Just keep this notice included. * Requires: jQuery v1.3+ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ (function(a){a.fn.slidePanel=function(d){d=a.extend({triggerName:"#trigger",position:"absolute",triggerTopPos:"80px",panelTopPos:"50px",panelOpacity:0.9,speed:"fast",ajax:false,ajaxSource:null,clickOutsideToClose:true},d||{});var b=this;var c=a(d.triggerName);var e=a.browser.msie&&a.browser.version=="6.0";if(e){d.position="absolute"}c.css("position",d.position);c.css("top",d.triggerTopPos);b.css("position",d.position);b.css("top",d.panelTopPos);b.css("filter","alpha(opacity="+(d.panelOpacity*100)+")");b.css("opacity",d.panelOpacity);c.attr("href","javascript:void(0)").mousedown(function(){if(!d.ajax){b.toggle(d.speed);c.toggleClass("active")}if(d.ajax&&d.ajaxSource!=null){if(!b.is(":visible")){b.load(d.ajaxSource,function(g,f,i){if(f!=="success"){var h="

Sorry, but there was an error loading the document.

";b.html(h)}b.toggle(d.speed)})}else{b.toggle(d.speed)}c.toggleClass("active")}else{if(d.ajax&&d.ajaxSource==null){alert("You must define an ajaxSource to use Ajax.")}}return false});if(d.clickOutsideToClose){a(document).bind("mousedown",function(){b.hide(d.speed);c.removeClass("active")});b.bind("mousedown",function(f){f.stopPropagation()})}}})(jQuery);