function verticalRotator(name,parentid,listHeight,detailHeight,timercount,pausecount,currentClass,rotateClass,slideSpeed)
{this.name=name;this.initialized=false;this.currentIndex=0;this.slideSpeed=slideSpeed;this.listItems=new Array();this.detailItems=new Array();this.currentClass=currentClass;this.rotateClass=rotateClass;this.timer=false;this.timercount=timercount;this.pausecount=pausecount;this.parent=jQuery('#'+parentid);this.listHeight=listHeight;this.detailHeight=detailHeight;this.load=function(startIndex,listName,divName)
{var i=startIndex;var x=document.getElementById(listName+i);var y=document.getElementById(divName+i);while(typeof x!='undefined'&&x!=null&&typeof y!='undefined'&&y!=null)
{this.listItems.push(jQuery(x));this.detailItems.push(jQuery(y));i++;x=document.getElementById(listName+i);y=document.getElementById(divName+i);}
this.init();}
this.init=function()
{if(this.count()>0)
{this.parent.css('height',this.count()*this.listHeight+this.detailHeight);this.detail(0);}
else
{this.parent.css('height',0);}
this.initialized=true;this.start();}
this.start=function()
{this.play(this.timercount);}
this.play=function(duration)
{this.pause();this.timer=setTimeout(this.name+'.rotate();',duration);}
this.delay=function()
{this.play(this.pausecount);}
this.pause=function()
{if(this.timer)
clearTimeout(this.timer);}
this.rotate=function()
{if(this.currentIndex+1<this.count())
this.detail(this.currentIndex+1);else
this.detail(0);this.start();}
this.detail=function(index)
{if(index<this.count()&&index>=0)
{if(index!=0)
{this.listItems[index].addClass(this.rotateClass);}
if(this.initialized)
{this.listItems[this.currentIndex].removeClass(this.currentClass);this.listItems[this.currentIndex].removeClass(this.rotateClass);}
for(var i=0;i<this.count();i++)
{if(i!=index)
this.detailItems[i].slideUp(this.slideSpeed);}
if(index==0)
{this.listItems[index].addClass(this.rotateClass);}
if(this.initialized)
this.detailItems[index].slideDown(this.slideSpeed,eval('function callback() {'+this.name+'.listItems[index].addClass('+this.name+'.currentClass)}'));this.currentIndex=index;}
return false;}
this.count=function()
{ return this.listItems.length; } 
}
function tabBlock(name, defaultId) {
    this.name = name;
    this.tabs = new Array();
    this.pages = new Array();
    this.tabs['T1'] = jQuery('#' + defaultId); 
    this.add = function (id) {
        this.pages.push(jQuery('#' + id)); 
        if (this.pages.length == 1)
            this.show(1); 
        else
            this.hide(this.pages.length - 1);
    }
    this.hide = function (index)
    { this.pages[index].css('display', 'none'); }
    this.show = function (index, obj) {
        if (typeof obj != 'undefined' && obj != null)
        { this.tabs['T' + index] = jQuery(obj); }
        
        for (var i = 0; i < this.pages.length; i++) {
            if (i == index - 1) {
                this.pages[i].css('display', 'block'); if (typeof this.tabs['T' + (i + 1)] != 'undefined' && this.tabs['T' + (i + 1)] != null)
                    this.tabs['T' + (i + 1)].addClass('current');
            }
            else {
                this.hide(i); if (typeof this.tabs['T' + (i + 1)] != 'undefined' && this.tabs['T' + (i + 1)] != null)
                    this.tabs['T' + (i + 1)].removeClass('current');
            }
        }
    }
}
function tabBlockRotator(name,startTab,count,timercount,pausecount,autoplay)
{this.name=name;this.playing=false;this.tabs=new Array();this.pages=new Array();this.currentIndex=startTab;this.running=false;this.timer=false;if(typeof timercount=='undefined'||timercount==null)
this.timercount=5000;else
this.timercount=timercount;if(typeof pausecount=='undefined'||pausecount==null)
this.pausecount=15000;else
this.pausecount=pausecount;if(typeof autoplay=='undefined'||autoplay==null)
this.autoplay=false;else
this.autoplay=autoplay;if(typeof this.currentIndex!='undefined')
{if(this.currentIndex<0&&typeof count!='undefined'&&count!=null&&count>0)
{this.currentIndex=(Math.floor(Math.random()*count)+1);}}
else
this.currentIndex=1;this.count=function()
{return this.pages.length;}
this.add=function(id,tabobjectid)
{this.pages.push(jQuery('#'+id));this.tabs['T'+this.pages.length]=jQuery('#'+tabobjectid);if(this.pages.length==this.currentIndex)
this.show(this.currentIndex);else
this.hide(this.pages.length-1);}
this.hide=function(index)
{this.pages[index].css('display','none');}
this.play=function(duration)
{this.running=true;this.playing=true;this.pause();this.timer=setTimeout(this.name+'.rotate();',duration);}
this.toggle=function()
{if(this.playing==true)
{this.playing=false;this.pause();}
else
this.play(0);}
this.pause=function()
{if(this.timer)
clearTimeout(this.timer);}
this.delay=function()
{this.play(this.pausecount);}
this.rotate=function()
{if(this.currentIndex+1<=this.count())
this.detail(this.currentIndex+1);else
this.detail(1);this.start();}
this.start=function()
{this.play(this.timercount);}
this.detail=function(index)
{this.currentIndex=index;for(var i=0;i<this.pages.length;i++)
{if(i==index-1)
{this.pages[i].css('display','block');if(typeof this.tabs['T'+(i+1)]!='undefined'&&this.tabs['T'+(i+1)]!=null)
this.tabs['T'+(i+1)].addClass('current');}
else
{this.hide(i);if(typeof this.tabs['T'+(i+1)]!='undefined'&&this.tabs['T'+(i+1)]!=null)
this.tabs['T'+(i+1)].removeClass('current');}}}
this.show=function(index)
{if(this.running)
this.delay();this.detail(index);}
if(this.autoplay==true)
this.play(this.timercount);}
var srcvalue='';var counter=0;var timer;function printcontent(panename){if(panename==null||panename=='')
panename='ContentPane'
myRef=window.open('/print.aspx','mywin','left=20,top=20,width=700,height=700,toolbar=1,resizable=1,scrollbars=yes');srcvalue=document.getElementById('dnn_'+panename).innerHTML;counter=10;waitfortarget();}
function waitfortarget(){counter--;if(!myRef.document.getElementById('dnn_ContentPane'))
{if(counter>0){timer=setTimeout("waitfortarget()",1500);}
else{alert('Unable to load article. Please try again later.');}}
else{donetarget();}}
function donetarget(){myRef.document.getElementById('dnn_ContentPane').innerHTML=srcvalue;myRef.print();}
function designCenterChangeStory(linkID,storyID,divID,targetID){var dtObj=document.getElementById(divID).getElementsByTagName('dt');var ddObj=document.getElementById(divID).getElementsByTagName('dd');document.getElementById(targetID).innerHTML=document.getElementById(storyID).innerHTML;for(var i=0;i<dtObj.length;i++){var aObj=dtObj[i].getElementsByTagName('a');for(var k=0;k<aObj.length;k++){if(aObj[k].id==linkID){jQuery('#'+linkID).addClass('current');}
else{jQuery('#'+aObj[k].id).removeClass('current');}}}}


