var Debug=function(a,b){if(!$("#Debug")){$("body").append("<div id='Debug'></div>")};if(b){$("#Debug").html($("#Debug").html()+"<br/>"+a)}else{$("#Debug").html($("#Debug").html()+a)}};(function($){$.fn.ImageSwitch=function(b,c){var d={Type:"FadeIn",NewImage:"",EffectOriginal:true,Speed:1000,StartLeft:50,StartTop:0,StartOpacity:0,EndLeft:-50,EndTop:0,EndOpacity:0,Direction:"RightLeft",Door1:"",Door2:""};var e=$.extend(d,b);var f=this;var g=0;var h;var i;var j;var k=function(){f.data("imageswitch",-1)};if($.isFunction(c)){k=function(){c();f.data("imageswitch",-1)}};var l=function(){f.parent().append("<img class='GrpEffectImg' id='"+h.replace("#","")+"'/>");$(h).attr("src",f.attr("src"));$(h).css("position","absolute");$(h).css("top",f.position().top);$(h).css("left",f.position().left);$(h).css("opacity",1);f.attr("src",e.NewImage);if(e.EffectOriginal){f.css("opacity",e.StartOpacity);f.animate({"opacity":1},e.Speed)};$(h).animate({"opacity":0},e.Speed,function(){$(h).remove();k()})};return this.each(function(){f=$(this);if(!f.ImageAnimating()){g=$.data(f);f.data("imageswitch",g);h="#GrpEffectImg-"+g;i="#GrpEffectDiv1-"+g;j="#GrpEffectDiv2-"+g;var a=new Image();a.src=e.NewImage;$.ImagePreload(e.NewImage,function(){switch(e.Type){case"FadeIn":l();break;case"FlyIn":Fly(true);break;case"FlyOut":Fly(false);break;case"FlipIn":Flip(true);break;case"FlipOut":Flip(false);break;case"ScrollIn":Scroll(true);break;case"ScrollOut":Scroll(false);break;case"SingleDoor":SingleDoor();break;case"DoubleDoor":DoubleDoor();break}})}})}})(jQuery);(function($){$.fn.ImageAnimating=function(){if(this.data("imageswitch")>0){return true}else{return false}}})(jQuery);(function($){$.fn.ImageStop=function(b,c,d){return this.each(function(){if($(this).ImageAnimating()){var a=$.data(this,"imageswitch");$("#GrpEffectImg-"+a).stop(b,c);$("#GrpEffectDiv-"+a).stop(b,c);$("#GrpEffectDiv1-"+a).stop(b,c);$(this).stop(b,c);$("#GrpEffectImg-"+a).remove();$("#GrpEffectDiv-"+a).remove();$("#GrpEffectDiv1-"+a).remove();if($.isFunction(d)){d()}}})}})(jQuery);(function($){$.ImageStopAll=function(a,b,c){$(".GrpEffectImg").stop(a,b);$(".GrpEffectDiv").stop(a,b);$(".GrpEffectDiv1").stop(a,b);$(this).stop(a,b);$(".GrpEffectImg").remove();$(".GrpEffectDiv").remove();$(".GrpEffectDiv1").remove();$.data(this,"imageswitch",-1);if($.isFunction(c)){c()}}})(jQuery);(function($){$.ImagePreload=function(a,b){var c=new Image();c.src=a;if($.isFunction(b)){$(c).load(b())}}})(jQuery);
