(function($){var a=0,skitters=[];$.fn.skitter=function(a){return this.each(function(){if($(this).data('skitter_number')==undefined){$(this).data('skitter_number',a);skitters.push(new c(this,a,a));++a}})};var b={velocity:1,interval:2500,animation:'',numbers:true,navigation:true,label:true,easing_default:'',box_skitter:null,time_interval:null,images_links:null,image_atual:null,link_atual:null,label_atual:null,target_atual:'_self',width_skitter:null,height_skitter:null,image_i:1,is_animating:false,is_hover_box_skitter:false,random_ia:null,show_randomly:false,thumbs:false,animatenumberout:false,animatenumberover:false,animatenumberactive:false,hidetools:false,fullscreen:false,xml:false,dots:false,width_label:null,opacity_elements:0.75,interval_in_elements:200,interval_out_elements:300,onload:null,imageswitched:null,max_number_height:20,numbers_align:'center',preview:false,focus:false,foucs_active:false,focus_position:'center',controls:false,controls_position:'center',progressbar:false,progressbar_css:{},is_paused:false,is_blur:false,is_paused_time:false,timestart:0,elapsedtime:0,stop_over:true,enable_navigation_keys:false,with_animations:[],mouseoverbutton:null,mouseoutbutton:null,auto_play:true,labelanimation:'slideup',theme:'clean',structure:'prev'+'next'+''+'
'+'
'+''+'
'+'
'+'
'};$.skitter=function(a,b,c){this.box_skitter=$(a);this.timer=null;this.settings=$.extend({},b,b||{});this.number_skitter=c;this.setup()};var c=$.skitter;c.fn=c.prototype={};c.fn.extend=$.extend;c.fn.extend({setup:function(){var h=this;if(this.settings.fullscreen){var j=$(window).width();var k=$(window).height();this.box_skitter.width(j).height(k);this.box_skitter.css({'position':'absolute','top':0,'left':0,'z-index':1000});this.settings.stop_over=false;$('body').css({'overflown':'hidden'})}this.settings.width_skitter=parsefloat(this.box_skitter.css('width'));this.settings.height_skitter=parsefloat(this.box_skitter.css('height'));if(!this.settings.width_skitter||!this.settings.height_skitter){console.warn('width or height size is null! - skitter slideshow');return false}if(this.settings.theme){this.box_skitter.addclass('skitter-'+this.settings.theme)}this.box_skitter.append(this.settings.structure);this.settings.easing_default=this.geteasing(this.settings.easing);if(this.settings.velocity>=2)this.settings.velocity=1.3;if(this.settings.velocity<=0)this.settings.velocity=1;this.box_skitter.find('.info_slide').hide();this.box_skitter.find('.label_skitter').hide();this.box_skitter.find('.prev_button').hide();this.box_skitter.find('.next_button').hide();this.box_skitter.find('.container_skitter').width(this.settings.width_skitter);this.box_skitter.find('.container_skitter').height(this.settings.height_skitter);var l=this.settings.width_label?this.settings.width_label:this.settings.width_skitter;this.box_skitter.find('.label_skitter').width(l);var m=' image_number_select',u=0;this.settings.images_links=new array();var n=function(a,b,c,d,e){h.settings.images_links.push([b,a,c,d,e]);if(h.settings.thumbs){var f='';if(h.settings.width_skitter>h.settings.height_skitter){f='height="100"'}else{f='width="100"'}h.box_skitter.find('.info_slide').append(''+''+' ')}else{h.box_skitter.find('.info_slide').append(''+u+' ')}m=''};if(this.settings.xml){$.ajax({type:'get',url:this.settings.xml,async:false,datatype:'xml',success:function(f){var g=$('');$(f).find('skitter slide').each(function(){++u;var a=($(this).find('link').text())?$(this).find('link').text():'#';var b=$(this).find('image').text();var c=$(this).find('image').attr('type');var d=$(this).find('label').text();var e=($(this).find('target').text())?$(this).find('target').text():'_self';n(a,b,c,d,e)})}})}else if(this.settings.json){}else{this.box_skitter.find('ul li').each(function(){++u;var a=($(this).find('a').length)?$(this).find('a').attr('href'):'#';var b=$(this).find('img').attr('src');var c=$(this).find('img').attr('class');var d=$(this).find('.label_text').html();var e=($(this).find('a').length&&$(this).find('a').attr('target'))?$(this).find('a').attr('target'):'_self';n(a,b,c,d,e)})}if(h.settings.thumbs&&!h.settings.fullscreen){h.settings.animatenumberout={opacity:0.3};h.settings.animatenumberover={opacity:0.5};h.settings.animatenumberactive={opacity:1};h.box_skitter.find('.info_slide').addclass('info_slide_thumb');var o=(u+1)*h.box_skitter.find('.info_slide_thumb .image_number').width();h.box_skitter.find('.info_slide_thumb').width(o);h.box_skitter.css({height:h.box_skitter.height()+h.box_skitter.find('.info_slide').height()});h.box_skitter.append('
');var p=h.box_skitter.find('.info_slide').clone();h.box_skitter.find('.info_slide').remove();h.box_skitter.find('.container_thumbs').width(h.settings.width_skitter).append(p);var q=0,width_skitter=this.settings.width_skitter,height_skitter=this.settings.height_skitter,w_info_slide_thumb=0,info_slide_thumb=h.box_skitter.find('.info_slide_thumb'),x_value=0,y_value=h.box_skitter.offset().top;info_slide_thumb.find('.image_number').each(function(){q+=$(this).outerwidth()});info_slide_thumb.width(q+'px');w_info_slide_thumb=info_slide_thumb.width();width_value=this.settings.width_skitter;width_value=width_skitter-100;if(o>h.settings.width_skitter){h.box_skitter.mousemove(function(e){x_value=h.box_skitter.offset().left+90;var x=e.pagex,y=e.pagey,new_x=0;x=x-x_value;y=y-y_value;novo_width=w_info_slide_thumb-width_value;new_x=-((novo_width*x)/width_value);if(new_x>0)new_x=0;if(new_x<-(w_info_slide_thumb-width_skitter))new_x=-(w_info_slide_thumb-width_skitter);if(y>height_skitter){info_slide_thumb.css({left:new_x})}})}h.box_skitter.find('.scroll_thumbs').css({'left':10});if(o20){h.box_skitter.find('.info_slide').hide()}}}this.box_skitter.find('ul').hide();if(this.settings.show_randomly)this.settings.images_links.sort(function(a,b){return math.random()-0.5});this.settings.image_atual=this.settings.images_links[0][0];this.settings.link_atual=this.settings.images_links[0][1];this.settings.label_atual=this.settings.images_links[0][3];this.settings.target_atual=this.settings.images_links[0][4];if(this.settings.images_links.length>1){this.box_skitter.find('.prev_button').click(function(){if(h.settings.is_animating==false){h.settings.image_i-=2;if(h.settings.image_i==-2){h.settings.image_i=h.settings.images_links.length-2}else if(h.settings.image_i==-1){h.settings.image_i=h.settings.images_links.length-1}h.jumptoimage(h.settings.image_i)}return false});this.box_skitter.find('.next_button').click(function(){h.jumptoimage(h.settings.image_i);return false});h.box_skitter.find('.next_button, .prev_button').bind('mouseover',h.settings.mouseoverbutton);h.box_skitter.find('.next_button, .prev_button').bind('mouseleave',h.settings.mouseoutbutton);this.box_skitter.find('.image_number').hover(function(){if($(this).attr('class')!='image_number image_number_select'){if(h.settings.animatenumberover){$(this).stop().animate(h.settings.animatenumberover,300)}}},function(){if($(this).attr('class')!='image_number image_number_select'){if(h.settings.animatenumberout){$(this).stop().animate(h.settings.animatenumberout,500)}}});this.box_skitter.find('.image_number').click(function(){if($(this).attr('class')!='image_number image_number_select'){var a=parseint($(this).attr('rel'));h.jumptoimage(a)}return false});if(h.settings.animatenumberout){this.box_skitter.find('.image_number').css(h.settings.animatenumberout)}if(h.settings.animatenumberactive){this.box_skitter.find('.image_number:eq(0)').css(h.settings.animatenumberactive)}if(h.settings.preview&&h.settings.dots){var t=$('
');for(var i=0;i');var w=$('');w.attr('src',this.settings.images_links[i][0]);v.append(w);t.find('ul').append(v)}var z=parseint(this.settings.images_links.length*100);t.find('ul').width(z);$(r).append(t);h.box_skitter.find(r).find('.image_number').mouseenter(function(){var a=parsefloat(h.box_skitter.find(r).offset().left);var b=parsefloat($(this).offset().left);var c=(b-a)-43;var d=parseint($(this).attr('rel'));var e=h.box_skitter.find('.preview_slide_current img').attr('src');var f=-(d*100);h.box_skitter.find('.preview_slide').find('ul').animate({left:f},{duration:200,queue:false,easing:'easeoutsine'});h.box_skitter.find('.preview_slide').fadeto(1,1).animate({left:c},{duration:200,queue:false})});h.box_skitter.find(r).mouseleave(function(){$('.preview_slide').animate({opacity:'hide'},{duration:200,queue:false})})}}if(h.settings.focus){h.focusskitter()}if(h.settings.controls){h.setcontrols()}if(h.settings.progressbar&&h.settings.auto_play){h.addprogressbar()}if(h.settings.hidetools){h.hidetools()}if(h.settings.enable_navigation_keys){h.enablenavigationkeys()}this.loadimages()},loadimages:function(){var d=this;var e=$('
loading
');this.box_skitter.append(e);var f=this.settings.images_links.length;var u=0;$.each(this.settings.images_links,function(i){var a=this;var b=$('');b.css({position:'absolute',top:'-9999em'});d.box_skitter.append(b);var c=new image();$(c).load(function(){++u;if(u==f){d.box_skitter.find('.loading').remove();d.box_skitter.find('.image_loading').remove();d.start()}}).error(function(){d.box_skitter.find('.loading, .image_loading, .image_number, .next_button, .prev_button').remove();d.box_skitter.html('

error loading images. one or more images were not found.

')}).attr('src',a[0])})},start:function(){var a=this;var b=false;if(this.settings.numbers||this.settings.thumbs)this.box_skitter.find('.info_slide').fadein(500);if(this.settings.dots)this.box_skitter.find('.info_slide_dots').fadein(500);if(this.settings.label)this.box_skitter.find('.label_skitter').show();if(this.settings.navigation){this.box_skitter.find('.prev_button').fadein(500);this.box_skitter.find('.next_button').fadein(500)}if(a.settings.auto_play){a.starttime()}a.windowfocusout();a.setlinkatual();a.box_skitter.find('.image a img').attr({'src':a.settings.image_atual});img_link=a.box_skitter.find('.image a');img_link=a.resizeimage(img_link);img_link.find('img').fadein(1500);a.setvalueboxtext();a.showboxtext();if(a.settings.auto_play){a.stoponmouseover()}var c=function(){if(a.settings.stop_over){b=true;a.settings.is_hover_box_skitter=true;a.cleartimer(true);a.pauseprogressbar()}};a.box_skitter.mouseover(c);a.box_skitter.find('.next_button').mouseover(c);if(a.settings.images_links.length>1&&!b){if(a.settings.auto_play){a.timer=settimeout(function(){a.nextimage()},a.settings.interval)}}else{a.box_skitter.find('.loading, .image_loading, .image_number, .next_button, .prev_button').remove()}if($.isfunction(a.settings.onload))a.settings.onload(a)},jumptoimage:function(a){if(this.settings.is_animating==false){this.settings.elapsedtime=0;this.box_skitter.find('.box_clone').stop();this.cleartimer(true);this.settings.image_i=math.floor(a);this.box_skitter.find('.image a').attr({'href':this.settings.link_atual});this.box_skitter.find('.image_main').attr({'src':this.settings.image_atual});this.box_skitter.find('.box_clone').remove();this.nextimage()}},nextimage:function(){var a=this;animations_functions=['cube','cuberandom','block','cubestop','cubestoprandom','cubehide','cubesize','horizontal','showbars','showbarsrandom','tube','fade','fadefour','paralell','blind','blindheight','blindwidth','directiontop','directionbottom','directionright','directionleft','cubespread','glasscube','glassblock','circles','circlesinside','circlesrotate','cubeshow','upbars','downbars','hidebars','swapbars','swapbarsback','swapblocks','cut'];if(a.settings.progressbar)a.hideprogressbar();animation_type=(this.settings.animation==''&&this.settings.images_links[this.settings.image_i][2])?this.settings.images_links[this.settings.image_i][2]:(this.settings.animation==''?'default':this.settings.animation);if(animation_type=='randomsmart'){if(!this.settings.random_ia){animations_functions.sort(function(){return 0.5-math.random()});this.settings.random_ia=animations_functions}animation_type=this.settings.random_ia[this.settings.image_i]}else if(animation_type=='random'){var b=parseint(math.random()*animations_functions.length);animation_type=animations_functions[b]}else if(a.settings.with_animations.length>0){var c=a.settings.with_animations.length;if(this.settings._i_animation==undefined){this.settings._i_animation=0}animation_type=a.settings.with_animations[this.settings._i_animation];++this.settings._i_animation;if(this.settings._i_animation>=c)this.settings._i_animation=0}switch(animation_type){case'cube':this.animationcube();break;case'cuberandom':this.animationcube({random:true});break;case'block':this.animationblock();break;case'cubestop':this.animationcubestop();break;case'cubestoprandom':this.animationcubestop({random:true});break;case'cubehide':this.animationcubehide();break;case'cubesize':this.animationcubesize();break;case'horizontal':this.animationhorizontal();break;case'showbars':this.animationshowbars();break;case'showbarsrandom':this.animationshowbars({random:true});break;case'tube':this.animationtube();break;case'fade':this.animationfade();break;case'fadefour':this.animationfadefour();break;case'paralell':this.animationparalell();break;case'blind':this.animationblind();break;case'blindheight':this.animationblinddimension({height:true});break;case'blindwidth':this.animationblinddimension({height:false,time_animate:400,delay:50});break;case'directiontop':this.animationdirection({direction:'top'});break;case'directionbottom':this.animationdirection({direction:'bottom'});break;case'directionright':this.animationdirection({direction:'right',total:5});break;case'directionleft':this.animationdirection({direction:'left',total:5});break;case'cubespread':this.animationcubespread();break;case'cubejelly':this.animationcubejelly();break;case'glasscube':this.animationglasscube();break;case'glassblock':this.animationglassblock();break;case'circles':this.animationcircles();break;case'circlesinside':this.animationcirclesinside();break;case'circlesrotate':this.animationcirclesrotate();break;case'cubeshow':this.animationcubeshow();break;case'upbars':this.animationdirectionbars({direction:'top'});break;case'downbars':this.animationdirectionbars({direction:'bottom'});break;case'hidebars':this.animationhidebars();break;case'swapbars':this.animationswapbars();break;case'swapbarsback':this.animationswapbars({easing:'easeoutback'});break;case'swapblocks':this.animationswapblocks();break;case'cut':this.animationcut();break;default:this.animationtube();break}},animationcube:function(a){var b=this;var a=$.extend({},{random:false},a||{});this.settings.is_animating=true;var c=(this.settings.easing_default=='')?'easeoutexpo':this.settings.easing_default;var d=700/this.settings.velocity;this.setactuallevel();var e=math.ceil(this.settings.width_skitter/(this.settings.width_skitter/8));var f=math.ceil(this.settings.height_skitter/(this.settings.height_skitter/3));var g=e*f;var h=math.ceil(this.settings.width_skitter/e);var j=math.ceil(this.settings.height_skitter/f);var k=this.settings.height_skitter+200;var l=this.settings.height_skitter+200;var m=0;var n=0;for(i=0;i0&&n==0){u=u+2}u++}l=(i%2==0)?l:-l;m=(i%2==0)?m:-m;var p=l+(k*n);var q=(m+(j*o));var r=-(k*n);var s=-(j*o);var t=p-50;var v=q-50;var w=this.getboxcloneimgold(e);w.css({left:q+'px',top:p+'px',width:j,height:k});w.find('img').css({left:s,top:r});this.addboxclone(w);w.show();var x=(50*i);var y=(i==(h-1))?function(){b.finishanimation()}:'';w.delay(x).animate({width:'+=100px',height:'+=100px',top:'-=20px',left:'-=20px',opacity:'hide'},d,c,y);n++;if(n==g){n=0;o++}}},animationcubesize:function(a){var b=this;this.settings.is_animating=true;var c=(this.settings.easing_default=='')?'easeinoutquad':this.settings.easing_default;var d=600/this.settings.velocity;var e=this.box_skitter.find('.image_main').attr('src');this.setactuallevel();this.setlinkatual();this.box_skitter.find('.image_main').attr({'src':this.settings.image_atual});var f=math.ceil(this.settings.width_skitter/(this.settings.width_skitter/8));var g=math.ceil(this.settings.height_skitter/(this.settings.height_skitter/3));var h=f*g;var j=math.ceil(this.settings.width_skitter/f);var k=math.ceil(this.settings.height_skitter/g);var l=0;var m=0;var n=0;var o=0;var p=math.ceil(this.settings.width_skitter/6);for(i=0;i((e/2)-1)){l=((i-(e/2))*200)}l=l/2.5;var m=(i==(e-1))?function(){b.finishanimation()}:'';k.delay(l).animate({top:j+'px',left:h+'px',opacity:'show'},d,c,m)}},animationblind:function(a){var b=this;var a=$.extend({},{height:false},a||{});this.settings.is_animating=true;var c=(this.settings.easing_default=='')?'easeoutquad':this.settings.easing_default;var d=400/this.settings.velocity;this.setactuallevel();var e=math.ceil(this.settings.width_skitter/(this.settings.width_skitter/16));var f=math.ceil(this.settings.width_skitter/e);var g=this.settings.height_skitter;for(i=0;i((e/2)-1)){l=((i-(e/2))*200)}var m=(i==(e-1))?function(){b.finishanimation()}:''}else{if(i<=((e/2)-1)){l=200+(i*200)}else if(i>((e/2)-1)){l=(((e/2)-i)*200)+(e*100)}var m=(i==(e/2))?function(){b.finishanimation()}:''}l=l/2.5;if(!a.height){k.delay(l).animate({opacity:'show',top:j+'px',left:h+'px',width:'show'},d,c,m)}else{d=d+(i*2);var c='easeoutquad';k.delay(l).animate({opacity:'show',top:j+'px',left:h+'px',height:'show'},d,c,m)}}},animationblinddimension:function(a){var b=this;var a=$.extend({},{height:true,time_animate:500,delay:100},a||{});this.settings.is_animating=true;var c=(this.settings.easing_default=='')?'easeoutquad':this.settings.easing_default;var d=a.time_animate/this.settings.velocity;this.setactuallevel();var e=math.ceil(this.settings.width_skitter/(this.settings.width_skitter/16));var f=math.ceil(this.settings.width_skitter/e);var g=this.settings.height_skitter;for(i=0;i');a.attr({'target':this.settings.target_atual})}else{var a=$('')}a=this.resizeimage(a);var b=$('
');b.append(a);return b},getboxcloneimgold:function(a){if(this.settings.link_atual!='#'){var b=$('');b.attr({'target':this.settings.target_atual})}else{var b=$('')}b=this.resizeimage(b);var c=$('
');c.append(b);return c},resizeimage:function(a){if(this.settings.fullscreen){a.find('img').height(this.settings.height_skitter)}return a},addboxclone:function(a){this.box_skitter.find('.container_skitter').append(a)},geteasing:function(a){var b=['easeinquad','easeoutquad','easeinoutquad','easeincubic','easeoutcubic','easeinoutcubic','easeinquart','easeoutquart','easeinoutquart','easeinquint','easeoutquint','easeinoutquint','easeinsine','easeoutsine','easeinoutsine','easeinexpo','easeoutexpo','easeinoutexpo','easeincirc','easeoutcirc','easeinoutcirc','easeinelastic','easeoutelastic','easeinoutelastic','easeinback','easeoutback','easeinoutback','easeinbounce','easeoutbounce','easeinoutbounce',];if(jquery.inarray(a,b)>0){return a}else{return''}},getrandom:function(i){return math.floor(math.random()*i)},setvalueboxtext:function(){this.box_skitter.find('.label_skitter').html(this.settings.label_atual)},showboxtext:function(){var a=this;if(this.settings.label_atual!=undefined&&this.settings.label_atual!=''&&a.settings.label){switch(a.settings.labelanimation){case'slideup':default:a.box_skitter.find('.label_skitter').slidedown(400);break;case'left':case'right':a.box_skitter.find('.label_skitter').animate({left:0},400,'easeinoutquad');break;case'fixed':break}}},hideboxtext:function(){var a=this;switch(a.settings.labelanimation){case'slideup':default:this.box_skitter.find('.label_skitter').slideup(200,function(){a.setvalueboxtext()});break;case'left':case'right':var b=(a.settings.labelanimation=='left')?-(a.box_skitter.find('.label_skitter').width()):(a.box_skitter.find('.label_skitter').width());a.box_skitter.find('.label_skitter').animate({left:b},400,'easeinoutquad',function(){a.setvalueboxtext()});break;case'fixed':a.setvalueboxtext();break}},stoponmouseover:function(){var a=this;if(a.settings.stop_over){a.box_skitter.hover(function(){if(a.settings.stop_over)a.settings.is_hover_box_skitter=true;if(!a.settings.is_paused_time){a.pausetime()}a.sethidetools('hover');a.cleartimer(true)},function(){if(a.settings.stop_over)a.settings.is_hover_box_skitter=false;if(a.settings.elapsedtime==0&&!a.settings.is_animating&&!a.settings.is_paused){a.starttime()}else if(!a.settings.is_paused){a.resumetime()}a.sethidetools('out');a.cleartimer(true);if(!a.settings.is_animating&&a.settings.images_links.length>1){a.timer=settimeout(function(){a.completemove()},a.settings.interval-a.settings.elapsedtime);a.box_skitter.find('.image_main').attr({'src':a.settings.image_atual});a.box_skitter.find('.image a').attr({'href':a.settings.link_atual})}})}else{a.box_skitter.hover(function(){a.sethidetools('hover')},function(){a.sethidetools('out')})}},sethidetools:function(a){var b=this;var c=b.settings.opacity_elements;var d=b.settings.interval_in_elements;var e=b.settings.interval_out_elements;if(a=='hover'){if(b.settings.hidetools){if(b.settings.numbers){b.box_skitter.find('.info_slide').show().css({opacity:0}).animate({opacity:c},d)}if(b.settings.navigation){b.box_skitter.find('.prev_button, .next_button').show().css({opacity:0}).animate({opacity:c},d)}if(b.settings.focus&&!b.settings.foucs_active){b.box_skitter.find('.focus_button').stop().show().css({opacity:0}).animate({opacity:c},d)}if(b.settings.controls){b.box_skitter.find('.play_pause_button').stop().show().css({opacity:0}).animate({opacity:c},d)}}if(b.settings.focus&&!b.settings.foucs_active&&!b.settings.hidetools){b.box_skitter.find('.focus_button').stop().animate({opacity:1},d)}if(b.settings.controls&&!b.settings.hidetools){b.box_skitter.find('.play_pause_button').stop().animate({opacity:1},d)}}else{if(b.settings.hidetools){if(b.settings.numbers){b.box_skitter.find('.info_slide').queue("fx",[]).show().css({opacity:c}).animate({opacity:0},e)}if(b.settings.navigation){b.box_skitter.find('.prev_button, .next_button').queue("fx",[]).show().css({opacity:c}).animate({opacity:0},e)}if(b.settings.focus&&!b.settings.foucs_active){b.box_skitter.find('.focus_button').stop().css({opacity:c}).animate({opacity:0},e)}if(b.settings.controls){b.box_skitter.find('.play_pause_button').stop().css({opacity:c}).animate({opacity:0},e)}}if(b.settings.focus&&!b.settings.foucs_active&&!b.settings.hidetools){b.box_skitter.find('.focus_button').stop().animate({opacity:0.3},e)}if(b.settings.controls&&!b.settings.hidetools){b.box_skitter.find('.play_pause_button').stop().animate({opacity:0.3},e)}}},cleartimer:function(a){var b=this;clearinterval(b.timer)},setlinkatual:function(){if(this.settings.link_atual!='#'&&this.settings.link_atual!=''){this.box_skitter.find('.image a').attr({'href':this.settings.link_atual,'target':this.settings.target_atual})}else{this.box_skitter.find('.image a').removeattr('href')}},hidetools:function(){this.box_skitter.find('.info_slide').fadeto(0,0);this.box_skitter.find('.prev_button').fadeto(0,0);this.box_skitter.find('.next_button').fadeto(0,0);this.box_skitter.find('.focus_button').fadeto(0,0);this.box_skitter.find('.play_pause_button').fadeto(0,0)},focusskitter:function(){var d=this;var f=$('focus');d.box_skitter.append(f);var g=(d.settings.width_skitter-f.width())/2;var h=0;if(d.settings.controls)g-=25;if(d.settings.controls_position==d.settings.focus_position)h=f.width()+5;var i={left:g};switch(d.settings.focus_position){case'lefttop':i={left:5+h,top:30};break;case'righttop':i={right:5+h,top:30};break;case'leftbottom':i={left:5+h,bottom:5,top:'auto'};break;case'rightbottom':i={right:5+h,bottom:5,top:'auto'};break}f.css(i).animate({opacity:0.3},d.settings.interval_in_elements);$(document).keypress(function(e){var a=(e.keycode?e.keycode:e.which);if(a==27)$('#overlay_skitter').trigger('click')});var j=$('.box_skitter').offset().top;var g=$('.box_skitter').offset().left;d.box_skitter.find('.focus_button').click(function(){if(d.settings.foucs_active)return false;d.settings.foucs_active=true;$(this).stop().animate({opacity:0},d.settings.interval_out_elements);var a=$('
').height($(document).height()).hide().fadeto(d.settings.interval_in_elements,0.98);var b=(($(window).height()-$('.box_skitter').height())/2)+$(document).scrolltop();var c=($(window).width()-$('.box_skitter').width())/2;d.box_skitter.before('
');$('body').prepend(a);$('body').prepend(d.box_skitter);d.box_skitter.css({'top':j,'left':g,'position':'absolute','z-index':9999}).animate({'top':b,'left':c},2000,'easeoutexpo');$('#mark_position').width($('.box_skitter').width()).height($('.box_skitter').height()).css({'background':'none'}).fadeto(300,0.3);return false});$('#overlay_skitter').live('click',function(){if($(this).hasclass('finish_overlay_skitter'))return false;d.settings.foucs_active=false;$(this).addclass('finish_overlay_skitter');if(!d.settings.hidetools)d.box_skitter.find('.focus_button').animate({opacity:0.3},200);d.box_skitter.stop().animate({'top':j,'left':g},200,'easeoutexpo',function(){$('#mark_position').before(d.box_skitter);$(this).css({'position':'relative','top':0,'left':0});$('#mark_position').remove()});$('#overlay_skitter').fadeto(d.settings.interval_out_elements,0,function(){$(this).remove()});return false})},setcontrols:function(){var a=this;var b=$('pause');a.box_skitter.append(b);var c=(a.settings.width_skitter-b.width())/2;if(a.settings.focus)c+=25;var d={left:c};switch(a.settings.controls_position){case'lefttop':d={left:5,top:30};break;case'righttop':d={right:5,top:30};break;case'leftbottom':d={left:5,bottom:5,top:'auto'};break;case'rightbottom':d={right:5,bottom:5,top:'auto'};break}b.css(d).animate({opacity:0.3},a.settings.interval_in_elements);b.click(function(){if(!a.settings.is_paused){$(this).html('play');$(this).fadeto(100,0.5).fadeto(100,1);$(this).addclass('play_button');a.pausetime();a.settings.is_paused=true;a.cleartimer(true)}else{if(!a.settings.is_animating&&!a.box_skitter.find('.progressbar').is(':visible')){a.settings.elapsedtime=0}else{a.resumetime()}if(!a.settings.progressbar)a.resumetime();a.settings.is_paused=false;$(this).html('pause');$(this).fadeto(100,0.5).fadeto(100,1);$(this).removeclass('play_button');if(!a.settings.stop_over){a.cleartimer(true);if(!a.settings.is_animating&&a.settings.images_links.length>1){a.timer=settimeout(function(){a.completemove()},a.settings.interval-a.settings.elapsedtime);a.box_skitter.find('.image_main').attr({'src':a.settings.image_atual});a.box_skitter.find('.image a').attr({'href':a.settings.link_atual})}}}return false})},objectsize:function(a){var b=0,key;for(key in a){if(a.hasownproperty(key))b++}return b},addprogressbar:function(){var a=this;var b=$('
');a.box_skitter.append(b);if(a.objectsize(a.settings.progressbar_css)==0){if(parseint(b.css('width'))>0){a.settings.progressbar_css.width=parseint(b.css('width'))}else{a.settings.progressbar_css={width:a.settings.width_skitter,height:5}}}if(a.objectsize(a.settings.progressbar_css)>0&&a.settings.progressbar_css.width==undefined){a.settings.progressbar_css.width=a.settings.width_skitter}b.css(a.settings.progressbar_css).hide()},startprogressbar:function(){var a=this;if(a.settings.is_hover_box_skitter||a.settings.is_paused||a.settings.is_blur||!a.settings.progressbar)return false;a.box_skitter.find('.progressbar').hide().dequeue().width(a.settings.progressbar_css.width).animate({width:'show'},a.settings.interval,'linear')},pauseprogressbar:function(){var a=this;if(!a.settings.is_animating){a.box_skitter.find('.progressbar').stop()}},resumeprogressbar:function(){var a=this;if(a.settings.is_hover_box_skitter||a.settings.is_paused||!a.settings.progressbar)return false;a.box_skitter.find('.progressbar').dequeue().animate({width:a.settings.progressbar_css.width},(a.settings.interval-a.settings.elapsedtime),'linear')},hideprogressbar:function(){var a=this;if(!a.settings.progressbar)return false;a.box_skitter.find('.progressbar').stop().fadeout(300,function(){$(this).width(a.settings.progressbar_css.width)})},starttime:function(){var a=this;a.settings.is_paused_time=false;var b=new date();a.settings.elapsedtime=0;a.settings.timestart=b.gettime();a.startprogressbar()},pausetime:function(){var a=this;if(a.settings.is_paused_time)return false;a.settings.is_paused_time=true;var b=new date();a.settings.elapsedtime+=b.gettime()-a.settings.timestart;a.pauseprogressbar()},resumetime:function(){var a=this;a.settings.is_paused_time=false;var b=new date();a.settings.timestart=b.gettime();a.resumeprogressbar()},enablenavigationkeys:function(){var a=this;$(window).keydown(function(e){if(e.keycode==39||e.keycode==40){a.box_skitter.find('.next_button').trigger('click')}else if(e.keycode==37||e.keycode==38){a.box_skitter.find('.prev_button').trigger('click')}})},getboxclonebackground:function(a){var b=$('
');b.css({'left':a.left,'top':a.top,'width':a.width,'height':a.height,'background-image':'url('+a.image+')','background-position':a.position.left+'px '+a.position.top+'px'});return b},shufflearray:function(a){var b=this;var c=new array();var d;while(a.length>0){d=b.randomunique(0,a.length-1);c[c.length]=a[d];a.splice(d,1)}return c},randomunique:function(a,b){var c;do c=math.random();while(c==1);return(c*(b-a+1)+a)|0},windowfocusout:function(){var a=this;$(window).bind('blur',function(){a.settings.is_blur=true;a.pausetime();a.cleartimer(true)});$(window).bind('focus',function(){if(a.settings.images_links.length>1){a.settings.is_blur=false;if(a.settings.elapsedtime==0){a.starttime()}else{a.resumetime()}if(a.settings.elapsedtime<=a.settings.interval){a.cleartimer(true);a.timer=settimeout(function(){a.completemove()},a.settings.interval-a.settings.elapsedtime);a.box_skitter.find('.image_main').attr({'src':a.settings.image_atual});a.box_skitter.find('.image a').attr({'href':a.settings.link_atual})}}})}});$.fn.css3=function(a){var b={};var c=['moz','ms','o','webkit'];for(var d in a){for(var i=0;i