var transitions={"tl-br-diagonal-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!0},"br-tl-diagonal-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"diagonal-bottomright-topleft",is_hidden:!0},"bl-tr-diagonal-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"diagonal-bottomleft-topright",is_hidden:!0},"tr-bl-diagonal-fade":{init_pos:"in-place",init_size:"all",
slice_time_mode:"queue",selection_pattern:"diagonal-topright-bottomleft",is_hidden:!0},"spiral-in-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"spiral-in",is_hidden:!0},"spiral-out-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"spiral-out",is_hidden:!0},"zig-zag-right-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"zig-zag-right",is_hidden:!0},"zig-zag-left-fade":{init_pos:"in-place",
init_size:"all",slice_time_mode:"queue",selection_pattern:"zig-zag-left",is_hidden:!0},"zig-zag-up-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"zig-zag-up",is_hidden:!0},"zig-zag-down-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"zig-zag-down",is_hidden:!0},"zig-zag-random-fade":{init_pos:"in-place",init_size:"all",slice_time_mode:"queue",selection_pattern:"random",is_hidden:!0},"tl-br-diagonal-appear":{init_pos:"in-place",
init_size:"point",slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1},"tl-br-chessboard-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"chessboard-topleft-bottomright",is_hidden:!1},"br-tl-diagonal-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"diagonal-bottomright-topleft",is_hidden:!1},"bl-tr-diagonal-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"diagonal-bottomleft-topright",
is_hidden:!1},"bl-tr-chessboard-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"chessboard-bottomleft-topright",is_hidden:!1},"tr-bl-diagonal-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"diagonal-topright-bottomleft",is_hidden:!1},"spiral-in-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"spiral-in",is_hidden:!1},"spiral-out-appear":{init_pos:"in-place",init_size:"point",
slice_time_mode:"queue",selection_pattern:"spiral-out",is_hidden:!1},"zig-zag-right-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"zig-zag-right",is_hidden:!1},"zig-zag-left-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"zig-zag-left",is_hidden:!1},"zig-zag-up-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"zig-zag-up",is_hidden:!1},"zig-zag-down-appear":{init_pos:"in-place",
init_size:"point",slice_time_mode:"queue",selection_pattern:"zig-zag-down",is_hidden:!1},"zig-zag-random-appear":{init_pos:"in-place",init_size:"point",slice_time_mode:"queue",selection_pattern:"random",is_hidden:!1},"tl-br-diagonal-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1},"br-tl-diagonal-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",
selection_pattern:"diagonal-bottomright-topleft",is_hidden:!1},"bl-tr-diagonal-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",selection_pattern:"diagonal-bottomleft-topright",is_hidden:!1},"tr-bl-diagonal-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",selection_pattern:"diagonal-topright-bottomleft",is_hidden:!1},"spiral-in-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",
selection_pattern:"zig-zag-right",is_hidden:!1},"spiral-out-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",selection_pattern:"spiral-out",is_hidden:!1},"zig-zag-right-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",selection_pattern:"zig-zag-right",is_hidden:!1},"zig-zag-left-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",selection_pattern:"zig-zag-left",
is_hidden:!1},"zig-zag-up-appear-rotate":{init_pos:"in-place",init_size:"point",init_rotation:-180,slice_time_mode:"queue",selection_pattern:"zig-zag-up",is_hidden:!1},"zig-zag-down-appear-rotate":{init_pos:"in-place",init_size:"point-topleft",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1},"zig-zag-random-appear-rotate":{init_pos:"spread-center",init_size:"all",init_rotation:0,slice_time_mode:"queue",selection_pattern:"random",is_hidden:!0},
"tl-br-diagonal-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1},"br-tl-diagonal-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-bottomright-topleft",is_hidden:!1},"bl-tr-diagonal-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-bottomleft-topright",is_hidden:!1},
"tr-bl-diagonal-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topright-bottomleft",is_hidden:!1},"spiral-in-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"spiral-in",is_hidden:!1},"spiral-out-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"spiral-out",is_hidden:!1},"zig-zag-right-expand":{init_pos:"in-center",init_size:"point",
init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-right",is_hidden:!1},"zig-zag-left-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-left",is_hidden:!1},"zig-zag-up-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-up",is_hidden:!1},"zig-zag-down-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",
is_hidden:!1},"zig-zag-random-expand":{init_pos:"in-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"random",is_hidden:!0},"tl-br-diagonal-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!0},"br-tl-diagonal-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-bottomright-topleft",is_hidden:!0},
"bl-tr-diagonal-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-bottomleft-topright",is_hidden:!0},"tr-bl-diagonal-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topright-bottomleft",is_hidden:!0},"spiral-in-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"spiral-in",is_hidden:!0},"spiral-out-collapse":{init_pos:"spread-center",
init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"spiral-out",is_hidden:!0},"zig-zag-right-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-right",is_hidden:!0},"zig-zag-left-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-left",is_hidden:!0},"zig-zag-up-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",
selection_pattern:"zig-zag-up",is_hidden:!0},"zig-zag-down-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-down",is_hidden:!0},"zig-zag-random-collapse":{init_pos:"spread-center",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"random",is_hidden:!0},"zig-zag-random-collapse2":{init_pos:"in-place",init_size:"flat-top",init_rotation:0,easing:"easeOutBack",slice_time_mode:"queue",selection_pattern:"zig-zag-down",
is_hidden:!0},"left-right-slide":{init_pos:"in-line-right",init_size:"all",init_rotation:0,rows:1,columns:1,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1},"tl-br-diagonal-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1},"br-tl-diagonal-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-bottomright-topleft",
is_hidden:!1},"bl-tr-diagonal-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-bottomleft-topright",is_hidden:!1},"tr-bl-diagonal-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topright-bottomleft",is_hidden:!1},"spiral-in-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"spiral-in",is_hidden:!1},"spiral-out-drop":{init_pos:"in-line-top",
init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"spiral-out",is_hidden:!1},"zig-zag-right-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-right",is_hidden:!1},"zig-zag-left-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-left",is_hidden:!1},"zig-zag-up-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",
selection_pattern:"zig-zag-up",is_hidden:!1},"zig-zag-down-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-down",is_hidden:!1},"zig-zag-random-drop":{init_pos:"in-line-top",init_size:"point",init_rotation:0,rows:1,slice_time_mode:"queue",selection_pattern:"random",is_hidden:!0},"hor-zipper-right":{init_pos:"top-bottom-zipper",init_size:"flat-top",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",
is_hidden:!1},"hor-zipper-left":{init_pos:"top-bottom-zipper",init_size:"flat-top",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-bottomright-topleft",is_hidden:!1},"ver-zipper-bottom":{init_pos:"left-right-zipper",init_size:"all",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1},"ver-zipper-top":{init_pos:"left-right-zipper",init_size:"all",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-bottomright-topleft",
is_hidden:!1},"tl-corner-diagonal":{init_pos:"top-left-corner",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1},"tl-corner-random":{init_pos:"top-left-corner",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"random",is_hidden:!1},"tl-corner-spiral":{init_pos:"top-left-corner",init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"spiral-in",is_hidden:!1},"tl-corner-zigzagdown":{init_pos:"top-left-corner",
init_size:"point",init_rotation:0,slice_time_mode:"queue",selection_pattern:"zig-zag-down",is_hidden:!1},"left-right-slide":{init_pos:"in-line-right",init_size:"all",init_rotation:0,rows:1,columns:1,slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",is_hidden:!1}};
(function(t){id=0;jQuery.fn.slider_plugin=function(d){id++;if(1<this.length)return this.each(function(){t(this).slider_plugin(d)}),this;var d=t.extend({theme:"modern",columns:4,rows:4,init_pos:"in-place",init_size:"all",dest_pos:"in-place",dest_size:"all",easing:null,rotate_easing:null,opacity_easing:null,width_easing:null,height_easing:null,left_easing:null,top_easing:null,run_transition_on:"in",slice_time_mode:"queue",selection_pattern:"diagonal-topleft-bottomright",def_transition:"random",init_rotation:0,
final_rotation:0,slide_timeout:5E3,slide_animation:3E3,show_direction:"forward",auto_play:!0,interactive_while_playing:!0,socondary_nav_type:"thumbs",secondary_nav_pos:"bottom",secondary_nav_placement:"inside",pause_on_hover:!1,spread_factor:1.5,auto_hide_primary_nav:!0,auto_hide_primary_nav_delay:300,auto_hide_primary_time:1E3,auto_hide_secondary_nav:!1,auto_hide_secondary_nav_delay:1E3,auto_hide_secondary_time:1E3,auto_hide_secondary_callback:function(){this.hide("drop",{distance:50,direction:"down"},
300)},auto_show_secondary_callback:function(){this.show("drop",{distance:50,direction:"up"},300)},ken_burns_for_thumbs:!0,kb_thumbs_zoomfactor:1.5,kb_thumbs_start_cpoint:[30,70],kb_thumbs_start_cpoint_random:!0,kb_thumbs_dest_cpoint:[30,70],kb_thumbs_dest_cpoint_random:!0,kb_thumbs_anim_time:5E3,kb_thumbs_play_in_loop:!0,thumbs_my_position:"bottom center",thumbs_at_position:"top center",thumbs_show_effect:"drop",thumbs_hide_effect:"drop",thumb_show_dir:"up",thumb_hide_dir:"up",thumb_title_show_callback:function(){this.show("drop",
{distance:20,direction:"up"},300)},thumb_title_hide_callback:function(){this.hide("fade",{distance:20,direction:"down"},500)},show_thumb_titles:!0,ken_burns_for_slides:!0,kb_slides_zoomfactor:1.5,kb_slides_start_cpoint:[40,60],kb_slides_start_cpoint_random:!0,kb_slides_dest_cpoint:[40,60],kb_slides_dest_cpoint_random:!0,kb_slides_anim_time:5E3,kb_slides_play_in_loop:!0,title_show_callback:function(){this.show("fade",{distance:20,direction:"down"},500)},title_hide_callback:function(){this.hide("fade",
{distance:20,direction:"down"},500)},videobutton_show_callback:function(){this.show("fade",{distance:20,direction:"left"},500)},videobutton_hide_callback:function(){this.hide("fade",{distance:20,direction:"left"},500)},show_titles:!0,timer_position:"center",show_timer:!0},d||{}),m=this;return this.each(function(){function Da(){0<H?setTimeout(arguments.callee,10):Ea()}function Ea(){q=m.width();o=m.height();jQuery.browser.msie&&9>parseInt(jQuery.browser.version,10)&&(ba=!1);if(jQuery.browser.msie)d.timer_position=
"line";m.prepend('<div class="slices-area"></div>');var a=0;"classic"==u?(m.addClass("classic-frame"),m.append('<div id="prev-button" class="classic-prev"></div><div id="next-button" class="classic-next"></div><div id="pp-button" class="classic-pause"></div>'),a=-22):"modern"==u?(m.addClass("modern-frame"),m.append('<div id="prev-button" class="modern-prev"></div><div id="next-button" class="modern-next"></div>'),a=0):"coffee"==u&&(m.addClass("classic-frame"),m.append('<div id="prev-button" class="classic-prev"></div><div id="next-button" class="classic-next"></div><div id="pp-button" class="classic-pause"></div>'),
a=-30);var I=m.find("#prev-button"),g=m.find("#next-button"),j=m.find("#pp-button"),f=0,e=0,e=E(o,I.outerHeight(!0));I.css({top:e+"px",left:a+"px"});e=E(o,g.outerHeight(!0));g.css({top:e+"px",right:a+"px"});e=E(o,j.outerHeight(!0));f=E(q,j.outerWidth(!0));j.css({top:e+"px",left:f+"px"});if("bullets"==z){m.append('<div class="bk-diamond-secondary-nav '+u+'"><div class="bk-secondary-nav-wrap"></div></div>');s=m.find("div.bk-diamond-secondary-nav");n=s.find("div.bk-secondary-nav-wrap");a=0;e=null;for(f=
0;f<M;f++){n.append('<a class="bk-bullet bk-secondary-nav-item '+u+'" rel="'+f+'"></a>');e=n.children("a.bk-secondary-nav-item").eq(f);a+=e.outerWidth(!0);if("bottom"==p||"bottom-left-hor"==p||"bottom-right-hor"==p||"top"==p||"top-left-hor"==p||"top-right-hor"==p){var b=e.outerWidth(!0)*f;e.css({top:"0px",left:b+"px"});s.css({height:e.outerHeight(!0)+"px"})}else if("left"==p||"top-left-ver"==p||"bottom-left-ver"==p||"right"==p||"top-right-ver"==p||"bottom-right-ver"==p)b=e.outerHeight(!0)*f,e.css({top:b+
"px",left:"0px"}),s.css({width:e.outerWidth(!0)+"px"});var h=J(f,"data-thumb"),b='<div class="bk-bullet-img-wrap '+u+'"><img class="bk-bullet-img" src="'+h+'" /></div>',G=J(f,"data-thumb-title");d.show_thumb_titles&&""!=G&&void 0!=G&&(b='<div class="bk-bullet-img-wrap '+u+'"><img class="bk-bullet-img" src="'+h+'" /><div class="bk-thumb-title '+u+'">'+G+"</div></div>");var A=d.thumbs_my_position,G=d.thumbs_at_position,O=J(f,"data-thumb-my-position");""!=O&&"undefined"!==typeof O&&(A=O);O=J(f,"data-thumb-at-position");
""!=O&&"undefined"!==typeof O&&(G=O);e.qtip({content:{text:b},position:{my:A,at:G},style:{classes:"ui-tooltip "+u+" ui-thumb-shadow bk-thumb-tooltip"},show:{effect:function(){t(this).show(d.thumbs_show_effect,{distance:20,direction:d.thumb_show_dir},300,function(){if(d.show_thumb_titles){var a=t(this).find("div.bk-thumb-title");d.thumb_title_show_callback.call(a)}if(d.ken_burns_for_thumbs&&"undefined"===typeof la[t(this).attr("id")]){var a=V[h].width,b=V[h].height,e=d.kb_thumbs_start_cpoint,f=d.kb_thumbs_start_cpoint_random,
g=d.kb_thumbs_dest_cpoint,j=d.kb_thumbs_dest_cpoint_random,I=d.kb_thumbs_anim_time,m=d.kb_thumbs_play_in_loop,o=d.kb_thumbs_zoomfactor;"undefined"!==typeof a&&0<a&&"undefined"!==typeof b&&0<b&&(a=t(this).find("img.bk-bullet-img").kenburns_plugin({zoomfactor:o,hover_mode:"none",flash_at_start:!0,orig_img_width:a,orig_img_height:b,theme:u+" thumb",start_cpoint:e,start_cpoint_random:f,dest_cpoint:g,dest_cpoint_random:j,anim_time:I,play_in_loop:m}),la[t(this).attr("id")]=a)}})},solo:!1},hide:{effect:function(){d.show_thumb_titles&&
t(this).find("div.bk-thumb-title").hide();t(this).hide(d.thumbs_hide_effect,{distance:20,direction:d.thumb_hide_dir},1E3)},solo:!1}})}ca=da=n.children("a.bk-secondary-nav-item").outerWidth(!0);f=E(q,a);e=E(o,a);ma("a.bk-bullet",f,e,a,a)}else if("thumbs"==z){m.append('<div class="bk-diamond-secondary-nav '+u+'"><div class="bk-secondary-nav-wrap"></div></div>');s=m.find("div.bk-diamond-secondary-nav");n=s.find("div.bk-secondary-nav-wrap");A=a=0;e=null;for(f=0;f<M;f++){h=J(f,"data-thumb");b='<a class="bk-secondary-nav-item '+
u+'" rel="'+f+'"><div class="bk-thumb-img-frame ui-thumb-shadow '+u+'" ><img src="'+h+'" class="bk-thumb-img" /></div></a>';G=J(f,"data-thumb-title");d.show_thumb_titles&&""!=G&&void 0!=G&&(b='<a class="bk-secondary-nav-item" rel="'+f+'"><div class="bk-thumb-img-frame ui-thumb-shadow '+u+'" ><img src="'+h+'" class="bk-thumb-img" /><div class="bk-thumb-title '+u+'">'+G+"</div></div></a>");n.append(b);e=n.find("div.bk-thumb-img-frame").eq(f);if("bottom"==p||"bottom-left-hor"==p||"bottom-right-hor"==
p||"top"==p||"top-left-hor"==p||"top-right-hor"==p)b=e.outerWidth(!0)*f,e.css({top:"0px",left:b+"px"}),s.css({height:e.outerHeight(!0)+"px"});else if("left"==p||"top-left-ver"==p||"bottom-left-ver"==p||"right"==p||"top-right-ver"==p||"bottom-right-ver"==p)b=e.outerHeight(!0)*f,e.css({top:b+"px",left:"0px"}),s.css({width:e.outerWidth(!0)+"px"});a+=e.outerWidth(!0);A+=e.outerHeight(!0);if(d.ken_burns_for_thumbs){var b=V[h].width,G=V[h].height,O=d.kb_thumbs_start_cpoint,v=d.kb_thumbs_start_cpoint_random,
H=d.kb_thumbs_dest_cpoint,K=d.kb_thumbs_dest_cpoint_random,P=d.kb_thumbs_anim_time,S=d.kb_thumbs_play_in_loop,T=d.kb_thumbs_zoomfactor;"undefined"!==typeof b&&0<b&&"undefined"!==typeof G&&0<G&&e.find("img").kenburns_plugin({orig_img_width:b,orig_img_height:G,theme:u+" thumb",start_cpoint:O,start_cpoint_random:v,dest_cpoint:H,dest_cpoint_random:K,anim_time:P,play_in_loop:S,zoomfactor:T})}}da=e.outerWidth(!0);ca=e.outerHeight(!0);f=E(q,a);e=E(o,A);ma("a.bk-secondary-nav-item .bk-thumb-img-frame",f,
e,a,A)}if(d.show_timer)"line"==d.timer_position?m.append('<div class="bk-progressbar '+u+'">'):(f="","modern"==u&&(f='<div id="pp-button" class="modern-pause"></div>'),m.append('<div class="bk-circular-timer-outerwrap b-big '+u+'"><div class="bk-circular-timer-wrap '+u+'"><div class="bk-circular-timer-left '+u+'" /><div class="bk-circular-timer-right '+u+'" /></div>'+f+"</div>"),B=m.find("div.bk-circular-timer-outerwrap"),w=m.find("div.bk-circular-timer-wrap"),N=w.find("div.bk-circular-timer-left"),
L=w.find("div.bk-circular-timer-right"),B.css({width:w.outerWidth(!0)+"px",height:w.outerHeight(!0)+"px",position:"absolute"}),"top-right"==d.timer_position?B.css({top:"0px",right:"0px"}):"top-left"==d.timer_position?B.css({top:"0px",left:"0px"}):"bottom-right"==d.timer_position?B.css({bottom:"0px",right:"0px"}):"bottom-left"==d.timer_position?B.css({bottom:"0px",left:"0px"}):"center"==d.timer_position?(e=E(o,w.outerHeight(!0)),f=E(q,w.outerWidth(!0)),B.css({top:e+"px",left:f+"px"})):"on_current_bullet"==
d.timer_position&&"bullets"==z?(B.removeClass("b-big"),w.addClass("b-small"),N.addClass("b-small"),L.addClass("b-small"),B.css({width:w.outerWidth(!0)+"px",height:w.outerHeight(!0)+"px",position:"absolute"}),f=n.children("a.bk-bullet").outerWidth(!1),e=n.children("a.bk-bullet").outerHeight(!1),f=E(f,B.outerHeight(!0)),e=E(e,B.outerWidth(!0)),B.css({top:f+"px",left:e+"px"})):(d.timer_position="center",e=E(o,w.outerHeight(!0)),f=E(q,w.outerWidth(!0)),B.css({top:e+"px",left:f+"px"})),"modern"==u&&(j=
m.find("#pp-button"),e=f=0,j.css({width:w.width()+"px",height:w.height()+"px"}),e=E(w.outerHeight(!0),j.height()),f=E(w.outerWidth(!0),j.width()),j.css({top:e+"px",left:f+"px"}),j.show()));d.auto_hide_primary_nav||(I.show(),g.show(),j&&j.show());("thumbs"==d.socondary_nav_type||"bullets"==d.socondary_nav_type)&&s.bind("mousewheel",function(a,b){0<b?(s.find("div.bk-sec-top").trigger("click"),s.find("div.bk-sec-right").trigger("click")):0>b&&(s.find("div.bk-sec-bottom").trigger("click"),s.find("div.bk-sec-left").trigger("click"));
return!1});d.auto_hide_secondary_nav&&("thumbs"==d.socondary_nav_type||"bullets"==d.socondary_nav_type)&&s.hide();d.show_titles&&(m.append('<div class="bk-title"></div>'),ea=m.find("div.bk-title"));m.append('<div class="bk-pp-video-button '+u+' play"></div>');Q=m.find("div.bk-pp-video-button");"outside"==d.secondary_nav_placement&&("right"==p||"top-right-ver"==p||"bottom-right-ver"==p)?Q.css({top:"-23px",right:"10px"}):Q.css({top:"10px",right:"-23px"});Fa();C.children("li").hide();C.fadeIn(100,function(){d.auto_play&&
(R=!0);U(D,!0);na()})}function ma(a,I,g,j,f){if(!("thumbs"!=d.socondary_nav_type&&"bullets"!=d.socondary_nav_type))if("bottom"==p||"bottom-left-hor"==p||"bottom-right-hor"==p)n.find(a).css({display:"block","float":"left"}),"thumbs"==z?fa(n,I,I):"bullets"==z&&fa(n,I,q-j),j>q&&(n.css({width:j+"px"}),oa()),"outside"==d.secondary_nav_placement?s.css({bottom:-1*s.outerHeight()+"px",left:"0px",width:"100%"}):s.css({bottom:"0px",left:"0px",width:"100%"});else if("top"==p||"top-left-hor"==p||"top-right-hor"==
p)n.find(a).css({display:"block","float":"left"}),"thumbs"==z?fa(n,I,I):"bullets"==z&&fa(n,I,q-j),j>q&&(n.css({width:j+"px"}),oa()),"outside"==d.secondary_nav_placement?s.css({top:-1*s.outerHeight()+"px",left:"0px",width:"100%"}):s.css({top:"0px",left:"0px",width:"100%"});else if("left"==p||"top-left-ver"==p||"bottom-left-ver"==p)n.find(a).css({display:"block"}),"thumbs"==z?ga(n,g,g):"bullets"==z&&ga(n,g,o-j),f>o&&(n.css({height:f+"px"}),pa()),"outside"==d.secondary_nav_placement?s.css({top:"0px",
left:-1*s.outerWidth()+"px",height:"100%"}):s.css({top:"0px",left:"0px",height:"100%"});else if("right"==p||"top-right-ver"==p||"bottom-right-ver"==p)n.find(a).css({display:"block"}),"thumbs"==z?ga(n,g,g):"bullets"==z&&ga(n,g,o-j),f>o&&(n.css({height:f+"px"}),pa()),"outside"==d.secondary_nav_placement?s.css({top:"0px",right:-1*s.outerWidth()+"px",height:"100%"}):s.css({top:"0px",right:"0px",height:"100%"})}function J(a,d){return C.children("li").eq(a).attr(d)}function oa(){s.append('<div class="bk-secondary-nav-hor-button bk-sec-nav-button-back bk-sec-left '+
u+'"></div>');s.find("div.bk-sec-left").css({left:"0px"});s.append('<div class="bk-secondary-nav-hor-button bk-sec-nav-button-back bk-sec-right '+u+'"></div>');s.find("div.bk-sec-right").css({right:"0px"})}function pa(){s.append('<div class="bk-secondary-nav-ver-button bk-sec-nav-button-back bk-sec-top '+u+'"></div>');s.find("div.bk-sec-top").css({top:"0px"});s.append('<div class="bk-secondary-nav-ver-button bk-sec-nav-button-back bk-sec-bottom '+u+'"></div>');s.find("div.bk-sec-bottom").css({bottom:"0px"})}
function ga(a,d,g){-1!=p.indexOf("top")?a.css({top:"0px"}):-1!=p.indexOf("bottom")?a.css({top:g+"px"}):a.css({top:d+"px"})}function fa(a,d,g){-1!=p.indexOf("left")?a.css({left:"0px"}):-1!=p.indexOf("right")?a.css({left:g+"px"}):a.css({left:d+"px"})}function E(a,d){return Math.round((a-d)/2)}function qa(a,d,g,j,f,e){var b={};if("in-place"==a&&"point"==d)return b.top=Math.round(j*e+e/2),b.left=Math.round(g*f+f/2),b.width=0,b.height=0,b;if("in-place"==a&&"point-topleft"==d)return b.top=Math.round(j*
e),b.left=Math.round(g*f),b.width=0,b.height=0,b;if("in-place"==a&&"point-topright"==d)return b.top=Math.round(j*e),b.left=Math.round(g*f+f),b.width=0,b.height=0,b;if("in-place"==a&&"point-bottomleft"==d)return b.top=Math.round(j*e+e),b.left=Math.round(g*f),b.width=0,b.height=0,b;if("in-place"==a&&"point-bottomright"==d)return b.top=Math.round(j*e+e),b.left=Math.round(g*f+f),b.width=0,b.height=0,b;if("in-place"==a&&"flat-top"==d)return b.top=Math.round(j*e),b.left=Math.round(g*f),b.width=f,b.height=
0,b;if("in-place"==a&&"flat-bottom"==d)return b.top=Math.round(j*e)+e,b.left=Math.round(g*f),b.width=f,b.height=0,b;if("in-place"==a&&"flat-left"==d)return b.top=Math.round(j*e),b.left=Math.round(g*f),b.width=0,b.height=e,b;if("in-place"==a&&"flat-right"==d)return b.top=Math.round(j*e),b.left=Math.round(g*f)+f,b.width=0,b.height=e,b;if("in-place"==a&&"flat-center-hor"==d)return b.top=Math.round(j*e)+Math.round(e/2),b.left=Math.round(g*f),b.width=f,b.height=0,b;if("in-place"==a&&"flat-center-ver"==
d)return b.top=Math.round(j*e),b.left=Math.round(g*f)+Math.round(f/2),b.width=0,b.height=e,b;if("in-center"==a&&"point"==d)return b.top=Math.round(o/2),b.left=Math.round(q/2),b.width=0,b.height=0,b;if("in-center"==a&&"all"==d)return b.top=Math.round((o-e)/2),b.left=Math.round((q-f)/2),b.width=f,b.height=e,b;if("in-place"==a)b.top=Math.round(j*e),b.left=Math.round(g*f);else{if("spread-center"==a&&"point"==d)return b.top=Math.round((j*e+e/2)*h-(o*h-o)/2),b.left=Math.round((g*f+f/2)*h-(q*h-q)/2),b.width=
0,b.height=0,b;if("spread-center"==a&&"all"==d)return b.top=Math.round((j*e+(e*h-e)/2)*h-(o*h-o)/2),b.left=Math.round((g*f+(f*h-f)/2)*h-(q*h-q)/2),b.width=f,b.height=e,b;if("spread-right-bottom"==a&&"point"==d)return b.top=Math.round((j*e+e/2)*h-(o*h-o)),b.left=Math.round((g*f+f/2)*h-(q*h-q)),b.width=0,b.height=0,b;if("spread-right-bottom"==a&&"all"==d)return b.top=Math.round((j*e+(e*h-e)/2)*h-(o*h-o)),b.left=Math.round((g*f+(f*h-f)/2)*h-(q*h-q)),b.width=f,b.height=e,b;if("spread-right"==a&&"point"==
d)return b.top=Math.round((j*e+e/2)*h-(o*h-o)/2),b.left=Math.round((g*f+f/2)*h-(q*h-q)),b.width=0,b.height=0,b;if("spread-right"==a&&"all"==d)return b.top=Math.round((j*e+(e*h-e)/2)*h-(o*h-o)/2),b.left=Math.round((g*f+(f*h-f)/2)*h-(q*h-q)),b.width=f,b.height=e,b;if("spread-bottom"==a&&"point"==d)return b.top=Math.round((j*e+e/2)*h-(o*h-o)),b.left=Math.round((g*f+f/2)*h-(q*h-q)/2),b.width=0,b.height=0,b;if("spread-bottom"==a&&"all"==d)return b.top=Math.round((j*e+(e*h-e)/2)*h-(o*h-o)),b.left=Math.round((g*
f+(f*h-f)/2)*h-(q*h-q)/2),b.width=f,b.height=e,b;if("spread-top"==a&&"point"==d)return b.top=Math.round((j*e+e/2)*h),b.left=Math.round((g*f+f/2)*h-(q*h-q)/2),b.width=0,b.height=0,b;if("spread-top"==a&&"all"==d)return b.top=Math.round((j*e+(e*h-e)/2)*h),b.left=Math.round((g*f+(f*h-f)/2)*h-(q*h-q)/2),b.width=f,b.height=e,b;if("spread-left-top"==a&&"point"==d)return b.top=Math.round((j*e+e/2)*h),b.left=Math.round((g*f+f/2)*h),b.width=0,b.height=0,b;if("spread-left-top"==a&&"all"==d)return b.top=Math.round((j*
e+(e*h-e)/2)*h),b.left=Math.round((g*f+(f*h-f)/2)*h),b.width=f,b.height=e,b;if("spread-left"==a&&"point"==d)return b.top=Math.round((j*e+e/2)*h-(o*h-o)/2),b.left=Math.round((g*f+f/2)*h),b.width=0,b.height=0,b;if("spread-left"==a&&"all"==d)return b.top=Math.round((j*e+(e*h-e)/2)*h-(o*h-o)/2),b.left=Math.round((g*f+(f*h-f)/2)*h),b.width=f,b.height=e,b;if("spread-left-bottom"==a&&"point"==d)return b.top=Math.round((j*e+e/2)*h-(o*h-o)),b.left=Math.round((g*f+f/2)*h),b.width=0,b.height=0,b;if("spread-left-bottom"==
a&&"all"==d)return b.top=Math.round((j*e+(e*h-e)/2)*h-(o*h-o)),b.left=Math.round((g*f+(f*h-f)/2)*h),b.width=f,b.height=e,b;if("in-line-top"==a)b.top=-e,b.left=Math.round(g*f);else if("in-line-bottom"==a)b.top=o,b.left=Math.round(g*f);else if("in-line-left"==a)b.top=Math.round(j*e),b.left=-f;else if("in-line-right"==a)b.top=Math.round(j*e),b.left=q;else if("top-bottom-zipper"==a)b.top=1==g%2?o:-e,b.left=Math.round(g*f);else if("left-right-zipper"==a)b.left=1==j%2?q:-f,b.top=Math.round(j*e);else if("top-left-corner"==
a)b.left=-f,b.top=-e;else if("top-right-corner"==a)b.left=q,b.top=-e;else if("bottom-right-corner"==a)b.left=q,b.top=o;else if("bottom-left-corner"==a)b.left=-f,b.top=o}if("all"==d)b.width=f,b.height=e;else if("point"==d)b.width=0,b.height=0;else if("flat-top"==d)b.width=f,b.height=0;else if("flat-bottom"==d)b.width=f,b.height=0;else if("flat-left"==d)b.width=0,b.height=e;else if("flat-right"==d)b.width=0,b.height=e;return b}function Ga(a){"in"==K&&C.children("li").eq(a).find("img.bk_ken_burns_img").not(".bk_canvas_underlay img").each(function(a){var g=
t(this).attr("src")+"_"+a,j,f=t(this).attr("src"),a=S[f].width,f=S[f].height,e=d.kb_slides_start_cpoint;j=d.kb_slides_start_cpoint_random;var b=d.kb_slides_dest_cpoint,h=d.kb_slides_dest_cpoint_random,n=d.kb_slides_anim_time,p=d.kb_slides_play_in_loop,s=d.kb_slides_zoomfactor;if("undefined"!==typeof a&&0<a&&"undefined"!==typeof f&&0<f)e=t(this).kenburns_plugin({hover_mode:"none",orig_img_width:a,orig_img_height:f,canvas_width:q,canvas_height:o,alignment:"absolute",flash_at_start:!1,run_at_init:!1,
theme:u,start_cpoint:e,start_cpoint_random:j,dest_cpoint:b,dest_cpoint_random:h,anim_time:n,play_in_loop:p,zoomfactor:s}),T[g]=e,j=e.kenburns_plugin.Current_Shift(),g=j.trx,e=j["try"],j=j.scale,m.find(".slices-area img").css({width:a+"px",height:f+"px","-webkit-transform":"translate("+g+"px,"+e+"px) scale("+j+")",msTransform:"translate("+g+"px,"+e+"px) scale("+j+")","-o-transform":"translate("+g+"px,"+e+"px) scale("+j+")","-moz-transform":"translate("+g+"px,"+e+"px) scale("+j+")",transform:"translate("+
g+"px,"+e+"px) scale("+j+")",filter:'progid:DXImageTransform.Microsoft.Matrix(FilterType="nearest neighbor",M11='+j+",M12=0,M21=0,M22="+j+",Dx="+g+",Dy="+e+")",msFilter:'progid:DXImageTransform.Microsoft.Matrix(FilterType="nearest neighbor",M11='+j+",M12=0,M21=0,M22="+j+",Dx="+g+",Dy="+e+")","-webkit-transform-origin":"0px 0px","-moz-transform-origin":"0px 0px","-o-transform-origin":"0px 0px",msTransformOrigin:"0px 0px","transform-origin":"0px 0px"})})}function Ha(a,d,g,j,f,e,b,h,n,p,s,u,t,w,A,C){var j=
[],D=Math.round(q/e),E=Math.round(o/b);if("diagonal-topleft-bottomright"==a||"diagonal-bottomright-topleft"==a)for(x=0;x<e;x++)for(y=0;y<b;y++){var l={};l.x=x;l.y=y;l.obj=m.find("#slice-"+x+"-"+y+"");"diagonal-topleft-bottomright"==a?j.push(l):"diagonal-bottomright-topleft"==a&&j.unshift(l)}else if("diagonal-bottomleft-topright"==a||"diagonal-topright-bottomleft"==a)for(x=e-1;0<=x;x--)for(y=0;y<b;y++)l={},l.x=x,l.y=y,l.obj=m.find("#slice-"+x+"-"+y+""),"diagonal-topright-bottomleft"==a?j.push(l):"diagonal-bottomleft-topright"==
a&&j.unshift(l);else if("spiral-in"==a||"spiral-out"==a){var F=0;for(i=0,c=e-1,r=b-1;0<=c&&0<=r;i++,c--,r--){for(k=i;k<=c&&!(F==b*e);k++){l={};l.x=k;l.y=i;l.obj=m.find("#slice-"+k+"-"+i+"");"spiral-in"==a?j.push(l):"spiral-out"==a&&j.unshift(l);F++}for(k=i+1;k<=r&&!(F==b*e);k++){l={};l.x=c;l.y=k;l.obj=m.find("#slice-"+c+"-"+k+"");"spiral-in"==a?j.push(l):"spiral-out"==a&&j.unshift(l);F++}for(k=c-1;k>=i&&!(F==b*e);k--){l={};l.x=k;l.y=r;l.obj=m.find("#slice-"+k+"-"+r+"");"spiral-in"==a?j.push(l):"spiral-out"==
a&&j.unshift(l);F++}for(k=r-1;k>i&&!(F==b*e);k--){l={};l.x=i;l.y=k;l.obj=m.find("#slice-"+i+"-"+k+"");"spiral-in"==a?j.push(l):"spiral-out"==a&&j.unshift(l);F++}}}else if("zig-zag-right"==a||"zig-zag-left"==a){l=!0;for(x=0;x<e;x++)if(l){for(y=0;y<b;y++)l={},l.x=x,l.y=y,l.obj=m.find("#slice-"+x+"-"+y+""),"zig-zag-right"==a?j.push(l):"zig-zag-left"==a&&j.unshift(l);l=!1}else{for(y=b-1;0<=y;y--)l={},l.x=x,l.y=y,l.obj=m.find("#slice-"+x+"-"+y+""),"zig-zag-right"==a?j.push(l):"zig-zag-left"==a&&j.unshift(l);
l=!0}}else if("zig-zag-down"==a||"zig-zag-up"==a){l=!0;for(y=0;y<b;y++)if(l){for(x=0;x<e;x++)l={},l.x=x,l.y=y,l.obj=m.find("#slice-"+x+"-"+y+""),"zig-zag-down"==a?j.push(l):"zig-zag-up"==a&&j.unshift(l);l=!1}else{for(x=e-1;0<=x;x--)l={},l.x=x,l.y=y,l.obj=m.find("#slice-"+x+"-"+y+""),"zig-zag-down"==a?j.push(l):"zig-zag-up"==a&&j.unshift(l);l=!0}}else if("chessboard-topleft-bottomright"==a||"chessboard-bottomright-topleft"==a){var F=[],B=[];for(x=0;x<e;x++)for(y=0;y<b;y++){l={};l.x=x;l.y=y;l.obj=m.find("#slice-"+
x+"-"+y+"");var z=!0;1==x%2&&(z=!1);var v=!0;1==y%2&&(v=!1);"chessboard-topleft-bottomright"==a?z&&v||!z&&!v?F.push(l):B.push(l):"chessboard-bottomright-topleft"==a&&(z&&v||!z&&!v?F.unshift(l):B.unshift(l))}j=j.concat(F,B)}else if("chessboard-bottomleft-topright"==a||"chessboard-topright-bottomleft"==a){F=[];B=[];for(x=0;x<e;x++)for(y=b-1;0<=y;y--)l={},l.x=x,l.y=y,l.obj=m.find("#slice-"+x+"-"+y+""),z=!0,1==x%2&&(z=!1),v=!0,1==y%2&&(v=!1),"chessboard-bottomleft-topright"==a?z&&v||!z&&!v?F.push(l):
B.push(l):"chessboard-topright-bottomleft"==a&&(z&&v||!z&&!v?F.unshift(l):B.unshift(l));j=j.concat(B,F)}else if("random"==a){a=[];for(x=0;x<e;x++)for(y=0;y<b;y++)l={},l.x=x,l.y=y,l.obj=m.find("#slice-"+x+"-"+y+""),a.push(l);for(l=0;a.length;)l=Math.floor(Math.random()*(a.length-1)),j.push(a[l]),a.splice(l,1)}e=1;h&&(e=0);h=Y;b=0;"rising"==n?W=h=Y/Z:"queue"==n?(h=Y/2,W=h/Z):"waterfall"==n&&(W=h=Y/Z);for(i=0;i<j.length;i++)l=j[i],"rising"==n&&(h+=W),"waterfall"==n&&(b=i*W),"queue"==n&&(b=i*W),a=qa(d,
g,l.x,l.y,D,E),l.obj.delay(b).animate({width:a.width+"px",height:a.height+"px",left:a.left+"px",top:a.top+"px",opacity:e,rotate:f+"deg"},{duration:h,easing:p,specialEasing:{opacity:s,rotate:u,left:t,top:w,width:A,height:C},complete:function(){m.trigger(ra)}})}function U(a,n){clearTimeout(P);$&&sa();d.ken_burns_for_slides&&Ia();X=0;ta();d.show_titles&&-1!=D&&d.title_hide_callback.call(ea);var g=J(D,"data-video-link");""!=g&&"undefined"!==typeof g&&d.videobutton_hide_callback.call(Q);g={};g.rows=Ja;
g.columns=Ka;g.init_pos=La;g.init_size=Ma;g.dest_pos=Na;g.dest_size=Oa;g.slide_timeout=ja;g.slide_animation=Y;g.init_rotation=Pa;g.final_rotation=ua;g.slice_time_mode=Qa;g.selection_pattern=Ra;g.transition=g;g.easing=Sa;g.rotate_easing=Ta;g.opacity_easing=Ua;g.width_easing=Va;g.height_easing=Wa;g.left_easing=Xa;g.top_easing=Ya;g.spread_factor=h;g.is_hidden=Za;var j=$a,f=J(a,"data-def_transition");""!=f&&"undefined"!==typeof f&&(j=f);if("random"===j)a:{j=Math.floor(Math.random()*(va-1));f=0;for(key in transitions){if(j==
f){j=key;break a}f++}j=void 0}jQuery.extend(g,transitions[j]);for(var e in g)f=J(a,"data-"+e),""!=f&&"undefined"!==typeof f&&(g[e]=f);var b=!1;e=!1;if("in"==K)b=g.is_hidden,e=!1;else if("out"==K)b=!1,e=g.is_hidden;if(n)g.rows=1,g.columns=1,g.init_pos="in-place",g.init_size="all",g.slide_animation=2E3,g.init_rotation=0,b=!0;Z=g.columns*g.rows;ha=0;var j=g.init_pos,f=g.init_size,p=g.init_rotation,s=g.columns,u=g.rows,t=b,b=Math.round(q/s),w=Math.round(o/u),z=1;t&&(z=0);t?m.find(".slices-area").css({overflow:"visible"}):
m.find(".slices-area").css({overflow:"hidden"});for(x=0;x<s;x++)for(y=0;y<u;y++){var v=qa(j,f,x,y,b,w);m.find(".slices-area").append('<div class="slider-slice" id="slice-'+x+"-"+y+'"><div class="slice-content"></div></div>');t=m.find("#slice-"+x+"-"+y+"");t.css({width:v.width+"px",height:v.height+"px",left:v.left+"px",top:v.top+"px",opacity:z});v=C.children("li").eq(a).html();t.find(".slice-content").css({width:q+"px",height:o+"px",left:-(x*b)+"px",top:-(y*w)+"px"}).append(v);t.find(".slice-content div.bk_canvas_underlay").remove();
p!==ua&&ba&&t.rotate(p+"deg")}d.ken_burns_for_slides&&Ga(a);m.find(".slider-slice").show();Ha(g.selection_pattern,g.dest_pos,g.dest_size,g.init_rotation,g.final_rotation,g.columns,g.rows,e,g.slice_time_mode,g.easing,g.opacity_easing,g.rotate_easing,g.left_easing,g.top_easing,g.width_easing,g.height_easing)}function wa(){clearTimeout(P);X=0;if("forward"==d.show_direction)xa();else if("backward"==d.show_direction)ya();else if("random"==d.show_direction){for(var a=Math.floor(Math.random()*(M-1));a==
D;)a=Math.floor(Math.random()*(M-1));za(a)}}function xa(){v=!0;A=D+1;A>M-1&&(A=0);"in"==K?U(A):"out"==K&&(ia(A,!0),U(D))}function ya(){v=!0;A=D-1;0>A&&(A=M-1);"in"==K?U(A):"out"==K&&(ia(A,!0),U(D))}function za(a){0>a||a>M-1||(v=!0,A=a,"in"==K?U(A):"out"==K&&(ia(A,!0),U(D)))}function ka(){X+=10;X>=ja?(v=!0,wa(),d.show_timer&&w&&w.hide()):(ta(),P=setTimeout(function(){ka()},10))}function ta(){if(d.show_timer){var a=100*X/ja;if("line"==d.timer_position){var h=q*a/100;m.find("div.bk-progressbar").css({width:h+
"px"})}else{var g=360*a/100,h=w.width(),j=h/2;50>a?(w.css({clip:"rect(0px,"+h+"px,"+h+"px,"+j+"px)"}),N.css({transform:"rotate("+g+"deg)","-ms-transform":"rotate("+g+"deg)","-webkit-transform":"rotate("+g+"deg)","-o-transform":"rotate("+g+"deg)","-moz-transform":"rotate("+g+"deg)"}),ba||(a=Math.cos(2*Math.PI/360*g),g=Math.sin(2*Math.PI/360*g),N.css("filter","progid:DXImageTransform.Microsoft.Matrix(M11="+a+",M12=-"+g+",M21="+g+",M22="+a+",SizingMethod='auto expand',FilterType='nearest neighbor')"),
N.css("left",-Math.floor((N.width()-h)/2)),N.css("top",-Math.floor((N.height()-h)/2))),L.hide(),N.show()):100>a&&(w.css({clip:"rect(0px,"+h+"px,"+h+"px,0px)"}),g-=180,L.css({transform:"rotate("+g+"deg)","-ms-transform":"rotate("+g+"deg)","-webkit-transform":"rotate("+g+"deg)","-o-transform":"rotate("+g+"deg)","-moz-transform":"rotate("+g+"deg)"}),ba||(a=Math.cos(2*Math.PI/360*g),g=Math.sin(2*Math.PI/360*g),L.css("filter","progid:DXImageTransform.Microsoft.Matrix(M11="+a+",M12=-"+g+",M21="+g+",M22="+
a+",SizingMethod='auto expand',FilterType='nearest neighbor')"),L.css("left",-Math.floor((L.width()-h)/2)),L.css("top",-Math.floor((L.height()-h)/2))),L.show())}}}function na(){R?"classic"==u?m.find("#pp-button").removeClass("classic-play").addClass("classic-pause"):"modern"==u&&m.find("#pp-button").removeClass("modern-play").addClass("modern-pause"):"classic"==u?m.find("#pp-button").removeClass("classic-pause").addClass("classic-play"):"modern"==u&&m.find("#pp-button").removeClass("modern-pause").addClass("modern-play")}
function ab(){P=setTimeout(function(){ka()},10)}function ia(a){if(0>a||a>M-1)a=0;if("none"!=z&&(n.find("a.bk-secondary-nav-item").removeClass("active"),n.find("a.bk-secondary-nav-item").eq(a).addClass("active"),"on_current_bullet"==d.timer_position&&"bullets"==z)){var h=n.find("a.bk-secondary-nav-item").eq(a);h.append(B);B=h.find("div.bk-circular-timer-outerwrap");w=h.find("div.bk-circular-timer-wrap");N=w.find("div.bk-circular-timer-left");L=w.find("div.bk-circular-timer-right");-1!=D&&n.find("a.bk-secondary-nav-item").eq(D).remove("div.bk-circular-timer-outerwrap")}d.ken_burns_for_slides&&
C.children("li").eq(a).find("img.bk_ken_burns_img").not(".bk_canvas_underlay img").each(function(a){var d=t(this).attr("src")+"_"+a,f=t(this).attr("src"),a=S[f].width,f=S[f].height;if("in"==K&&(d=T[d],"undefined"!==typeof d)){shift=d.kenburns_plugin.Current_Shift();var e=shift.trx,b=shift["try"],h=shift.scale;t(this).css({width:a+"px",height:f+"px","-webkit-transform":"translate("+e+"px,"+b+"px) scale("+h+")","-ms-transform":"translate("+e+"px,"+b+"px) scale("+h+")","-o-transform":"translate("+e+
"px,"+b+"px) scale("+h+")","-moz-transform":"translate("+e+"px,"+b+"px) scale("+h+")",transform:"translate("+e+"px,"+b+"px) scale("+h+")","-webkit-transform-origin":"0px 0px","-moz-transform-origin":"0px 0px","-o-transform-origin":"0px 0px","-ms-transform-origin":"0px 0px","transform-origin":"0px 0px"});d.kenburns_plugin.Start()}});C.children("li").eq(a).show();C.children("li").not(":eq("+a+")").hide();bb(a);h=J(a,"data-video-link");""!=h&&"undefined"!==typeof h&&d.videobutton_show_callback.call(Q);
return a}function Ia(){for(index=0;index<M;index++)C.children("li").eq(index).find("img.bk_ken_burns_img").not(".bk_canvas_underlay img").each(function(a){a=t(this).attr("src")+"_"+a;"undefined"!==typeof T[a]&&T[a].kenburns_plugin.Pause()})}function bb(a){C.children("li").not(":eq("+a+")").find("div.bk_canvas_underlay").remove()}function cb(){var a=J(D,"data-title");""!=a&&void 0!=a&&(ea.empty().append(a),d.title_show_callback.call(ea))}function db(){var a=J(D,"data-video-link");if(""!=a&&"undefined"!==
typeof a){if(a.match(/http:\/\/www.youtube.com\//))C.children("li").eq(D).append('<iframe id="bk-diamond-embedded-player" width="'+q+'" height="'+o+'" src="'+a+'?autoplay=1" frameborder="0" allowfullscreen></iframe>');else if(a.match(/http:\/\/player.vimeo.com\//))C.children("li").eq(D).append('<iframe id="bk-diamond-embedded-player" width="'+q+'" height="'+o+'" src="'+a+'?autoplay=1" frameborder="0" allowfullscreen></iframe>');else return;$=!0;clearTimeout(P);Q.removeClass("play").addClass("close");
d.ken_burns_for_slides&&C.children("li").eq(D).find("img.bk_ken_burns_img").not(".bk_canvas_underlay img").each(function(a){a=t(this).attr("src")+"_"+a;a=T[a];"undefined"!==typeof a&&a.kenburns_plugin.Pause()})}}function sa(){C.children("li").eq(D).find("#bk-diamond-embedded-player").remove();$=!1;Q.removeClass("close").addClass("play");d.ken_burns_for_slides&&C.children("li").eq(D).find("img.bk_ken_burns_img").not(".bk_canvas_underlay img").each(function(a){a=t(this).attr("src")+"_"+a;a=T[a];"undefined"!==
typeof a&&a.kenburns_plugin.Play()})}function Fa(){Q.click(function(){$?sa():db()});m.live(ra,function(){ha++;ha==Z&&(ha=0,D=ia(A,!1),d.show_titles&&cb(),m.find(".slider-slice").remove(),d.show_timer&&w&&w.show(),v=!1,R&&d.interactive_while_playing&&!aa&&setTimeout(function(){ka()},10))});m.mouseenter(function(){aa=!0;R&&Aa&&d.interactive_while_playing&&!v&&clearTimeout(P);if(d.auto_hide_primary_nav){clearTimeout(Ba);var a="#pp-button, #next-button, #prev-button";"modern"==u&&(a="#next-button, #prev-button");
m.find(a).stop();m.find(a).fadeTo(d.auto_hide_primary_time,1)}if(d.auto_hide_secondary_nav&&("thumbs"==d.socondary_nav_type||"bullets"==d.socondary_nav_type))clearTimeout(Ca),d.auto_show_secondary_callback.call(s);return!0});m.mouseleave(function(){aa=!1;R&&Aa&&d.interactive_while_playing&&!v&&!$&&ab();d.auto_hide_primary_nav&&(Ba=setTimeout(function(){if(!aa){var a="#pp-button, #next-button, #prev-button";"modern"==u&&(a="#next-button, #prev-button");m.find(a).stop();m.find(a).fadeOut(d.auto_hide_primary_time)}},
d.auto_hide_primary_nav_delay));if(d.auto_hide_secondary_nav&&("thumbs"==d.socondary_nav_type||"bullets"==d.socondary_nav_type))Ca=setTimeout(function(){if(!aa&&("thumbs"==d.socondary_nav_type||"bullets"==d.socondary_nav_type))s.stop(),d.auto_hide_secondary_callback.call(s)},d.auto_hide_secondary_nav_delay);return!0});m.find("div.bk-diamond-secondary-nav .bk-thumb-img-frame").mouseenter(function(){if(d.show_thumb_titles){var a=t(this).find("div.bk-thumb-title");d.thumb_title_show_callback.call(a)}});
m.find("div.bk-diamond-secondary-nav .bk-thumb-img-frame").mouseleave(function(){if(d.show_thumb_titles){var a=t(this).find("div.bk-thumb-title");d.thumb_title_hide_callback.call(a)}});m.find("#pp-button").click(function(){v||(R=!R,na(),R?wa():clearTimeout(P))});m.find("#next-button").click(function(){v||xa()});m.find("#prev-button").click(function(){v||ya()});m.find("div.bk-diamond-secondary-nav .bk-secondary-nav-item").click(function(){if(!v){var a=parseInt(jQuery(this).attr("rel"));a!=D&&za(a)}});
m.find("div.bk-sec-top").live("click",function(){var a=ca;n.position().top+a>=t(this).outerHeight(!0)&&(a=-1*n.position().top+t(this).outerHeight(!0));0>a&&(a=0);n.stop();n.animate({top:"+="+a},"fast","swing")});m.find("div.bk-sec-bottom").live("click",function(){var a=ca;n.position().top+n.height()-a<=o-t(this).outerHeight(!0)&&(a=n.position().top+n.height()-o+t(this).outerHeight(!0));0>a&&(a=0);n.stop();n.animate({top:"-="+a},"fast","swing")});m.find("div.bk-sec-left").live("click",function(){var a=
da;n.position().left+a>=t(this).outerWidth(!0)&&(a=-1*n.position().left+t(this).outerWidth(!0));0>a&&(a=0);n.stop();n.animate({left:"+="+a},"fast","easeOutBack")});m.find("div.bk-sec-right").live("click",function(){var a=da;n.position().left+n.width()-a<=q-t(this).outerWidth(!0)&&(a=n.position().left+n.width()-q+t(this).outerWidth(!0));0>a&&(a=0);n.stop();n.animate({left:"-="+a},"fast","easeOutBack")})}var Ja=d.rows,Ka=d.columns,La=d.init_pos,Ma=d.init_size,Na=d.dest_pos,Oa=d.dest_size,ja=d.slide_timeout,
Y=d.slide_animation,Pa=d.init_rotation,ua=d.final_rotation,Qa=d.slice_time_mode,Ra=d.selection_pattern,$a=d.def_transition,Sa=d.easing,Ta=d.rotate_easing,Ua=d.opacity_easing,Va=d.width_easing,Wa=d.height_easing,Xa=d.left_easing,Ya=d.top_easing,h=d.spread_factor,Za=!0,ba=!0,Aa=d.pause_on_hover,q=0,o=0,D=0,A=0,X=0,Z=0,ha=0,W=300,C=m.children("ul"),M=C.children("li").size(),ra="slice_anim_finished",R=!1,P=null,aa=!1,v=!1,u=d.theme,K=d.run_transition_on,z=d.socondary_nav_type,p=d.secondary_nav_pos,s=
null,n=null,da=null,ca=null,Ba=null,Ca=null,B=null,w=null,N=null,L=null,ea=null,la={},T={},S={},V={},H=0,Q=null,$=!1,va=0;for(key in transitions)transitions.hasOwnProperty(key)&&va++;jQuery.browser.webkit&&"complete"!=document.readyState?setTimeout(arguments.callee,100):(C.hide(),function(){d.ken_burns_for_slides&&(H+=C.children("li").find("img.bk_ken_burns_img").size(),C.children("li").each(function(){t(this).find("img.bk_ken_burns_img").each(function(){var a=new Image,d=t(this).attr("src");S[d]=
!1;a.onload=function(){H--;var a={};a.width=this.width;a.height=this.height;S[d]=a};a.onerror=function(){H--};a.src=d})}));d.ken_burns_for_thumbs&&(H+=M,C.children("li").each(function(){var a=t(this).attr("data-thumb");if(""!=a&&void 0!=a){var d=new Image;V[a]=!1;d.onload=function(){H--;var d={};d.width=this.width;d.height=this.height;V[a]=d};d.onerror=function(){H--};d.src=a}else H--}));Da()}())})}})(jQuery);