/*
jQuery().ready(function(){showShortArticle();});function getArticleExpander(){return jQuery("div.article a[name=expander]:first");}
var currentExpander=0;function showShortArticle(){var pexp=jQuery('#expandCollapseArea');if(pexp.length==0)
{var exp=getArticleExpander();pexp=null;var rexp=null;if(exp==null||exp.length==0)
{exp=jQuery('div.article p:eq(3)');if(exp!=null&&exp.length>0)
exp.before('<p><a name="expander"></a></p>');exp=getArticleExpander();}
if(exp!=null&&exp.length>0)
{pexp=exp.parent();rexp=pexp.parent();var strCollapsed="<div id='expandCollapseArea'><div class='expandCollapse'><div class='option'>Turn OFF Collapse / Expand Article</div>";strCollapsed+="<a href='#' class='button' onclick='showFullArticle(); return false;'>Read Full Article</a><div class='clear'></div></div></div>";var strExpanded="<div id='expandExpandArea'><div class='expandCollapse'><div class='option'>Turn OFF Collapse / Expand Article</div>";strExpanded+="<a href='#' class='buttonUp' onclick='showShortArticle(); return false;'>Collapse Article</a><div class='clear'></div></div></div>";pexp.before(strCollapsed);pexp.parent().append(strExpanded);pexp.nextAll().slideUp();pexp.remove();}}
else
{pexp.slideDown();pexp.nextAll().slideUp();}}
function showFullArticle(){var pexp=jQuery('#expandCollapseArea');pexp.slideUp();pexp.nextAll().slideDown();}
*/

