;(function(e){e.fn.mogFocus=function(t){var n=e.extend({},e.fn.mogFocus.defaults,t);return this.each(function(){function _(){r.next("ul").find("img").each(function(t){var n=e(this).attr("src"),r=e(this).attr("height"),i=e(this).attr("width"),s=n.substring(n.lastIndexOf(".")+1,n.length),o=parseInt(e(this).css("marginLeft"));s=="png"&&(e(this).wrap(""),e(this).parent().css({display:"inline-block",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+n+")",height:r,width:i,marginLeft:o}),e(this).remove())})}function D(t,n){t.children().each(function(){e(this).children().wrap("
"),n.push(e(this).html())}),t.html(n.reverse().join(""))}function P(){p.animate({marginLeft:-u,opacity:.8},n.prevNextAnima),d.animate({marginRight:-u,opacity:.8},n.prevNextAnima)}function H(){p.animate({marginLeft:-(u+n.prevNextPos),opacity:0},n.prevNextAnima),d.animate({marginRight:-(u+n.prevNextPos),opacity:0},n.prevNextAnima)}function B(e){r.delay(n.focusDelay).animate(e,n.focusTime),n.single&&r.next().delay(n.focusDelayTwo).animate(e,n.focusTwoTime)}function j(e,t){var i=r.children(":visible"),s=r.next("ul").children(":visible");i.css("z-index",10).delay(n.focusDelayTwo).animate(e,{duration:n.randomsImgTime,easing:n.randeasing,complete:function(){i.hide().css(t)}}),s.css("z-index",10).delay(n.focusDelay).animate(e,{duration:n.randomsImgTime,easing:n.randeasing,complete:function(){s.hide().css(t)}})}function F(t){n.scrollWidth=="100%"||n.scrollWidth=="auto"?f=e(window).width():f=n.scrollWidth;var i={fade:function(){r.children().eq(t).delay(n.focusDelay).fadeIn(n.fadeTime).siblings().fadeOut(n.fadeTime),n.single&&r.next().children().eq(t).delay(n.focusDelayTwo).fadeIn(n.fadeTwoTime).siblings().fadeOut(n.fadeTwoTime)},lrSliding:function(){B({left:-(f*t)})},tbSliding:function(){B({bottom:-m*t})},randomImg:function(){var e=Math.floor(Math.random()*c.length),i=r.children().height(),s=r.children().width(),o=[function(){j({top:-i},{top:0})},function(){j({left:s},{left:0})},function(){j({top:i},{top:0})},function(){j({left:-s},{left:0})},function(){j({top:-i,opacity:0},{top:0,opacity:1})},function(){j({left:s,opacity:0},{left:0,opacity:1})},function(){j({top:i,opacity:0},{top:0,opacity:1})},function(){j({left:-s,opacity:0},{left:0,opacity:1})}];o[e](),r.children().eq(t).css("z-index",1).show(),r.next("ul").children().eq(t).css("z-index",1).delay(n.focusDelay).fadeIn(600)}};i[n.animationWay](),n.btnStyle=="thumbnail"&&h.children().length>n.thumlen&&I();switch(n.btnStyle){case"thumbnail":h.children().eq(t).css(n.thumSelected).siblings().css(n.thumSubsty);break;case"noNumber":h.children().eq(t).addClass("hover").siblings().removeClass("hover");break;case"number":h.children().eq(t).css(n.thumSelected).siblings().css(n.thumSubsty)}}function I(){h.children().length>n.thumlen&&(a-L==n.thumlen-1?(A("-="),L+=N,k+=1):a==0&&(h.animate({left:0},800),L=0))}function q(){h.hide(),t.css({top:Math.round(s/2),height:0,display:"block"}).delay(700).animate({top:0,height:s},{duration:1e3,easing:"easeInOutQuart",complete:function(){h.fadeIn(600),n.prevNextToggle=="show"&&P()}})}function R(){t.css("display","block"),n.prevNextToggle=="show"&&(p.css({marginLeft:-u,opacity:.8}),d.css({marginRight:-u,opacity:.8}))}var t=e(this),r=t.children().children().first(),i=r.children().length,s=t.height(),o=r.find("img").attr("width"),u=Math.round(o/2),a=0,f=null,l=[],c=["top","right","bottom","left","fadeTop","fadeRight","fadeBottom","fadeLeft"];!n.single&&!!r.next("ul")&&r.next("ul").remove(),n.conversionImg&&((n.animationWay=="fade"||n.animationWay=="randomImg")&&e.browser.msie&&parseInt(e.browser.version)<=8&&_(),e.browser.msie&&parseInt(e.browser.version)==6&&_()),n.scrollWidth=="100%"||n.scrollWidth=="auto"?e(window).bind("resize load",function(){var t=e(window).width();r.parent().children().children().css("width",t);var s=r.children().width();n.animationWay=="lrSliding"?r.parent().children("ul").css({width:s*i,left:-(s*a)}):r.parent().children("ul").css("width",t)}):(r.parent().children().children().css("width",n.scrollWidth),r.parent().children().css("width",n.scrollWidth*i));if(n.animationWay=="fade"||n.animationWay=="randomImg")r.parent().children("ul").children().css({position:"absolute"}),r.children().filter(":not(':first')").hide().parent().next("ul").children().filter(":not(':first')").hide();t.css("width",n.scrollWidth).children().css("width",n.scrollWidth),l.push("