Current File : /home/lecoinf/www/iwp/js/jquery.paginate.min.js |
!function(e){e.fn.paginate=function(t){var o=e.extend({},e.fn.paginate.defaults,t);return this.each(function(){$this=e(this);var t=e.meta?e.extend({},o,$this.data()):o,r=t.start;e.fn.draw(t,$this,r)})};var t=0,o=0,r=(navigator.appName,navigator.appVersion);if(r.indexOf("MSIE 7.0")>0)var a="ie7";e.fn.paginate.defaults={count:5,start:12,display:5,border:!0,border_color:"#fff",text_color:"#8cc59d",background_color:"black",border_hover_color:"#fff",text_hover_color:"#fff",background_hover_color:"#fff",rotate:!0,images:!0,mouse:"slide",onChange:function(){return!1}},e.fn.draw=function(r,n,l){if(r.display>r.count&&(r.display=r.count),$this.empty(),r.images)var c="jPag-sprevious-img",s="jPag-snext-img";else var c="jPag-sprevious",s="jPag-snext";var i=e(document.createElement("a")).addClass("jPag-first").html("First");if(r.rotate)if(r.images)var d=e(document.createElement("span")).addClass(c);else var d=e(document.createElement("span")).addClass(c).html("«");var f=e(document.createElement("div")).addClass("jPag-control-back");f.append(i).append(d);for(var u,p=e(document.createElement("div")).css("overflow","hidden"),v=e(document.createElement("ul")).addClass("jPag-pages"),m=((r.display-1)/2,0);m<r.count;m++){var h=m+1;if(h==l){var _=e(document.createElement("li")).html('<span class="jPag-current">'+h+"</span>");u=_,v.append(_)}else{var _=e(document.createElement("li")).html("<a>"+h+"</a>");v.append(_)}}if(p.append(v),r.rotate)if(r.images)var g=e(document.createElement("span")).addClass(s);else var g=e(document.createElement("span")).addClass(s).html("»");var b=e(document.createElement("a")).addClass("jPag-last").html("Last"),x=e(document.createElement("div")).addClass("jPag-control-front");if(x.append(g).append(b),$this.addClass("jPaginate").append(f).append(p).append(x),r.border){if("none"==r.background_color)var k={color:r.text_color,border:"1px solid "+r.border_color};else var k={color:r.text_color,"background-color":r.background_color,border:"1px solid "+r.border_color};if("none"==r.background_hover_color)var L={color:r.text_hover_color,border:"1px solid "+r.border_hover_color};else var L={color:r.text_hover_color,"background-color":r.background_hover_color,border:"1px solid "+r.border_hover_color}}else{if("none"==r.background_color)var k={color:r.text_color};else var k={color:r.text_color,"background-color":r.background_color};if("none"==r.background_hover_color)var L={color:r.text_hover_color};else var L={color:r.text_hover_color,"background-color":r.background_hover_color}}e.fn.applystyle(r,$this,k,L,i,v,p,x);var j=t-i.parent().width()-3;"ie7"==a?(p.css("width",j+72+"px"),x.css("left",t+6+72+"px")):(p.css("width",j+"px"),x.css("left",t+6+"px")),r.rotate&&(g.hover(function(){thumbs_scroll_interval=setInterval(function(){var e=p.scrollLeft()+1;p.scrollLeft(e)},20)},function(){clearInterval(thumbs_scroll_interval)}),d.hover(function(){thumbs_scroll_interval=setInterval(function(){var e=p.scrollLeft()-1;p.scrollLeft(e)},20)},function(){clearInterval(thumbs_scroll_interval)}),"press"==r.mouse?(g.mousedown(function(){thumbs_mouse_interval=setInterval(function(){var e=p.scrollLeft()+5;p.scrollLeft(e)},20)}).mouseup(function(){clearInterval(thumbs_mouse_interval)}),d.mousedown(function(){thumbs_mouse_interval=setInterval(function(){var e=p.scrollLeft()-5;p.scrollLeft(e)},20)}).mouseup(function(){clearInterval(thumbs_mouse_interval)})):(d.click(function(e){var t=j-10,o=p.scrollLeft()-t;p.animate({scrollLeft:o+"px"})}),g.click(function(e){var t=j-10,o=p.scrollLeft()+t;p.animate({scrollLeft:o+"px"})}))),i.click(function(e){p.animate({scrollLeft:"0px"}),p.find("li").eq(0).click()}),b.click(function(e){p.animate({scrollLeft:o+"px"}),p.find("li").eq(r.count-1).click()}),p.find("li").click(function(t){u.html("<a>"+u.find(".jPag-current").html()+"</a>");var o=e(this).find("a").html();e(this).html('<span class="jPag-current">'+o+"</span>"),u=e(this),e.fn.applystyle(r,e(this).parent().parent().parent(),k,L,i,v,p,x);var n=this.offsetLeft/2,l=(p.scrollLeft()+n,n-j/2);"ie7"==a?p.animate({scrollLeft:n+l-i.parent().width()+52+"px"}):p.animate({scrollLeft:n+l-i.parent().width()+"px"}),r.onChange(o)});var w=p.find("li").eq(r.start-1);w.attr("id","tmp");var y=document.getElementById("tmp").offsetLeft/2;w.removeAttr("id");var E=y-j/2;"ie7"==a?p.animate({scrollLeft:y+E-i.parent().width()+52+"px"}):p.animate({scrollLeft:y+E-i.parent().width()+"px"})},e.fn.applystyle=function(r,a,n,l,c,s,i,d){a.find("a").css(n),a.find("span.jPag-current").css(l),a.find("a").hover(function(){e(this).css(l)},function(){e(this).css(n)}),a.css("padding-left",c.parent().width()+5+"px"),o=0,a.find("li").each(function(e,a){e==r.display-1&&(t=this.offsetLeft+this.offsetWidth),o+=this.offsetWidth}),s.css("width",o+"px")}}(jQuery);