function ratings(rateing_id,rating_class){document.getElementById('rate').className="rating "+rating_class+"star";var value='';switch(rating_class){case"one":value=1;break;case"two":value=2;break;case"three":value=3;break;case"four":value=4;break;case"five":value=5;break;}
document.getElementById('rateIt').value=value;document.getElementById('comment').focus();}
function setupSidebarImageList()
{var $kids=jQuery("#divSidebarImages").children();var len=$kids.length;jQuery("#sidebarImageCount").html(len);moveSidebarImagePage(-1);}
function setNavigationClasses(isPreviousEnabled,isNextEnabled)
{jQuery("#sidebarImagePrevious").removeClass("previous","previous_disabled");jQuery("#sidebarImagePrevious").addClass(isPreviousEnabled?"previous":"previous_disabled");jQuery("#sidebarImageNext").removeClass("next","next_disabled");jQuery("#sidebarImageNext").addClass(isNextEnabled?"next":"next_disabled");}
function moveSidebarImagePage(direction)
{var currentPage=Number(jQuery("#sidebarCurrentPage").html());var totalCount=Number(jQuery("#sidebarImageCount").html());if(!((currentPage==1&&direction<0)||(currentPage==totalCount&&direction>0)))
{currentPage=currentPage+direction;jQuery("#sidebarCurrentPage").html(currentPage);}
setNavigationClasses(currentPage!=1,currentPage!=totalCount);setCurrentImageLayout(currentPage);}
function setCurrentImageLayout(page)
{var currpage=Number(page);var currentSrc='';var currentText='';eval('currentSrc = jQuery("#divSidebarImages li:nth-child('+page+') img").attr("content");');eval('currentText = jQuery("#divSidebarImages li:nth-child('+page+') p").html();');var csrc=currentSrc.split(';');jQuery("#sidebarImage").attr("src",csrc[0]);jQuery("#sidebarImage").attr("alt",currentText);jQuery("#sidebarImageText").html(currentText);if(csrc.length>1)
jQuery("#sidebarEnlargeImage").attr("href",csrc[1]);else
jQuery("#sidebarEnlargeImage").attr("href",csrc[0]);}
function DetectEnterPressed(e){var characterCode;if(e&&e.which){e=e;characterCode=e.which;}else{e=event;characterCode=e.keyCode;}
return characterCode==13;}
function ProductSearch(input,url){if(input!=""){window.open(url,'','width=700,height=600,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,status=yes,menubar=yes');}
else{alert("Please enter a text string to search for.");}}
var popCalDstFld;var temp;var popCalWin;function popupCal()
{var tmpDate=new Date();var tmpString="";var tmpNum=0;var popCalDateVal;var dstWindowName="";popCalWin=new Object();if(arguments.length<2)
{alert("popupCal(): Wrong number of arguments.");return void(0);}
dstWindowName=popupCal.arguments[0];popCalDstFld=popupCal.arguments[1];temp=popupCal.arguments[1];popCalDstFmt=popupCal.arguments[2];popCalMonths=popupCal.arguments[3];popCalDays=popupCal.arguments[4];popCalToday=popupCal.arguments[5];popCalClose=popupCal.arguments[6];popCalTitle=popupCal.arguments[7];popCalFirstDayWeek=popupCal.arguments[8];if(popCalDstFld!="")
popCalDstFld=document.getElementById(popCalDstFld);if(popCalDstFmt=="")
popCalDstFmt="m/d/yyyy";if(popCalMonths=="")
popCalMonths="January,February,March,April,May,June,July,August,September,October,November,December";if(popCalDays=="")
popCalDays="Sun,Mon,Tue,Wed,Thu,Fri,Sat";if(popCalToday==""||typeof popCalToday=="undefined")
popCalToday="Today";if(popCalClose==""||typeof popCalClose=="undefined")
popCalClose="Close";if(popCalTitle==""||typeof popCalTitle=="undefined")
popCalTitle="Calendar";tmpString=new String(popCalDstFld.value);if(tmpString=="")
popCalDateVal=new Date()
else
{tmpNum=tmpString.lastIndexOf("/");if((tmpString.length-tmpNum)==3)
{tmpString=tmpString.substring(0,tmpNum+1)+"20"+tmpString.substr(tmpNum+1);popCalDateVal=new Date(tmpString);}
else
{popCalDateVal=getDateFromFormat(tmpString,popCalDstFmt);}}
if(popCalDateVal.toString()=="NaN"||popCalDateVal.toString()=="0")
{popCalDateVal=new Date();popCalDstFld.value="";}
var dateString=String(popCalDateVal.getMonth()+1)+"/"+String(popCalDateVal.getDate())+"/"+String(popCalDateVal.getFullYear());reloadCalPopup(dateString,dstWindowName);return void(0);}
function closeCalPopup()
{popCalWin.close();return void(0);}
function reloadCalPopup()
{var windowFeatures="toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, height=270, width=270, top="+((screen.height-270)/2).toString()+",left="+((screen.width-270)/2).toString();var tmpDate=new Date(reloadCalPopup.arguments[0]);if(tmpDate.toString()=="Invalid Date")
tmpDate=new Date();tmpDate.setDate(1);var popCalData=calPopupSetData(tmpDate,reloadCalPopup.arguments[1]);if(popCalWin.toString()=="[object Object]")
{popCalWin=window.open("",reloadCalPopup.arguments[1],windowFeatures);popCalWin.opener=self;popCalWin.focus();}
else
{popCalWin.document.close();popCalWin.document.clear();}
popCalWin.document.write(popCalData);return void(1);}
function calPopupSetData(firstDay,dstWindowName)
{var popCalData="";var lastDate=0;var fnt=new Array("<FONT SIZE=\"1\">","<B><FONT SIZE=\"2\">","<FONT SIZE=\"2\" COLOR=\"#EF741D\"><B>");var dtToday=new Date();var thisMonth=firstDay.getMonth();var thisYear=firstDay.getFullYear();var nPrevMonth=(thisMonth==0)?11:(thisMonth-1);var nNextMonth=(thisMonth==11)?0:(thisMonth+1);var nPrevMonthYear=(nPrevMonth==11)?(thisYear-1):thisYear;var nNextMonthYear=(nNextMonth==0)?(thisYear+1):thisYear;var sToday=String((dtToday.getMonth()+1)+"/01/"+dtToday.getFullYear());var sPrevMonth=String((nPrevMonth+1)+"/01/"+nPrevMonthYear);var sNextMonth=String((nNextMonth+1)+"/01/"+nNextMonthYear);var sPrevYear1=String((thisMonth+1)+"/01/"+(thisYear-1));var sNextYear1=String((thisMonth+1)+"/01/"+(thisYear+1));var tmpDate=new Date(sNextMonth);tmpDate=new Date(tmpDate.valueOf()-1001);lastDate=tmpDate.getDate();if(this.popCalMonths.split)
{var monthNames=this.popCalMonths.split(",");var dayNames=this.popCalDays.split(",");}
else
{var monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");var dayNames=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")}
var styles="<style><!-- body{font-family:Arial,Helvetica,sans-serif;font-size:9pt}; td {  font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #666666}; A { text-decoration: none; };TD.day { border-bottom: solid black; border-width: 0px; }--></style>"
var cellAttribs="align=\"center\" class=\"day\" BGCOLOR=\"#F1F1F1\"onMouseOver=\"temp=this.style.backgroundColor;this.style.backgroundColor='#CCCCCC';\" onMouseOut=\"this.style.backgroundColor=temp;\""
var cellAttribs2="align=\"center\" BGCOLOR=\"#F1F1F1\" onMouseOver=\"temp=this.style.backgroundColor;this.style.backgroundColor='#CCCCCC';\" onMouseOut=\"this.style.backgroundColor=temp;\""
var htmlHead="<HTML><HEAD><TITLE>"+popCalTitle+"</TITLE>"+styles+"</HEAD><BODY BGCOLOR=\"#F1F1F1\" TEXT=\"#000000\" LINK=\"#364180\" ALINK=\"#FF8100\" VLINK=\"#424282\">";var htmlTail="</BODY></HTML>";var closeAnchor="<CENTER><input type=button value=\""+popCalClose+"\" onClick=\"javascript:window.opener.closeCalPopup()\"></CENTER>";var todayAnchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sToday+"','"+dstWindowName+"');\">"+popCalToday+"</A>";var prevMonthAnchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sPrevMonth+"','"+dstWindowName+"');\">"+monthNames[nPrevMonth]+"</A>";var nextMonthAnchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sNextMonth+"','"+dstWindowName+"');\">"+monthNames[nNextMonth]+"</A>";var prevYear1Anchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sPrevYear1+"','"+dstWindowName+"');\">"+(thisYear-1)+"</A>";var nextYear1Anchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sNextYear1+"','"+dstWindowName+"');\">"+(thisYear+1)+"</A>";popCalData+=(htmlHead+fnt[1]);popCalData+=("<DIV align=\"center\">");popCalData+=("<TABLE BORDER=\"0\" cellspacing=\"0\" callpadding=\"0\" width=\"250\"><TR><TD width=\"45\"> </TD>");popCalData+=("<TD width=\"45\" align=\"center\" "+cellAttribs2);popCalData+=(" >");popCalData+=(fnt[0]+prevYear1Anchor+"</FONT></TD>");popCalData+=("<TD width=\"70\" align=\"center\" "+cellAttribs2);popCalData+=(" >");popCalData+=(fnt[0]+todayAnchor+"</FONT></TD>");popCalData+=("<TD width=\"45\" align=\"center\" "+cellAttribs2);popCalData+=(" >");popCalData+=(fnt[0]+nextYear1Anchor+"</FONT></TD><TD width=\"45\"> </TD>");popCalData+=("</TR></TABLE>");popCalData+=("<TABLE BORDER=\"0\" cellspacing=\"0\" callpadding=\"0\" width=\"250\">");popCalData+=("<TR><TD width=\"55\" align=\"center\" "+cellAttribs2);popCalData+=(" >");popCalData+=(fnt[0]+prevMonthAnchor+"</FONT></TD>");popCalData+=("<TD width=\"140\" align=\"center\">");popCalData+=("  "+fnt[1]+"<FONT COLOR=\"#000000\">"+monthNames[thisMonth]+", "+thisYear+"  </FONT></TD>");popCalData+=("<TD width=\"55\" align=\"center\" "+cellAttribs2);popCalData+=(" >");popCalData+=(fnt[0]+nextMonthAnchor+"</FONT></TD></TR></TABLE><BR>");popCalData+=("<TABLE BORDER=\"0\" cellspacing=\"2\" cellpadding=\"1\"  width=\"245\">");popCalData+=("");popCalData+=("<TR>");var xday=0;for(xday=0;xday<7;xday++)
{popCalData+=("<TD width=\"35\" align=\"center\">"+fnt[1]+"<FONT COLOR=\"#000000\">"+dayNames[(xday+popCalFirstDayWeek)%7]+"</FONT></TD>");};popCalData+=("</TR>");var calDay=0;var monthDate=1;var weekDay=firstDay.getDay();do
{popCalData+=("<TR>");for(calDay=0;calDay<7;calDay++)
{if(((weekDay+7-popCalFirstDayWeek)%7!=calDay)||(monthDate>lastDate))
{popCalData+=("<TD width=\"35\">"+fnt[1]+" </FONT></TD>");continue;}
else
{anchorVal="<A HREF=\"javascript:window.opener.calPopupSetDate(window.opener.popCalDstFld,'"+constructDate(monthDate,thisMonth+1,thisYear)+"');window.opener.closeCalPopup()\">";jsVal="javascript:window.opener.calPopupSetDate(window.opener.popCalDstFld,'"+constructDate(monthDate,thisMonth+1,thisYear)+"');window.opener.closeCalPopup()";popCalData+=("<TD width=\"35\" "+cellAttribs+" onClick=\""+jsVal+"\">");if((firstDay.getMonth()==dtToday.getMonth())&&(monthDate==dtToday.getDate())&&(thisYear==dtToday.getFullYear()))
popCalData+=(anchorVal+fnt[2]+monthDate+"</A></FONT></TD>");else
popCalData+=(anchorVal+fnt[1]+monthDate+"</A></FONT></TD>");weekDay++;monthDate++;}}
weekDay=popCalFirstDayWeek;popCalData+=("</TR>");}while(monthDate<=lastDate);popCalData+=("</TABLE></DIV><BR>");popCalData+=(closeAnchor+"</FONT>"+htmlTail);return(popCalData);}
function calPopupSetDate()
{calPopupSetDate.arguments[0].value=calPopupSetDate.arguments[1];}
function padZero(num)
{return((num<=9)?("0"+num):num);}
function constructDate(d,m,y)
{var fmtDate=this.popCalDstFmt
fmtDate=fmtDate.replace('dd',padZero(d))
fmtDate=fmtDate.replace('d',d)
fmtDate=fmtDate.replace('MM',padZero(m))
fmtDate=fmtDate.replace('M',m)
fmtDate=fmtDate.replace('yyyy',y)
fmtDate=fmtDate.replace('yy',padZero(y%100))
return fmtDate;}
function _isInteger(val){var digits="1234567890";for(var i=0;i<val.length;i++){if(digits.indexOf(val.charAt(i))==-1){return false;}}
return true;}
function _getInt(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length<minlength){return null;}
if(_isInteger(token)){return token;}}
return null;}
function getDateFromFormat(val,format){val=val+"";format=format+"";var i_val=0;var i_format=0;var c="";var token="";var x,y;var now=new Date();var year=now.getYear();var month=now.getMonth()+1;var date=1;while(i_format<format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c)&&(i_format<format.length)){token+=format.charAt(i_format++);}
if(token=="yyyy"||token=="yy"||token=="y"){if(token=="yyyy"){x=4;y=4;}
if(token=="yy"){x=2;y=2;}
if(token=="y"){x=2;y=4;}
year=_getInt(val,i_val,x,y);if(year==null){return 0;}
i_val+=year.length;if(year.length==2){if(year>70){year=1900+(year-0);}
else{year=2000+(year-0);}}}
else if(token=="MM"||token=="M"){month=_getInt(val,i_val,token.length,2);if(month==null||(month<1)||(month>12)){return 0;}
i_val+=month.length;}
else if(token=="dd"||token=="d"){date=_getInt(val,i_val,token.length,2);if(date==null||(date<1)||(date>31)){return 0;}
i_val+=date.length;}
else{if(val.substring(i_val,i_val+token.length)!=token){return 0;}
else{i_val+=token.length;}}}
if(i_val!=val.length){return 0;}
if(month==2){if(((year%4==0)&&(year%100!=0))||(year%400==0)){if(date>29){return 0;}}
else{if(date>28){return 0;}}}
if((month==4)||(month==6)||(month==9)||(month==11)){if(date>30){return 0;}}
var newdate=new Date(year,month-1,date);return newdate;}


