// jQuery plugin based on .load() for use with innerShiv
// http://jdbartlett.github.com/innershiv for more info
// $('selector').loadShiv('example.html selector');
jQuery.fn.loadShiv=function(c,f,g){var e,a,b,d;if(!this.length||typeof c!=="string"){return this}e=c.indexOf(" ");if(e>=0){a=c.slice(e,c.length);c=c.slice(0,e)}d="GET";if(f){if(jQuery.isFunction(f)){g=f;f=null}else{if(typeof f==="object"){f=jQuery.param(f,jQuery.ajaxSettings.traditional);d="POST"}}}b=this;jQuery.ajax({url:c,type:d,dataType:"html",data:f,complete:function(i,h){var j;if(h==="success"||h==="notmodified"){j=jQuery(innerShiv((a?"<div>":"")+i.responseText,false));if(a){j=j.find(a)}b.empty().append(j)}if(g){b.each(g,[i.responseText,h,i])}}});return this};
