// ----------------------------------------------------------------------------
// Pagination Plugin - A jQuery Plugin to paginate content
// v 1.0 Beta
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2010 Rohit Singh Sengar
// http://rohitsengar.cueblocks.net/
// ----------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ----------------------------------------------------------------------------

//------------ initializing all the values needed in paginator. -----------------

	//--- Variables for internal use ----

	var pageElement = Array();

	var paginatorId = '';

	var currentPage = 1; // current page, default 1

	var allItems = 0; // no. of repeating items in the container where paginator is applied

	var lastPage = 1; // last page, default 1

	//--- Attributes that can be changed according to use ---

	var startPage = 1; // start page

	var itemsPerPage = 6; // no. of items you want to show on one page

	var firstPageSymbol = ''; // to indicate First Page

	var previousPageSymbol = ''; // to indicate Previous Page

	var nextPageSymbol = ''; // to indicate Next Page

	var lastPageSymbol = ''; // to indicate Last Page

	var separator = ' '; // To separate paginator's items

	var paginatorPosition = 'bottom'; // where you want the paginator to be. Accepted values are 'top','bottom','both'

	var paginatorStyle = 3; // To define which style of paginator you need.
	// 1 - for << | < | 1 | 2 | 3 | > | >>
	// 2 - for << | < | 1/8 | > | >>
	// 3 - for < | 1 | 2 | 3 | >
	// 4 - for < | >
    
	var enablePageOfOption = false; // it shows on which are you currently, i.e. Page 3 of 6 Page(s), if turned true
    
	var enableGoToPage = false; // shows a drop down of all pages for go/jump to any page user want to go, if turned true. Useful incase there are large no. of pages
    
    var textGoToPage = 'Go to'; // text for above option. You can change it to 'Jump to Page' or anything you like. The above option needs to turned on for this.
    
	var enableSelectNoItems = false; // if you want to change items per page on the fly.
    
    var textSelectNoItems = 'Items Per Page'; // text for above option. You can change it to 'Change No. of tag/page' or anything you like. The above option needs to turned on for this.

	var paginatorValues = Array(5,10,15,20,25,30); // list of values for above option (enableSelectNoItems).

    var anchorLink = 'javascript:void();'; // if you want to change href of the paginator anchor text (links for page) to '#' or to something else. As # is append on the address bar upon clicking I used javascript:void(); which is clean.


//-----------functions starts----------------------------------------------------
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1c.1d.1e({1f:B(){k=N;R(1g){x\'1h\':{k.S(\'<n 7="y"></n>\');z}x\'1i\':{k.O(\'<n 7="y"></n>\');z}x\'1j\':{k.S(\'<n 7="y"></n>\');k.O(\'<n 7="y"></n>\');z}T:{k.O(\'<n 7="y"></n>\')}}P()}});B P(){h(j<1)j=5;A=k.F().U;h(A%j==0)o=J(A/j);u o=J(A/j)+1;h((K<1)||(K>o))K=1;r(K,1)}B r(a,b){h(a<0){h(a==-1)a=v-1;u a=v+1}v=a;G=(v-1)*j;h(!b){k.1k("V",B(){Q();k.F().W();k.F().X(G,j+G).Y();k.1l("V")})}u{Q();k.F().W();k.F().X(G,j+G).Y()}}B 1m(a){j=a;h(A%j==0)o=J(A/j);u o=J(A/j)+1;r(1)}B Q(){$(".y").Z("");t a=\'\';t b=\'\';t c=\'\';t d=\'\';t e=\' 8 \'+v+\' 10 \'+o+\' 8(s) \';t f=\' \'+1n+\' <L 11="r(N.C);" >\';t g=\' \'+1o+\' <L 11="j=1p(N.C);P();" >\';12(t i=0;i<D.U;i++){h(j==D[i])g+=\'<w C="\'+D[i]+\'" M="M">\'+D[i]+\'</w>\';u g+=\'<w C="\'+D[i]+\'">\'+D[i]+\'</w>\'}g+=\'</L>\';h(v==1){6=\'<a l="\'+m+\'" 7="p" 9="13 8">\'+14+\'</a>\'+q;a=b=6;6=\'<a l="\'+m+\'" 7="p" 9="15 8">\'+16+\'</a>\'+q;a+=6;b+=6;c+=6;d+=6}u{6=\'<a l="\'+m+\'" 7="H" I="r(1);" 9="13 8">\'+14+\'</a>\'+q;a=b=6;6=\'<a l="\'+m+\'" 7="H" I="r(-1);" 9="15 8">\'+16+\'</a>\'+q;a+=6;b+=6;c+=6;d+=6}12(t i=1;i<=o;i++){h(i==v){a+=\'<a l="\'+m+\'" 7="p" 9="8 \'+i+\'">\'+i+\'</a>\'+q;b+=\'<a l="\'+m+\'" 7="p" 9="8 \'+i+\'">\'+i+\'/\'+o+\'</a>\'+q;c+=\'<a l="\'+m+\'" 7="p" 9="8 \'+i+\'">\'+i+\'</a>\'+q;f+=\'<w C="\'+i+\'" M="M">\'+i+\'</w>\'}u{6=\'<a l="\'+m+\'" 7="H" I="r(\'+i+\');" 9="8 \'+i+\'">\'+i+\'</a>\'+q;a+=6;c+=6;f+=\'<w C="\'+i+\'">\'+i+\'</w>\'}}f+=\'</L>\';h(v==o){6=\'<a l="\'+m+\'" 7="p" 9="17 8">\'+18+\'</a>\';a+=6;b+=6;c+=6;d+=6;6=q+\'<a l="\'+m+\'" 7="p" 9="19 8">\'+1a+\'</a>\';a+=6;b+=6}u{6=\'<a l="\'+m+\'" 7="H" I="r(-2);" 9="17 8">\'+18+\'</a>\';a+=6;b+=6;c+=6;d+=6;6=q+\'<a l="\'+m+\'" 7="H" I="r(\'+o+\');" 9="19 8">\'+1a+\'</a>\';a+=6;b+=6}R(1q){x 1:6=a;z;x 2:6=b;z;x 3:6=c;z;x 4:6=d;z;T:6=a}h(1r)6+=\'<E 7="p" 9="8 1s">\'+e+\'</E>\';h(1t)6+=\'<E 7="p" 9="1b 8">\'+f+\'</E>\';h(1u)6+=\'<E 7="p" 9="1b 1v. 10 1w 1x 1y">\'+g+\'</E>\';$(".y").Z(6)}',62,97,'||||||style|class|Page|title||||||||if||itemsPerPage|paginatorId|href|anchorLink|div|lastPage|inactive|separator|appendContent||var|else|currentPage|option|case|paginator|break|allItems|function|value|paginatorValues|span|children|till|active|onclick|parseInt|startPage|select|selected|this|after|initPaginator|createPaginator|switch|before|default|length|medium|hide|slice|show|html|of|onchange|for|First|firstPageSymbol|Previous|previousPageSymbol|Next|nextPageSymbol|Last|lastPageSymbol|Select|jQuery|fn|extend|pagination|paginatorPosition|top|bottom|both|fadeOut|fadeIn|changePaginator|textGoToPage|textSelectNoItems|Number|paginatorStyle|enablePageOfOption|Information|enableGoToPage|enableSelectNoItems|no|items|per|page'.split('|'),0,{}))
