/* * allinone banner - banner rotator v3.2 * * copyright 2012-2013, lambertgroup * */ (function(e){function j(a,b){e(a.currentimg.attr("data-text-id")).css("display","block");var c=e(a.currentimg.attr("data-text-id")).children(),g=0;currenttext_arr=[];c.each(function(){currenttext_arr[g]=e(this);var f=currenttext_arr[g].attr("data-initial-left"),c=currenttext_arr[g].attr("data-initial-top");b.responsive&&(f=parseint(f/(b.origwidth/b.width),10),c=parseint(c/(b.origwidth/b.width),10));currenttext_arr[g].css({left:f+"px",top:c+"px",opacity:parseint(currenttext_arr[g].attr("data-fade-start"), 10)/100});var l=currenttext_arr[g];settimeout(function(){b.responsive&&(newcss="",-1!=l.css("font-size").lastindexof("px")?(fontsize=l.css("font-size").substr(0,l.css("font-size").lastindexof("px")),newcss+="font-size:"+fontsize/(b.origwidth/b.width)+"px;"):-1!=l.css("font-size").lastindexof("em")&&(fontsize=l.css("font-size").substr(0,l.css("font-size").lastindexof("em")),newcss+="font-size:"+fontsize/(b.origwidth/b.width)+"em;"),-1!=l.css("line-height").lastindexof("px")?(lineheight=l.css("line-height").substr(0, l.css("line-height").lastindexof("px")),newcss+="line-height:"+lineheight/(b.origwidth/b.width)+"px;"):-1!=l.css("line-height").lastindexof("em")&&(lineheight=l.css("line-height").substr(0,l.css("line-height").lastindexof("em")),newcss+="line-height:"+lineheight/(b.origwidth/b.width)+"em;"),l.wrapinner('
'));var f=l.attr("data-final-left"),c=l.attr("data-final-top");b.responsive&&(f=parseint(f/(b.origwidth/b.width),10),c=parseint(c/(b.origwidth/b.width),10)); var g=1;!0==a.isvideoplaying&&(g=0);l.animate({opacity:g,left:f+"px",top:c+"px"},1e3*l.attr("data-duration"),function(){!0==a.isvideoplaying&&e(a.currentimg.attr("data-text-id")).children().css("opacity",0)})},1e3*currenttext_arr[g].attr("data-delay"));g++})}function k(a,b){nowx=(new date).gettime();!a.mouseoverbanner&&(!a.effectisrunning&&b.showcircletimer)&&(a.ctx.clearrect(0,0,a.canvas.width,a.canvas.height),a.ctx.beginpath(),a.ctx.globalalpha=b.behindcirclealpha/100,a.ctx.arc(b.circleradius+2* b.circlelinewidth,b.circleradius+2*b.circlelinewidth,b.circleradius,0,2*math.pi,!1),a.ctx.linewidth=b.circlelinewidth+2,a.ctx.strokestyle=b.behindcirclecolor,a.ctx.stroke(),a.ctx.beginpath(),a.ctx.globalalpha=b.circlealpha/100,a.ctx.arc(b.circleradius+2*b.circlelinewidth,b.circleradius+2*b.circlelinewidth,b.circleradius,0,2*((a.timeelapsed+nowx-a.arcinitialtime)/1e3)/b.autoplay*math.pi,!1),a.ctx.linewidth=b.circlelinewidth,a.ctx.strokestyle=b.circlecolor,a.ctx.stroke())}function l(a,b,c){var g=e(); e(".stripe",a).remove();e(".block",a).remove();f=u=math.round(b.width/b.numberofstripes);for(var f=!0,h=0;h
').css({opacity:"0",left:u*h+"px",width:f+"px",height:"0px",background:'url("'+c.current_imginside.attr("src")+'") '+-1*h*u+"px 0%"})):f=!1, f||(mleft=-1*u*h,a.append(e('
').css({opacity:"0",left:u*h+"px",width:f+"px",height:"0px"})));b.responsive&&f&&(-1==g||-1!=g&&9<=g)&&e(".stripe",a).css({"-webkit-background-size":b.width+"px "+b.height+"px","-moz-background-size":b.width+"px "+b.height+"px","-o-background-size":b.width+"px "+b.height+"px","-ms-background-size":b.width+"px "+b.height+"px", "background-size":b.width+"px "+b.height+"px"})}function i(a,b,e,g,f){var h=a.width(),l=a.height();a.css({width:"0",height:"0"});b==g.numberofrows-1&&e==g.numberofcolumns-1?settimeout(function(){a.animate({opacity:"1.0",width:h,height:l},1e3*g.effectduration/3,"",function(){f.trigger("effectcomplete")})},m):settimeout(function(){a.animate({opacity:"1.0",width:h,height:l},1e3*g.effectduration/3)},m);m+=g}function b(a,b,c,g,f,h,l,d){var r=!0;if(!b.loop&&c.current_img_no+a>=g||!b.loop&&0>c.current_img_no+ a)r=!1;if(r){e(".newfs",h).contents().unwrap();b.showcircletimer&&(c.ctx.clearrect(0,0,c.canvas.width,c.canvas.height),c.ctx.beginpath(),c.ctx.globalalpha=b.behindcirclealpha/100,c.ctx.arc(b.circleradius+2*b.circlelinewidth,b.circleradius+2*b.circlelinewidth,b.circleradius,0,2*math.pi,!1),c.ctx.linewidth=b.circlelinewidth+2,c.ctx.strokestyle=b.behindcirclecolor,c.ctx.stroke(),c.ctx.beginpath(),c.ctx.globalalpha=b.circlealpha/100,c.ctx.arc(b.circleradius+2*b.circlelinewidth,b.circleradius+2*b.circlelinewidth, b.circleradius,0,0,!1),c.ctx.linewidth=b.circlelinewidth,c.ctx.strokestyle=b.circlecolor,c.ctx.stroke());e(c.currentimg.attr("data-text-id")).css("display","none");e(l[c.current_img_no]).removeclass("bottomnavbuttonon");b.randomizeimages&&!c.bottomnavclicked?(a=math.floor(math.random()*g),c.current_img_no=c.current_img_no===a?math.floor(math.random()*g):a):c.current_img_no=c.current_img_no+a>=g?0:0>c.current_img_no+a?g-1:c.current_img_no+a;c.bottomnavclicked=!1;e(l[c.current_img_no]).addclass("bottomnavbuttonon"); c.currentimg=e(d[c.current_img_no]);c.current_imginside=c.currentimg.find("img:first");c.currentimg.attr("data-transition")?(f=c.currentimg.attr("data-transition"),"random"==f&&(f=h[math.floor(math.random()*h.length)])):f="random"!=b.defaulteffect?b.defaulteffect:h[math.floor(math.random()*h.length)];c.effectisrunning=!0;if("fade"==f||"slidefromleft"==f||"slidefromright"==f||"slidefromtop"==f||"slidefrombottom"==f)l(h,b,c),g=e(".stripe:first",h),"fade"==f&&(g.css({top:"0px",height:"100%",width:h.width()+ "px"}),g.animate({opacity:"1.0"},2e3*b.effectduration,"",function(){h.trigger("effectcomplete")})),"slidefromleft"==f&&(g.css({top:"0px",height:"100%",width:"0"}),g.animate({opacity:"1.0",width:h.width()+"px"},1e3*b.effectduration,"",function(){h.trigger("effectcomplete")})),"slidefromright"==f&&(g.css({top:"0px",height:"100%",width:"0",left:h.width()+5+"px"}),g.animate({opacity:"1.0",left:"0",width:h.width()+"px"},1e3*b.effectduration,"",function(){h.trigger("effectcomplete")})),"slidefromtop"== f&&(g.css({top:"0px",height:"0",width:h.width()+"px"}),g.animate({opacity:"1.0",height:h.height()+"px"},1e3*b.effectduration,"",function(){h.trigger("effectcomplete")})),"slidefrombottom"==f&&(g.css({top:"0px",height:"0",width:h.width()+"px",top:h.height()+"px"}),g.animate({opacity:"1.0",top:0,height:h.height()+"px"},1e3*b.effectduration,"",function(){h.trigger("effectcomplete")}));0<=f.indexof("stripes")&&(l(h,b,c),g=0<=f.indexof("reverse")?e(".stripe",h).myreverse():e(".stripe",h),m=100,i=0,g.each(function(){var a= e(this);("topbottomdroppingstripes"==f||"topbottomdroppingreversestripes"==f)&&a.css({top:"0px"});("bottomtopdroppingstripes"==f||"bottomtopdroppingreversestripes"==f)&&a.css({bottom:"0px"});("leftrightfadingstripes"==f||"leftrightfadingreversestripes"==f)&&a.css({top:"0px",height:"100%",width:"0"});"asynchronousdroppingstripes"==f&&(i%2?a.css({top:"0px"}):a.css({bottom:"0px"}));if("leftrightfadingstripes"==f||"leftrightfadingreversestripes"==f){var d=u;if("leftrightfadingstripes"==f&&i==b.numberofstripes- 1||"leftrightfadingreversestripes"==f&&0==i)d=f;i==b.numberofstripes-1?settimeout(function(){a.animate({width:d+"px",opacity:"1.0"},800*b.effectduration,"",function(){h.trigger("effectcomplete")})},m):settimeout(function(){a.animate({width:d+"px",opacity:"1.0"},800*b.effectduration)},m)}else i==b.numberofstripes-1?settimeout(function(){a.animate({height:"100%",opacity:"1.0"},1e3*b.effectduration,"",function(){h.trigger("effectcomplete")})},m):settimeout(function(){a.animate({height:"100%",opacity:"1.0"}, 1e3*b.effectduration)},m);m+=m;i++}));if(0<=f.indexof("blocks")){g=e();e(".stripe",h).remove();e(".block",h).remove();l=math.round(b.width/b.numberofcolumns);d=math.round(b.height/b.numberofrows);a=l;for(var r=d,k=0,v=0,x=!0,z=0;z').css({opacity:"0",left:k+"px",top:v+"px",width:a+"px",height:r+"px",background:'url("'+c.current_imginside.attr("src")+'") -'+k+"px -"+v+"px"})):x=!1,x||(mleft=-1*k,mtop=-1*v,h.append(e('
').css({opacity:"0",left:k+"px",top:v+"px",width:a+"px",height:r+"px"})));b.responsive&& x&&(-1==g||-1!=g&&9<=g)&&e(".block",h).css({"-webkit-background-size":b.width+"px "+b.height+"px","-moz-background-size":b.width+"px "+b.height+"px","-o-background-size":b.width+"px "+b.height+"px","-ms-background-size":b.width+"px "+b.height+"px","background-size":b.width+"px "+b.height+"px"});if(0<=f.indexof("reverse"))var p=e(".block",h).myreverse();else if("randomblocks"==f){c=e(".block",h);var d;for(g=c.length;g;p=parseint(math.random()*g,10),d=c[--g],c[g]=c[p],c[p]=d);p=c}else p=e(".block", h);m=100;if("randomblocks"==f){i=0;var s=b.numberofrows*b.numberofcolumns;p.each(function(){var a=e(this),d=a.width(),f=a.height();a.css({width:"0",height:"0"});i==s-1?settimeout(function(){a.animate({opacity:"1.0",width:d,height:f},1e3*b.effectduration/3,"",function(){h.trigger("effectcomplete")})},m):settimeout(function(){a.animate({opacity:"1.0",width:d,height:f},1e3*b.effectduration/3)},m);m+=g;i++})}else{var n=0,q=0,a=[];a[n]=[];p.each(function(){a[n][q]=e(this);q++;q==b.numberofcolumns&&(n++, q=0,a[n]=[])});q=n=0;m=100;p=e(a[n][q]);for(i(p,0,0,b,h);nb.numberofcolumns&&(i=n-q);j=0;for(nlimit_i&&jresponsivewidth||a.width100proc?responsivewidth:a.origwidth,a.height100proc||(a.height=a.width/(a.origwidth/a.origheight));a.width=parseint(a.width,10);a.height=parseint(a.height,10);a.enabletouchscreen&&a.responsive&&(a.width-=1);b.css("display","block");var c=e("
").addclass("allinone_bannerrotator").addclass(a.skin),g=e('
'); b.wrap(c);b.after(g);var f=b.parent(".allinone_bannerrotator"),h=e(".bannercontrols",f),c=e('
'),g=e('
'),l=e('
');b.after(c);b.after(g);b.after(l);a.showallcontrollers||h.css("display","none");var m=e(".leftnav",f),r=e(".rightnav",f);m.css("display","none");r.css("display","none");a.shownavarrows&&a.showoninitnavarrows&&(m.css("display","block"),r.css("display","block"));var k=e(".bottomnav",f),v=e(".bottomnavleft", f),x=e(".bottomnavright",f),z;k.css("display","block");v.css("display","block");x.css("display","block");k.css("top",a.height+"px");k.css({bottom:a.thumbswrappermarginbottom+"px",top:"auto"});v.css({bottom:a.thumbswrappermarginbottom+"px",top:"auto"});x.css({bottom:a.thumbswrappermarginbottom+"px",top:"auto"});a.showbottomnav||(k.css("display","none"),v.css("display","none"),x.css("display","none"));a.showoninitbottomnav||(k.css("left","-5000px"),v.css("left","-5000px"),x.css("left","-5000px"));var c= e(),y=a.defaulteffect,p=0,d={current_img_no:0,currentimg:0,current_imginside:"",bottomnavclicked:!1,effectisrunning:!1,mouseoverbanner:!1,rightval:0,isattractiveresp:!1,timeoutid:"",intervalid:"",arcinitialtime:(new date).gettime(),timeelapsed:0,windowwidth:0,canvas:"",ctx:"",bannerratio:a.origwidth/a.origheight};d.canvas=e(".mycanvas",f)[0];d.canvas.width=2*a.circleradius+4*a.circlelinewidth;d.canvas.height=2*a.circleradius+4*a.circlelinewidth;-1!=c&&9>c&&(a.showcircletimer=!1);a.showcircletimer&& (d.ctx=d.canvas.getcontext("2d"));f.width(a.width);f.height(a.height);h.css("margin-top",parseint((a.height-m.height())/2,10)+"px");var s=b.find("ul:first").children(),n,q=0,a=0;s.each(function(){d.currentimg=e(this);d.currentimg.is("li")||(d.currentimg=d.currentimg.find("li:first"));d.currentimg.is("li")&&(d.currentimg.css("display","none"),p++,n=e('
'),k.append(n),q+=parseint(n.css("padding-left").substring(0,n.css("padding-left").length-2),10)+ n.width(),a=parseint((k.height()-parseint(n.css("height").substring(0,n.css("height").length-2)))/2,10),n.css("margin-top",a+"px"))});k.width(q);a.showoninitbottomnav&&(k.css("left",parseint((f.width()-q)/2,10)+"px"),v.css("left",parseint(k.css("left").substring(0,k.css("left").length-2),10)-v.width()+"px"),x.css("left",parseint(k.css("left").substring(0,k.css("left").length-2),10)+k.width()+parseint(n.css("padding-left").substring(0,n.css("padding-left").length-2),10)+"px"));d.current_img_no=a.firstimg; a.firstimg>p&&(d.current_img_no=p);0>a.firstimg&&(d.current_img_no=0);a.randomizeimages&&(d.current_img_no=math.floor(math.random()*p));d.currentimg=e(s[d.current_img_no]);d.current_imginside=d.currentimg.find("img:first");-1!=t.indexof("ipad")||-1!=t.indexof("iphone")||-1!=t.indexof("ipod")||-1!=t.indexof("webos")||-1!=c&&7>=c?f.append(''):(f.css("background",'url("'+d.current_imginside.attr("src")+ '") no-repeat'),a.responsive&&(-1==c||-1!=c&&9<=c?f.css({"-webkit-background-size":a.width+"px "+a.height+"px","-moz-background-size":a.width+"px "+a.height+"px","-o-background-size":a.width+"px "+a.height+"px","-ms-background-size":a.width+"px "+a.height+"px","background-size":a.width+"px "+a.height+"px"}):8==c&&f.css({filter:"progid:dximagetransform.microsoft.alphaimageloader(src='"+d.current_imginside.attr("src")+"',sizingmethod='scale')"})));a.enabletouchscreen&&(c=math.floor(1e5*math.random()), f.wrap('
'),e("#bannerrotatorparent_"+c).width(a.width+1),e("#bannerrotatorparent_"+c).height(a.height),f.css({cursor:"url("+a.absurl+"skins/hand.cur),url("+a.absurl+"skins/hand.cur),move",left:"0px",position:"absolute"}),a.rightval=parseint(r.css("right").substring(0,r.css("right").length-2),10),"attractive"==a.skin&&a.width100proc&&r.css("right",a.rightval-1+"px"),f.mousedown(function(){0>a.rightval&&!c&&(r.css({visibility:"hidden", right:"0"}),("attractive"==a.skin&&a.width100proc||"attractive"==a.skin&&a.isattractiveresp)&&r.css("right",a.rightval-1+"px"),m.css("visibility","hidden"))}),f.mouseup(function(){c=!1;0>a.rightval&&(r.css({right:a.rightval+"px",visibility:"visible"}),("attractive"==a.skin&&a.width100proc||"attractive"==a.skin&&a.isattractiveresp)&&r.css("right",a.rightval-1+"px"),m.css("visibility","visible"))}),f.draggable({axis:"x",containment:"parent",start:function(){origleft=e(this).css("left")},stop:function(){d.effectisrunning|| (finalleft=e(this).css("left"),direction=1,origlefta.rightval&&(r.css({right:a.rightval+"px",visibility:"visible"}),("attractive"==a.skin&&a.width100proc||"attractive"==a.skin&&a.isattractiveresp)&&r.css("right",a.rightval-1+"px"),m.css("visibility","visible"));e(this).css("left","0px")}}));j(d,a,b,h);f.bind("effectcomplete",function(){var c=e();d.effectisrunning=!1;-1!=t.indexof("ipad")||-1!=t.indexof("iphone")||-1!=t.indexof("ipod")||-1!= t.indexof("webos")||-1!=c&&7>=c?(e("#curbgimgios",f).attr("src",d.current_imginside.attr("src")),e("#curbgimgios",f).width(a.width),e("#curbgimgios",f).height(a.height)):(f.css("background",'url("'+d.current_imginside.attr("src")+'") no-repeat'),a.responsive&&(-1==c||-1!=c&&9<=c?f.css({"-webkit-background-size":a.width+"px "+a.height+"px","-moz-background-size":a.width+"px "+a.height+"px","-o-background-size":a.width+"px "+a.height+"px","-ms-background-size":a.width+"px "+a.height+"px","background-size":a.width+ "px "+a.height+"px"}):8==c&&f.css({filter:"progid:dximagetransform.microsoft.alphaimageloader(src='"+d.current_imginside.attr("src")+"',sizingmethod='scale')"})));d.arcinitialtime=(new date).gettime();d.timeelapsed=0;a.showcircletimer&&(clearinterval(d.intervalid),d.ctx.clearrect(0,0,d.canvas.width,d.canvas.height),d.ctx.beginpath(),d.ctx.globalalpha=a.behindcirclealpha/100,d.ctx.arc(a.circleradius+2*a.circlelinewidth,a.circleradius+2*a.circlelinewidth,a.circleradius,0,2*math.pi,!1),d.ctx.linewidth= a.circlelinewidth+2,d.ctx.strokestyle=a.behindcirclecolor,d.ctx.stroke(),d.ctx.beginpath(),d.ctx.globalalpha=a.circlealpha/100,d.ctx.arc(a.circleradius+2*a.circlelinewidth,a.circleradius+2*a.circlelinewidth,a.circleradius,0,0,!1),d.ctx.linewidth=a.circlelinewidth,d.ctx.strokestyle=a.circlecolor,d.ctx.stroke(),d.intervalid=setinterval(function(){k(d,a)},125));j(d,a,b,h);0a.windoworientationscreensize0)&&(doresizenow=!1),a.windoworientationscreensize90&&(90==window.orientation&&e(window).height()>a.windoworientationscreensize90)&&(doresizenow=!1),a.windoworientationscreensize_90&&(-90==window.orientation&& e(window).height()>a.windoworientationscreensize_90)&&(doresizenow=!1),0==d.windowwidth&&(doresizenow=!1,d.windowwidth=e(window).width()));-1!=c&&(9==c&&0==d.windowwidth)&&(doresizenow=!1);d.windowwidth==e(window).width()?(doresizenow=!1,a.windowcurorientation!=window.orientation&&-1!=navigator.useragent.indexof("android")&&(a.windowcurorientation=window.orientation,doresizenow=!0)):d.windowwidth=e(window).width();a.responsive&&doresizenow&&(!1!==u&&cleartimeout(u),u=settimeout(function(){var c=a, g=p,l=w,q=n,u=e(),z=e("body").css("overflow");e("body").css("overflow","hidden");c.enabletouchscreen?(responsivewidth=b.parent().parent().parent().width(),responsiveheight=b.parent().parent().parent().height()):(responsivewidth=b.parent().parent().width(),responsiveheight=b.parent().parent().height());c.responsiverelativetobrowser&&(responsivewidth=e(window).width(),responsiveheight=e(window).height());c.width100proc&&(c.width=responsivewidth);c.height100proc&&(c.height=responsiveheight);"attractive"== c.skin&&(c.isattractiveresp=!1,r.css("right",c.rightval+"px"));if(c.origwidth!=responsivewidth||c.width100proc){c.origwidth>responsivewidth||c.width100proc?(c.width=responsivewidth,c.isattractiveresp=!0,"attractive"==c.skin&&r.css("right",c.rightval-1+"px")):c.width100proc||(c.width=c.origwidth);c.height100proc||(c.height=c.width/d.bannerratio);c.width=parseint(c.width,10);c.height=parseint(c.height,10);c.enabletouchscreen&&c.responsive&&(c.width-=1);f.width(c.width);f.height(c.height);-1!=t.indexof("ipad")|| -1!=t.indexof("iphone")||-1!=t.indexof("ipod")||-1!=t.indexof("webos")||-1!=u&&7>=u?(e("#curbgimgios",f).attr("src",d.current_imginside.attr("src")),e("#curbgimgios",f).width(c.width),e("#curbgimgios",f).height(c.height)):-1==u||-1!=u&&9<=u?f.css({"-webkit-background-size":c.width+"px "+c.height+"px","-moz-background-size":c.width+"px "+c.height+"px","-o-background-size":c.width+"px "+c.height+"px","-ms-background-size":c.width+"px "+c.height+"px","background-size":c.width+"px "+c.height+"px"}):8== u&&f.css({filter:"progid:dximagetransform.microsoft.alphaimageloader(src='"+d.current_imginside.attr("src")+"',sizingmethod='scale')"});c.enabletouchscreen&&(f.parent().width(c.width+1),f.parent().height(c.height));h.css("margin-top",parseint((c.height-m.height())/2,10)+"px");for(i=0;i
'),b.append(z),c=e(s[c]).attr("data-bottom-thumb"),z.html(''));b.addclass("bottomnavbuttonon")});w.mouseleave(function(){var b=e(this),c=b.attr("rel");a.showpreviewthumbs&&z.remove();d.current_img_no!=c&&b.removeclass("bottomnavbuttonon")});e(w[d.current_img_no]).addclass("bottomnavbuttonon");0