/*
Copyright (c) 2009 SymfoniP - Core Code Modules exclusively developed for SymfoniP by Ronan Cashell 
V1  Stacks symImage Pro PHP Edition Automated - Circular Loop Tabs implemented
*/
jQuery.fn.resizeImage=function(a,b){if(this.is("img")){lWidth=this.width();lHeight=this.height();if(b*lWidth/lHeight>a){lHeight=Math.round(lHeight*a/lWidth);lWidth=a}else{lWidth=Math.round(lWidth*b/lHeight);lHeight=b}wPad=Math.round((a-lWidth)/2);hPad=Math.round((b-lHeight)/2);this.width(lWidth).height(lHeight);this.css({paddingLeft:wPad,paddingRight:wPad,paddingTop:hPad,paddingBottom:hPad})}return this};jQuery.noConflict();jQuery(document).ready(function(b){var a={tWidth:100,tHeight:75,Width:450,Height:300,rlPadding:90,tbPadding:50};if(typeof sliOpts=="object"){a=b.extend({},a,sliOpts)}b("#image_wrap").width(a.Width+2*a.rlPadding-3).height(a.Height);b(".scrollable").width(a.Width+2*a.rlPadding);b("#image_wrap img").width(a.Width).height(a.Height);b("div.symimagegrab div.centered_image img").each(function(){b(this).appendTo("div.items")});b("div.scrollable").scrollable({size:Math.floor((a.Width+2*a.rlPadding)/128),hoverClass:"hover"});if(a.mwheel){b("div.scrollable").mousewheel()}if(a.circ){b("div.scrollable").circular()}b(".items img").click(function(){var d=b(this).attr("src").replace("thumbs/","");var e=b("#image_wrap").fadeTo("medium",0.5);var c=new Image();c.onload=function(){e.fadeTo("fast",1);e.find("img").attr("src",d)};c.src=d}).filter(":first").click()});