// jQuery Tools 1.2.3 - Scrollable (navigator plugin) / Overlay (apple effect)
(function (e) {
    function n(f, c) { var a = e(c); return a.length < 2 ? a : f.parent().find(c) } function t(f, c) {
        var a = this, l = f.add(a), g = f.children(), k = 0, m = c.vertical; j || (j = a); if (g.length > 1) g = e(c.items, f); e.extend(a, { getConf: function () { return c }, getIndex: function () { return k }, getSize: function () { return a.getItems().size() }, getNaviButtons: function () { return o.add(p) }, getRoot: function () { return f }, getItemWrap: function () { return g }, getItems: function () { return g.children(c.item).not("." + c.clonedClass) }, move: function (b, d) {
            return a.seekTo(k +
b, d)
        }, next: function (b) { return a.move(1, b) }, prev: function (b) { return a.move(-1, b) }, begin: function (b) { return a.seekTo(0, b) }, end: function (b) { return a.seekTo(a.getSize() - 1, b) }, focus: function () { return j = a }, addItem: function (b) { b = e(b); if (c.circular) { e(".cloned:last").before(b); e(".cloned:first").replaceWith(b.clone().addClass(c.clonedClass)) } else g.append(b); l.trigger("onAddItem", [b]); return a }, seekTo: function (b, d, h) {
            if (c.circular && b === 0 && k == -1 && d !== 0) return a; if (!c.circular && b < 0 || b > a.getSize() || b < -1) return a;
            var i = b; if (b.jquery) b = a.getItems().index(b); else i = a.getItems().eq(b); var q = e.Event("onBeforeSeek"); if (!h) { l.trigger(q, [b, d]); if (q.isDefaultPrevented() || !i.length) return a } i = m ? { top: -i.position().top} : { left: -i.position().left }; k = b; j = a; if (d === undefined) d = c.speed; g.animate(i, d, c.easing, h || function () { l.trigger("onSeek", [b]) }); return a
        } 
        }); e.each(["onBeforeSeek", "onSeek", "onAddItem"], function (b, d) { e.isFunction(c[d]) && e(a).bind(d, c[d]); a[d] = function (h) { e(a).bind(d, h); return a } }); if (c.circular) {
            var r = a.getItems().slice(-1).clone().prependTo(g),
s = a.getItems().eq(1).clone().appendTo(g); r.add(s).addClass(c.clonedClass); a.onBeforeSeek(function (b, d, h) { if (!b.isDefaultPrevented()) if (d == -1) { a.seekTo(r, h, function () { a.end(0) }); return b.preventDefault() } else d == a.getSize() && a.seekTo(s, h, function () { a.begin(0) }) }); a.seekTo(0, 0)
        } var o = n(f, c.prev).click(function () { a.prev() }), p = n(f, c.next).click(function () { a.next() }); !c.circular && a.getSize() > 1 && a.onBeforeSeek(function (b, d) {
            setTimeout(function () {
                if (!b.isDefaultPrevented()) {
                    o.toggleClass(c.disabledClass,
d <= 0); p.toggleClass(c.disabledClass, d >= a.getSize() - 1)
                } 
            }, 1)
        }); c.mousewheel && e.fn.mousewheel && f.mousewheel(function (b, d) { if (c.mousewheel) { a.move(d < 0 ? 1 : -1, c.wheelSpeed || 50); return false } }); c.keyboard && e(document).bind("keydown.scrollable", function (b) { if (!(!c.keyboard || b.altKey || b.ctrlKey || e(b.target).is(":input"))) if (!(c.keyboard != "static" && j != a)) { var d = b.keyCode; if (m && (d == 38 || d == 40)) { a.move(d == 38 ? -1 : 1); return b.preventDefault() } if (!m && (d == 37 || d == 39)) { a.move(d == 37 ? -1 : 1); return b.preventDefault() } } });
        e(a).trigger("onBeforeSeek", [c.initialIndex])
    } e.tools = e.tools || { version: "1.2.3" }; e.tools.scrollable = { conf: { activeClass: "active", circular: false, clonedClass: "cloned", disabledClass: "disabled", easing: "swing", initialIndex: 0, item: null, items: ".items", keyboard: true, mousewheel: false, next: ".next", prev: ".prev", speed: 400, vertical: false, wheelSpeed: 0} }; var j; e.fn.scrollable = function (f) {
        var c = this.data("scrollable"); if (c) return c; f = e.extend({}, e.tools.scrollable.conf, f); this.each(function () {
            c = new t(e(this), f); e(this).data("scrollable",
c)
        }); return f.api ? c : this
    } 
})(jQuery);
(function (d) {
    function p(c, g) { var h = d(g); return h.length < 2 ? h : c.parent().find(g) } var m = d.tools.scrollable; m.navigator = { conf: { navi: ".navi", naviItem: null, activeClass: "active", indexed: false, idPrefix: null, history: false} }; d.fn.navigator = function (c) {
        if (typeof c == "string") c = { navi: c }; c = d.extend({}, m.navigator.conf, c); var g; this.each(function () {
            function h(a, b, i) { e.seekTo(b); if (j) { if (location.hash) location.hash = a.attr("href").replace("#", "") } else return i.preventDefault() } function f() {
                return k.find(c.naviItem ||
"> *")
            } function n(a) { var b = d("<" + (c.naviItem || "a") + "/>").click(function (i) { h(d(this), a, i) }).attr("href", "#" + a); a === 0 && b.addClass(l); c.indexed && b.text(a + 1); c.idPrefix && b.attr("id", c.idPrefix + a); return b.appendTo(k) } function o(a, b) { a = f().eq(b.replace("#", "")); a.length || (a = f().filter("[href=" + b + "]")); a.click() } var e = d(this).data("scrollable"), k = p(e.getRoot(), c.navi), q = e.getNaviButtons(), l = c.activeClass, j = c.history && d.fn.history; if (e) g = e; e.getNaviButtons = function () { return q.add(k) }; f().length ? f().each(function (a) {
                d(this).click(function (b) {
                    h(d(this),
a, b)
                })
            }) : d.each(e.getItems(), function (a) { n(a) }); e.onBeforeSeek(function (a, b) { setTimeout(function () { if (!a.isDefaultPrevented()) { var i = f().eq(b); !a.isDefaultPrevented() && i.length && f().removeClass(l).eq(b).addClass(l) } }, 1) }); e.onAddItem(function (a, b) { b = n(e.getItems().index(b)); j && b.history(o) }); j && f().history(o)
        }); return c.api ? g : this
    } 
})(jQuery);
(function (a) {
    function t(d, b) {
        var c = this, i = d.add(c), o = a(window), k, f, m, g = a.tools.expose && (b.mask || b.expose), n = Math.random().toString().slice(10); if (g) { if (typeof g == "string") g = { color: g }; g.closeOnClick = g.closeOnEsc = false } var p = b.target || d.attr("rel"); f = p ? a(p) : d; if (!f.length) throw "Could not find Overlay: " + p; d && d.index(f) == -1 && d.click(function (e) { c.load(e); return e.preventDefault() }); a.extend(c, { load: function (e) {
            if (c.isOpened()) return c; var h = q[b.effect]; if (!h) throw 'Overlay: cannot find effect : "' + b.effect +
'"'; b.oneInstance && a.each(s, function () { this.close(e) }); e = e || a.Event(); e.type = "onBeforeLoad"; i.trigger(e); if (e.isDefaultPrevented()) return c; m = true; g && a(f).expose(g); var j = b.top, r = b.left, u = f.outerWidth({ margin: true }), v = f.outerHeight({ margin: true }); if (typeof j == "string") j = j == "center" ? Math.max((o.height() - v) / 2, 0) : parseInt(j, 10) / 100 * o.height(); if (r == "center") r = Math.max((o.width() - u) / 2, 0); h[0].call(c, { top: j, left: r }, function () { if (m) { e.type = "onLoad"; i.trigger(e) } }); g && b.closeOnClick && a.mask.getMask().one("click",
c.close); b.closeOnClick && a(document).bind("click." + n, function (l) { a(l.target).parents(f).length || c.close(l) }); b.closeOnEsc && a(document).bind("keydown." + n, function (l) { l.keyCode == 27 && c.close(l) }); return c
        }, close: function (e) { if (!c.isOpened()) return c; e = e || a.Event(); e.type = "onBeforeClose"; i.trigger(e); if (!e.isDefaultPrevented()) { m = false; q[b.effect][1].call(c, function () { e.type = "onClose"; i.trigger(e) }); a(document).unbind("click." + n).unbind("keydown." + n); g && a.mask.close(); return c } }, getOverlay: function () { return f },
            getTrigger: function () { return d }, getClosers: function () { return k }, isOpened: function () { return m }, getConf: function () { return b } 
        }); a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function (e, h) { a.isFunction(b[h]) && a(c).bind(h, b[h]); c[h] = function (j) { a(c).bind(h, j); return c } }); k = f.find(b.close || ".close"); if (!k.length && !b.close) { k = a('<a class="close"></a>'); f.prepend(k) } k.click(function (e) { c.close(e) }); b.load && c.load()
    } a.tools = a.tools || { version: "1.2.3" }; a.tools.overlay = { addEffect: function (d,
b, c) { q[d] = [b, c] }, conf: { close: null, closeOnClick: true, closeOnEsc: true, closeSpeed: "fast", effect: "default", fixed: !a.browser.msie || a.browser.version > 6, left: "center", load: false, mask: null, oneInstance: true, speed: "normal", target: null, top: "10%"}
    }; var s = [], q = {}; a.tools.overlay.addEffect("default", function (d, b) { var c = this.getConf(), i = a(window); if (!c.fixed) { d.top += i.scrollTop(); d.left += i.scrollLeft() } d.position = c.fixed ? "fixed" : "absolute"; this.getOverlay().css(d).fadeIn(c.speed, b) }, function (d) {
        this.getOverlay().fadeOut(this.getConf().closeSpeed,
d)
    }); a.fn.overlay = function (d) { var b = this.data("overlay"); if (b) return b; if (a.isFunction(d)) d = { onBeforeLoad: d }; d = a.extend(true, {}, a.tools.overlay.conf, d); this.each(function () { b = new t(a(this), d); s.push(b); a(this).data("overlay", b) }); return d.api ? b : this } 
})(jQuery);
(function (i) {
    function j(b) { var d = b.offset(); return { top: d.top + b.height() / 2, left: d.left + b.width() / 2} } var k = i.tools.overlay, f = i(window); i.extend(k.conf, { start: { top: null, left: null }, fadeInSpeed: "fast", zIndex: 9999 }); function n(b, d) {
        var a = this.getOverlay(), c = this.getConf(), g = this.getTrigger(), o = this, l = a.outerWidth({ margin: true }), h = a.data("img"); if (!h) {
            var e = a.css("backgroundImage"); if (!e) throw "background-image CSS property not set for overlay"; e = e.slice(e.indexOf("(") + 1, e.indexOf(")")).replace(/\"/g, "");
            a.css("backgroundImage", "none"); h = i('<img src="' + e + '"/>'); h.css({ border: 0, display: "none" }).width(l); i("body").append(h); a.data("img", h)
        } e = c.start.top || Math.round(f.height() / 2); var m = c.start.left || Math.round(f.width() / 2); if (g) { g = j(g); e = g.top; m = g.left } h.css({ position: "absolute", top: e, left: m, width: 0, zIndex: c.zIndex }).show(); b.top += f.scrollTop(); b.left += f.scrollLeft(); b.position = "absolute"; a.css(b); h.animate({ top: a.css("top"), left: a.css("left"), width: l }, c.speed, function () {
            if (c.fixed) {
                b.top -= f.scrollTop();
                b.left -= f.scrollLeft(); b.position = "fixed"; h.add(a).css(b)
            } a.css("zIndex", c.zIndex + 1).fadeIn(c.fadeInSpeed, function () { o.isOpened() && !i(this).index(a) ? d.call() : a.hide() })
        })
    } function p(b) { var d = this.getOverlay().hide(), a = this.getConf(), c = this.getTrigger(); d = d.data("img"); var g = { top: a.start.top, left: a.start.left, width: 0 }; c && i.extend(g, j(c)); a.fixed && d.css({ position: "absolute" }).animate({ top: "+=" + f.scrollTop(), left: "+=" + f.scrollLeft() }, 0); d.animate(g, a.closeSpeed, b) } k.addEffect("apple", n, p)
})(jQuery);

/*
(function($) {
   function fireEvent(opts, name, self, arg) {
      var fn = opts[name]; 
      
      if($.isFunction(fn)) {
         try { return fn.call(self, arg); }
         catch(error) {
            if(opts.alert) { alert("Error calling scrollable." + name + ": " + error); }
            else { throw error; }
            return false; 
         }
      }
      return true; 
   }

   var current = null; 
   
   function Scrollable(root, conf) {
   alert(root);
      var self = this; 
      if(!current) { current = self; }
      var horizontal =!conf.vertical; 
      var wrap = $(conf.items, root); 
      var index = 0; 
      var navi = root.siblings(conf.navi).eq(0); 
      var prev = root.siblings(conf.prev).eq(0); 
      var next = root.siblings(conf.next).eq(0); 
      var prevPage = root.siblings(conf.prevPage).eq(0); 
      var nextPage = root.siblings(conf.nextPage).eq(0); 
      
      $.extend(self, {
         getVersion : function() { return[1, 0, 1]; }
         , getIndex : function() { return index; }
         , getConf : function() {  return conf; }
         , getSize : function() {  return self.getItems().size(); }
         , getPageAmount : function() { return Math.ceil(this.getSize() / conf.size); }
         , getPageIndex : function() { return Math.ceil(index / conf.size); }
         , getRoot : function() { return root; }
         , getItemWrap : function() { return wrap; }
         , getItems : function() {  return wrap.children(); }
         , seekTo : function(i, time, fn) {
           time = time || conf.speed; if($.isFunction(time)) {
               fn = time; time = conf.speed; }
            if(i < 0) {
               i = 0; }
            if(i > self.getSize() - conf.size) {
               return self; }
            var item = self.getItems().eq(i); if(!item.length) {
               return self; }
            if(fireEvent(conf, "onBeforeSeek", self, i) === false) {
               return self; }
            if(horizontal) {
               var left =- (item.outerWidth(true) * i); wrap.animate( {
                  left : left}
               , time, conf.easing, fn ? function() {
                  fn.call(self); }
               : null); }
            else {
               var top =- (item.outerHeight(true) * i); wrap.animate( {
                  top : top}
               , time, conf.easing, fn ? function() {
                  fn.call(self); }
               : null); }
            if(navi.length) {
               var klass = conf.activeClass; var page = Math.ceil(i / conf.size); page = Math.min(page, navi.children().length - 1); navi.children().removeClass(klass).eq(page).addClass(klass); }
            if(i === 0) {
               prev.add(prevPage).addClass(conf.disabledClass); }
            else {
               prev.add(prevPage).removeClass(conf.disabledClass); }
            if(i >= self.getSize() - conf.size) {
               next.add(nextPage).addClass(conf.disabledClass); }
            else {
               next.add(nextPage).removeClass(conf.disabledClass); }
            current = self; index = i; fireEvent(conf, "onSeek", self, i); return self; }
         , move : function(offset, time, fn) {
            var to = index + offset; if(conf.loop && to > (self.getSize() - conf.size)) {
               to = 0; }
            return this.seekTo(to, time, fn); }
         , next : function(time, fn) { return this.move(1, time, fn); }
         , prev : function(time, fn) { return this.move( - 1, time, fn); }
         , movePage : function(offset, time, fn) { return this.move(conf.size * offset, time, fn); }
         , setPage : function(page, time, fn) {
            var size = conf.size; 
            var index = size * page; 
            var lastPage = index + size >= this.getSize(); 
            if(lastPage) { index = this.getSize() - conf.size; }
            return this.seekTo(index, time, fn); }
         , prevPage : function(time, fn) { return this.setPage(this.getPageIndex() - 1, time, fn); }
         , nextPage : function(time, fn) { return this.setPage(this.getPageIndex() + 1, time, fn); }
         , begin : function(time, fn) { return this.seekTo(0, time, fn); }
         , end : function(time, fn) { return this.seekTo(this.getSize() - conf.size, time, fn); }
         , reload : function() { return load(); }
         , click : function(index, time, fn) {
         alert(index);
         alert(time);
         alert(fn);
            var item = self.getItems().eq(index); 
            var klass = conf.activeClass; 
            if(!item.hasClass(klass) && (index >= 0 || index < this.getSize())) {
               self.getItems().removeClass(klass); item.addClass(klass); 
               var delta = Math.floor(conf.size / 2); 
               var to = index - delta; 
               if(to > self.getSize() - conf.size) { to--; }
               if(to !== index) {
                  return this.seekTo(to, time, fn); }
               }
            return self; }
         }
      );
      
      if($.isFunction($.fn.mousewheel)) {
         root.bind("mousewheel.scrollable", function(e, delta) {
            var step = $.browser.opera ? 1 :- 1; self.move(delta > 0 ? step :- step, 50); return false; }
         ); }
      prev.addClass(conf.disabledClass).click(function() {
         self.prev(); }
      ); next.click(function() {
         self.next(); }
      ); nextPage.click(function() {
         self.nextPage(); }
      ); prevPage.addClass(conf.disabledClass).click(function() {
         self.prevPage(); }
      ); if(conf.keyboard) {
         $(window).unbind("keypress.scrollable").bind("keypress.scrollable", function(evt) {
            var el = current; if(!el) {
               return; }
            if(horizontal && (evt.keyCode == 37 || evt.keyCode == 39)) {
               el.move(evt.keyCode == 37 ?- 1 : 1); return evt.preventDefault(); }
            if(!horizontal && (evt.keyCode == 38 || evt.keyCode == 40)) {
               el.move(evt.keyCode == 38 ?- 1 : 1); return evt.preventDefault(); }
            return true; }
         ); }
      function load() {
         navi.each(function() {
            var nav = $(this); if(nav.is(":empty") || nav.data("me") == self) {
               nav.empty(); nav.data("me", self); for(var i = 0; i < self.getPageAmount(); i++) {
                  var item = $("<" + conf.naviItem + "/>").attr("href", i).click(function(e) {
                     var el = $(this); el.parent().children().removeClass(conf.activeClass); el.addClass(conf.activeClass); self.setPage(el.attr("href")); return e.preventDefault(); }
                  ); if(i === 0) {
                     item.addClass(conf.activeClass); }
                  nav.append(item); }
               }
            else {
               var els = nav.children(); els.each(function(i) {
                  var item = $(this); item.attr("href", i); if(i === 0) {
                     item.addClass(conf.activeClass); }
                  item.click(function() {
                     nav.find("." + conf.activeClass).removeClass(conf.activeClass); item.addClass(conf.activeClass); self.setPage(item.attr("href")); }
                  ); }
               ); }
            }
         ); if(conf.clickable) {
            self.getItems().each(function(index, arg) {
               var el = $(this); if(!el.data("set")) {
                  el.bind("click.scrollable", function() {
                     self.click(index); }
                  ); el.data("set", true); }
               }
            ); }
         if(conf.hoverClass) {
            self.getItems().hover(function() {
               $(this).addClass(conf.hoverClass); }
            , function() {
               $(this).removeClass(conf.hoverClass); }
            ); }
         return self; }
      load(); var timer = null; function setTimer() {
         timer = setInterval(function() {
            self.next(); }
         , conf.interval); }
      if(conf.interval > 0) {
         root.hover(function() {
            clearInterval(timer); }
         , function() {
            setTimer(); }
         ); setTimer(); }
      }
   jQuery.prototype.scrollable = function(conf) {
      var api = this.eq(typeof conf == 'number' ? conf : 0).data("scrollable"); 
      
      if(api) { return api; }

      var opts = { size : 5, vertical : false, clickable : false, loop : false, interval : 0, speed : 400, keyboard : true, activeClass : 'active', disabledClass : 'disabled', hoverClass : null, easing : 'swing', items : '.items', prev : '.prev', next : '.next', prevPage : '.prevPage', nextPage : '.nextPage', navi : '.navi', naviItem : 'a', onBeforeSeek : null, onSeek : null, alert : true}; 
         
      jQuery.extend(opts, conf); 
         
      this.each(function() { 
        var el = new Scrollable($(this), opts); 
        jQuery(this).data("scrollable", el); 
      }
    ); 
    return this; };
})(jQuery);
*/
