jQuery.fn.ajaxLink=function(){jQuery(this).click(function(){url=jQuery(this).attr("href");if(url.indexOf("ajax=")==-1)url=url.indexOf("?")==-1?url+"?ajax=1":url+"&ajax=1";jQuery.get(url,function(a){scripts=a.match(/<script.*?>.*?<\/script>/gi);a=a.replace(/<script.*?>.*?<\/script>/gi,"");for(i in scripts)eval(scripts[0].replace(/<\/?script.*?>/gi,""));jQuery.loading(false);jQuery.loading(true,{html:a,text:"",max:5E3})});return false})};
jQuery.fn.ajaxDownloadLink=function(){jQuery(this).click(function(){url=jQuery(this).attr("href");if(url.indexOf("ajax=")==-1)url=url.indexOf("?")==-1?url+"?ajax=1":url+"&ajax=1";jQuery.get(url+"&check=1",function(a){error=a.match(/error/gi);jQuery.loading(true,{html:a,text:"",max:5E3});if(!error)window.location=url});return false})};
jQuery.fn.ajaxPaging=function(){jQuery(this).click(function(){contentholder=jQuery(this).parent().parent().parent().parent();url=jQuery(this).attr("href");if(url.indexOf("ajax=")==-1)url=url.indexOf("?")==-1?url+"?ajax=1":url+"&ajax=1";jQuery.get(url,function(a){contentholder.html(a).jCore();jQuery(window).scrollTop()>contentholder.offset().top&&jQuery("html,body").animate({scrollTop:contentholder.offset().top-10},50,"linear")});return false})};
jQuery.fn.ajaxContentLink=function(){jQuery(this).click(function(){if(typeof jQuery(this).qtip=="undefined")return true;if(jQuery(this).data("qtip")&&!jQuery(this).attr("target")){jQuery(this).qtip("show");return false}url=jQuery(this).attr("href");tooltiptitle=jQuery(this).attr("title");if(url.indexOf("ajax=")==-1)url=url.indexOf("?")==-1?url+"?ajax=1":url+"&ajax=1";if(jQuery(this).attr("target")){target=jQuery(jQuery(this).attr("target"));jQuery.get(url,function(a){target.html(a).jCore()});return false}jQuery(this).qtip({content:{url:url,
title:{text:tooltiptitle,button:"<span>Close</span>"}},style:{name:"cream",tip:true,width:{max:700}},position:{adjust:{screen:true}},show:false,hide:false,api:{onContentUpdate:function(){this.elements.content.jCore()}}});jQuery(this).qtip("show");return false})};jQuery.fn.ajaxLightboxLink=function(){jQuery(this).lightBox({hideDetails:true,disableNavigation:true,ajaxContent:true})};
