/*
 * Smart Scrolling Pagination - simple and usefull jQuery plugin
 * Examples and documentation at: http://phpdev.ro/
 * Version: 1.0.0 (04/01/2010)
 * Copyright (c) 2009 Andrei Gabreanu
 * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License
 * Requires: jQuery v1.3+
*/
(function(a){a.fn.smartPagination=function(b){var c={url:"index.cfm",parameters:{isAjax:true},method:"get",button:"load_more",debug:false};var b=a.extend(c,b);return this.each(function(){var e=a(this);var d=a(this).attr("class");a("body").append('<div id="smartPagination_TemporaryContainer'+d+'" style="display:none"></div>');if(b.debug==true){alert("Parameters to be sent:");a.each(b.parameters,function(g,f){alert(g+" = "+f)})}if(b.debug==true){if(b.method=="get"){alert("Will use GET method")}else{if(b.method=="post"){alert("Will use POST method")}else{alert("Will use GET method (invalid method selected)")}}}if(b.method=="get"){a.get(b.url,b.parameters,function(f,g){a("#smartPagination_TemporaryContainer"+d).html(f)})}else{if(b.method=="post"){a.post(b.url,b.parameters,function(f,g){a("#smartPagination_TemporaryContainer"+d).html(f)})}else{a.get(b.url,b.parameters,function(f,g){a("#smartPagination_TemporaryContainer"+d).html(f)})}}a("#"+b.button).click(function(){a(a("#smartPagination_TemporaryContainer"+d).html()).fadeIn().appendTo(e);if(b.method=="get"){a.get(b.url,b.parameters,function(f,g){if(b.debug==true){alert("GET response: "+f)}a("#smartPagination_TemporaryContainer"+d).html(f)})}else{if(b.method=="post"){a.post(b.url,b.parameters,function(f,g){if(b.debug==true){alert("POST response: "+f)}a("#smartPagination_TemporaryContainer"+d).html(f)})}else{a.get(b.url,b.parameters,function(f,g){if(b.debug==true){alert("GET response: "+f)}a("#smartPagination_TemporaryContainer"+d).html(f)})}}return false})})}})(jQuery);
