(function(a){a.fn.fold=function(e){var f=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!=-1);var d=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1);if(f||d){this.remove();return true}e=e||{};var h={directory:".",side:"right",turnImage:"/css/autodata-nieuw/gfx/fold6.png",maxHeight:500,starting_width:120,starting_height:120,autoCurl:true};if(e.side=="right"&&!e.turnImage){h.turnImage="fold-sw.png"}var e=a.extend(h,e);var i=a('<div id="turn_hideme" onclick="javascript:clickPeel();">');var b=a('<div id="turn_wrapper" onclick="javascript:clickPeel();">');var g=a('<div id="turn_object">');var c=a('<img id="turn_fold" src="'+(e.directory+"/"+e.turnImage)+'">');g.css({width:e.starting_width,height:e.starting_height});if(e.side=="right"){b.addClass("right")}this.wrap(b).wrap(g).after(c).wrap(i);b=a("#turn_wrapper");g=a("#turn_object");if(!e.autoCurl){g.resizable({maxHeight:e.maxHeight,aspectRatio:true,ratio:true,border:false,dragHandle:false,knobHandles:true,handles:e.side=="left"?"se":"sw"})}else{b.hover(function(){g.stop().animate({width:e.maxHeight,height:e.maxHeight})},function(){g.stop().animate({width:e.starting_height,height:e.starting_height});turn.wrapper.click(alert("test"))})}}})(jQuery);
