(function(a){a.fn.sorted=function(b){var c={reversed:false,by:function(d){return d.text()}};a.extend(c,b);$data=a(this);arr=$data.get();arr.sort(function(f,d){var g=c.by(a(f));var e=c.by(a(d));if(c.reversed){return(g<e)?1:(g>e)?-1:0}else{return(g<e)?-1:(g>e)?1:0}});return a(arr)}})(jQuery);if(typeof FRISKIES=="undefined"){FRISKIES={}}FRISKIES.initRibbon=function(c,b){if(c=="undefined"||c=="null"){c="ribbonFrame"}$(".ribbonNavLeft").show();$(".ribbonNavRight").show();$(c).children().css("cursor","pointer");$(c).children("a").click(function(){return false});var a;if(typeof(arguments[2])=="function"){var a=arguments[2]}$("#ribbon").imageScroller({next:"ribbonNavLeft",prev:"ribbonNavRight",frame:c,width:b,child:"div",auto:false,group:3},a);$("#leftArrow").trigger("click");setTimeout("$('#rightArrow').trigger('click');",1000);$(".ribbonNavLeft").bind("click",{soundID:"purrLeft"},function(d){return(FRISKIES.flashSoundHandler(d))});$(".ribbonNavRight").bind("click",{soundID:"purrRight"},function(d){return(FRISKIES.flashSoundHandler(d))})};FRISKIES.executeQuicksand=function(c,b,e){var a=c.sorted({by:function(g){return $(g).find("div").text().toLowerCase()}});var d=a.filter(function(g){return $(this).attr("data-feature")=="True"});var f=a.filter(function(g){return $(this).attr("data-feature")!="True"});b.quicksand($.merge(d,f),{adjustHeight:"auto",duration:e,easing:"easeInOutQuad",useScaling:true},function(){})};FRISKIES.flashSoundHandler=function(a){if($("#flashSoundObject").length==1){if(navigator.appName.indexOf("Microsoft")!=-1){if(typeof window.flashSoundObject.makeSound==="function"){window.flashSoundObject.makeSound(a.data.soundID)}}else{if(typeof document.flashSoundObject.makeSound==="function"){document.flashSoundObject.makeSound(a.data.soundID)}}return false}};FRISKIES.initPrettyPhoto=function(a){$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:"slow",theme:"light_square",slideshow:2000,autoplay_slideshow:false,for_friskies_pix:a});$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:"fast",theme:"light_square",slideshow:10000})};FRISKIES.initPopupLinks=function(){$('a[rel="popup"]').click(function(){window.open($(this).attr("href"),"friskies_popup","width=500,height=600,scrollbars=yes");return false})};FRISKIES.twp_curr_category=null;FRISKIES.twp_uri="";FRISKIES.twp_curr_page=1;FRISKIES.twp_items_per_page=9;FRISKIES.initTWPRibbonLinks=function(){$("#miniRibbonFrame div").unbind("click");$("#miniRibbonFrame div").click(function(){$("#miniRibbonFrame div").css("background-position","0 0");$("#miniRibbonFrame div").removeClass("ribbonBox_on").addClass("ribbonBox");FRISKIES.twp_curr_category=$(this).attr("id");$(this).css("background-position","0 -200px");$(this).removeClass("ribbonBox").addClass("ribbonBox_on");$(this).mask();$.ajax({url:FRISKIES.twp_uri+"/"+$(this).attr("id"),type:"get",dataType:($.browser.msie)?"text":"xml",success:function(b){var a;if(typeof b=="string"){a=new ActiveXObject("Microsoft.XMLDOM");a.async=false;a.loadXML(b)}else{a=b}$("#contentBoxContainer").html($(a).find("content").text());if($(a).find("content").attr("hasMorePages")=="False"){$("div.loadMore").hide()}else{if($(a).find("content").attr("hasMorePages")=="True"){$("div.loadMore").show()}}$("#"+FRISKIES.twp_curr_category).unmask();FRISKIES.initPrettyPhoto()}});$("div.loadMore").unbind("click");FRISKIES.twp_curr_page=2;$("div.loadMore").bind("click",{url:FRISKIES.twp_uri+"/"+$(this).attr("id")},function(a){return(FRISKIES.twpLoadMoreHandler(a))});return false})};FRISKIES.twpLoadMoreHandler=function(a){$("div.loadMore").mask();$.ajax({url:a.data.url,type:"get",data:{page:FRISKIES.twp_curr_page},dataType:($.browser.msie)?"text":"xml",success:function(c){var b;if(typeof c=="string"){b=new ActiveXObject("Microsoft.XMLDOM");b.async=false;b.loadXML(c)}else{b=c}$("#contentBoxContainer").append($(b).find("content").text());FRISKIES.twp_curr_page++;if($(b).find("content").attr("hasMorePages")=="False"){$("div.loadMore").hide()}$("div.loadMore").unmask();FRISKIES.initPrettyPhoto()}});return false};FRISKIES.clearedInputs=[];FRISKIES.inputRestoreDefaultText=function(b,a){if($(b).val()==""){$(b).val(a)}for(i=0;i<FRISKIES.clearedInputs.length;i++){if(FRISKIES.clearedInputs[i]==b){FRISKIES.clearedInputs.splice(i,1)}}return true};FRISKIES.inputClearDefaultText=function(b,a){if($(b).val()==a){$(b).val("");FRISKIES.clearedInputs.push(b)}return true};FRISKIES.blockPress=false;FRISKIES.fieldCharCount=function(e,c,d,a){if(d<=a){$(c).text(a-d)}else{if(d>=a){FRISKIES.blockPress=true;if($(c).text()!="0"){$(c).text("0")}var b=$(e);b.val(b.val().substring(0,a))}}};FRISKIES.blockKeyboard=function(c,a){var b=$(c);b.val(b.val().substring(0,a))};FRISKIES.getParameterByName=function(b){var a=RegExp("[?&]"+b+"=([^&]*)").exec(window.location.search);return a&&decodeURIComponent(a[1].replace(/\+/g," "))};FRISKIES.pawprintDirection=1;FRISKIES.pawPrintEffect=function(b){var a=Math.random()*45*FRISKIES.pawprintDirection;$('<div class="pawprint"></div>').appendTo("body").rotate(a+"deg").offset({top:(b.pageY-32),left:(b.pageX-32)}).fadeOut(500,function(){$(this).remove()});FRISKIES.pawprintDirection*=-1};
