/*
Stylish Select 0.4.1 - $ plugin to replace a select drop down box with a stylable unordered list
http://github.com/sko77sun/Stylish-Select

Requires: jQuery 1.3 or newer

Contributions from Justin Beasley: http://www.harvest.org/ & Anatoly Ressin: http://www.artazor.lv/

Dual licensed under the MIT and GPL licenses.

*/
(function($){$('html').addClass('stylish-select');Array.prototype.indexOf=function(obj,start){for(var i=(start||0);i<this.length;i++){if(this[i]==obj){return i;}}}
$.fn.extend({getSetSSValue:function(value){if(value){$(this).val(value).change();return this;}else{return $(this).find(':selected').val();}},resetSS:function(){var oldOpts=$(this).data('ssOpts');$this=$(this);$this.next().remove();$this.unbind('.sSelect').sSelect(oldOpts);}});$.fn.sSelect=function(options){return this.each(function(){var defaults={defaultText:'Please select',animationSpeed:0,ddMaxHeight:'',containerClass:''};var opts=$.extend(defaults,options),$input=$(this),$containerDivText=$('<div class="selectedTxt"></div>'),$containerDiv=$('<div class="newListSelected '+opts.containerClass+'"></div>'),$newUl=$('<ul class="newList" style="visibility:hidden;"></ul>'),itemIndex=-1,currentIndex=-1,keys=[],prevKey=false,prevented=false,$newLi;$(this).data('ssOpts',options);$containerDiv.insertAfter($input);$containerDiv.attr("tabindex",$input.attr("tabindex")||"0");$containerDivText.prependTo($containerDiv);$newUl.appendTo($containerDiv);$input.hide();$containerDivText.data('ssReRender',!$containerDivText.is(':visible'));if($input.children('optgroup').length==0){$input.children().each(function(i){var option=$(this).html();var key=$(this).val();var optTitle=$(this).attr('title');var flag='';var cf='';if(optTitle!='' && 0){flag='<img src="'+optTitle+'" width="16" height="11" alt="'+option+'" /> ';}else{flag=''; cf=$(this).attr('value');}
keys.push(option.charAt(0).toLowerCase());if($(this).attr('selected')==true){ opts.defaultText=option;currentIndex=i;}
$newUl.append($('<li class="'+cf+'"><a href="JavaScript:void(0);">'+flag+option+'</a></li>').data('key',key));});$newLi=$newUl.children().children();}else{$input.children('optgroup').each(function(){var optionTitle=$(this).attr('label'),$optGroup=$('<li class="newListOptionTitle">'+optionTitle+'</li>');$optGroup.appendTo($newUl);var $optGroupList=$('<ul></ul>');$optGroupList.appendTo($optGroup);$(this).children().each(function(){++itemIndex;var option=$(this).text();var key=$(this).val();var optTitle=$(this).attr('title');var flag='';if(optTitle!=''){flag='<img src="'+optTitle+'" width="16" height="11" alt="'+option+'" /> ';}else{flag='';}
keys.push(option.charAt(0).toLowerCase());if($(this).attr('selected')==true){opts.defaultText=option;currentIndex=itemIndex;}
$optGroupList.append($('<li><a href="JavaScript:void(0);">'+flag+option+'</a></li>').data('key',key));})});$newLi=$newUl.find('ul li a');}
var newUlHeight=$newUl.height(),containerHeight=$containerDiv.height(),newLiLength=$newLi.length;if(currentIndex!=-1){navigateList(currentIndex,true);}else{$containerDivText.text(opts.defaultText);}
function newUlPos(){var containerPosY=$containerDiv.offset().top,docHeight=jQuery(window).height(),scrollTop=jQuery(window).scrollTop();if(newUlHeight>parseInt(opts.ddMaxHeight)){newUlHeight=parseInt(opts.ddMaxHeight);}
containerPosY=containerPosY-scrollTop;if(containerPosY+newUlHeight>=docHeight){$newUl.css({top:'-'+newUlHeight+'px',height:newUlHeight});$input.onTop=true;}else{$newUl.css({top:containerHeight+'px',height:newUlHeight});$input.onTop=false;}}
newUlPos();$(window).bind('resize.sSelect scroll.sSelect',newUlPos);function positionFix(){$containerDiv.css('position','relative');}
function positionHideFix(){$containerDiv.css('position','static');}
$containerDivText.bind('click.sSelect',function(event){event.stopPropagation();if($(this).data('ssReRender')){newUlHeight=$newUl.height('').height();containerHeight=$containerDiv.height();$(this).data('ssReRender',false);newUlPos();}
$('.newList').not($(this).next()).hide().parent().css('position','static').removeClass('newListSelFocus');$newUl.toggle();positionFix();$newLi.eq(currentIndex).focus();});$newLi.bind('click.sSelect',function(e){var $clickedLi=$(e.target);currentIndex=$newLi.index($clickedLi);prevented=true;navigateList(currentIndex);$newUl.hide();$containerDiv.css('position','static');});$newLi.bind('mouseenter.sSelect',function(e){var $hoveredLi=$(e.target);$hoveredLi.addClass('newListHover');}).bind('mouseleave.sSelect',function(e){var $hoveredLi=$(e.target);$hoveredLi.removeClass('newListHover');});function navigateList(currentIndex,init){$newLi.removeClass('hiLite').eq(currentIndex).addClass('hiLite');if($newUl.is(':visible')){$newLi.eq(currentIndex).focus();}
var val=$newLi.eq(currentIndex).parent().data('key');var text=$newLi.eq(currentIndex).html();if(init==true){$input.val(val);$containerDivText.html(text);$containerDivText.attr("class","selectedTxt "+val);return false;}
try{$input.val(val)}catch(ex){$input[0].selectedIndex=currentIndex;}
$input.change();$containerDivText.html(text);$containerDivText.attr("class","selectedTxt "+val);}
$input.bind('change.sSelect',function(event){$targetInput=$(event.target);if(prevented==true){prevented=false;return false;}
$currentOpt=$targetInput.find(':selected');currentIndex=$targetInput.find('option').index($currentOpt);navigateList(currentIndex,true);});function keyPress(element){$(element).unbind('keydown.sSelect').bind('keydown.sSelect',function(e){var keycode=e.which;prevented=true;switch(keycode){case 40:case 39:incrementList();return false;break;case 38:case 37:decrementList();return false;break;case 33:case 36:gotoFirst();return false;break;case 34:case 35:gotoLast();return false;break;case 13:case 27:$newUl.hide();positionHideFix();return false;break;}
keyPressed=String.fromCharCode(keycode).toLowerCase();var currentKeyIndex=keys.indexOf(keyPressed);if(typeof currentKeyIndex!='undefined'){++currentIndex;currentIndex=keys.indexOf(keyPressed,currentIndex);if(currentIndex==-1||currentIndex==null||prevKey!=keyPressed)currentIndex=keys.indexOf(keyPressed);navigateList(currentIndex);prevKey=keyPressed;return false;}});}
function incrementList(){if(currentIndex<(newLiLength-1)){++currentIndex;navigateList(currentIndex);}}
function decrementList(){if(currentIndex>0){--currentIndex;navigateList(currentIndex);}}
function gotoFirst(){currentIndex=0;navigateList(currentIndex);}
function gotoLast(){currentIndex=newLiLength-1;navigateList(currentIndex);}
$containerDiv.bind('click.sSelect',function(e){e.stopPropagation();keyPress(this);});$containerDiv.bind('focus.sSelect',function(){$(this).addClass('newListSelFocus');keyPress(this);});$containerDiv.bind('blur.sSelect',function(){$(this).removeClass('newListSelFocus');});$(document).bind('click.sSelect',function(){$containerDiv.removeClass('newListSelFocus');$newUl.hide();positionHideFix();});$containerDivText.bind('mouseenter.sSelect',function(e){var $hoveredTxt=$(e.target);$hoveredTxt.parent().addClass('newListSelHover');}).bind('mouseleave.sSelect',function(e){var $hoveredTxt=$(e.target);$hoveredTxt.parent().removeClass('newListSelHover');});$newUl.css({left:'0',display:'none',visibility:'visible'});});};})(jQuery);

/*
 * jQuery tableHover plugin
 * Version: 0.1.4
 *
 * Copyright (c) 2007 Roman Weich
 * http://p.sohei.org
 *
 * Dual licensed under the MIT and GPL licenses 
 * (This means that you can choose the license that best suits your project, and use it accordingly):
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function($)
{var fixCellIndexes=function(table)
{var rows=table.rows;var len=rows.length;var matrix=[];for(var i=0;i<len;i++)
{var cells=rows[i].cells;var clen=cells.length;for(var j=0;j<clen;j++)
{var c=cells[j];var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1;var firstAvailCol=-1;if(!matrix[i])
{matrix[i]=[];}
var m=matrix[i];while(m[++firstAvailCol]){}
c.realIndex=firstAvailCol;for(var k=i;k<i+rowSpan;k++)
{if(!matrix[k])
{matrix[k]=[];}
var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++)
{matrixrow[l]=1;}}}}};var fixRowIndexes=function(tbl)
{var v=0,i,k,r=(tbl.tHead)?tbl.tHead.rows:0;if(r)
{for(i=0;i<r.length;i++)
{r[i].realRIndex=v++;}}
for(k=0;k<tbl.tBodies.length;k++)
{r=tbl.tBodies[k].rows;if(r)
{for(i=0;i<r.length;i++)
{r[i].realRIndex=v++;}}}
r=(tbl.tFoot)?tbl.tFoot.rows:0;if(r)
{for(i=0;i<r.length;i++)
{r[i].realRIndex=v++;}}};$.fn.tableHover=function(options)
{var settings=$.extend({allowHead:true,allowBody:true,allowFoot:true,headRows:false,bodyRows:true,footRows:false,spanRows:true,headCols:false,bodyCols:true,footCols:false,spanCols:true,ignoreCols:[],headCells:false,bodyCells:true,footCells:false,rowClass:'hover',colClass:'',cellClass:'',clickClass:''},options);return this.each(function()
{var colIndex=[],rowIndex=[],tbl=this,r,rCnt=0,lastClick=[-1,-1];if(!tbl.tBodies||!tbl.tBodies.length)
{return;}
var addToIndex=function(rows,nodeName)
{var c,row,rowI,cI,rI,s;for(rowI=0;rowI<rows.length;rowI++,rCnt++)
{row=rows[rowI];for(cI=0;cI<row.cells.length;cI++)
{c=row.cells[cI];if((nodeName=='TBODY'&&settings.bodyRows)||(nodeName=='TFOOT'&&settings.footRows)||(nodeName=='THEAD'&&settings.headRows))
{s=c.rowSpan;while(--s>=0)
{rowIndex[rCnt+s].push(c);}}
if((nodeName=='TBODY'&&settings.bodyCols)||(nodeName=='THEAD'&&settings.headCols)||(nodeName=='TFOOT'&&settings.footCols))
{s=c.colSpan;while(--s>=0)
{rI=c.realIndex+s;if($.inArray(rI+1,settings.ignoreCols)>-1)
{break;}
if(!colIndex[rI])
{colIndex[rI]=[];}
colIndex[rI].push(c);}}
if((nodeName=='TBODY'&&settings.allowBody)||(nodeName=='THEAD'&&settings.allowHead)||(nodeName=='TFOOT'&&settings.allowFoot))
{c.thover=true;}}}};var over=function(e)
{var p=e.target;while(p!=this&&p.thover!==true)
{p=p.parentNode;}
if(p.thover===true)
{highlight(p,true);}};var out=function(e)
{var p=e.target;while(p!=this&&p.thover!==true)
{p=p.parentNode;}
if(p.thover===true)
{highlight(p,false);}};var click=function(e)
{var t=e.target;while(t&&t!=tbl&&!t.thover)
t=t.parentNode;if(t.thover&&settings.clickClass!='')
{var x=t.realIndex,y=t.parentNode.realRIndex,s='';$('td.'+settings.clickClass+', th.'+settings.clickClass,tbl).removeClass(settings.clickClass);if(x!=lastClick[0]||y!=lastClick[1])
{if(settings.rowClass!='')
{s+=',.'+settings.rowClass;}
if(settings.colClass!='')
{s+=',.'+settings.colClass;}
if(settings.cellClass!='')
{s+=',.'+settings.cellClass;}
if(s!='')
{$('td, th',tbl).filter(s.substring(1)).addClass(settings.clickClass);}
lastClick=[x,y];}
else
{lastClick=[-1,-1];}}};var highlight=function(cell,on)
{if(on)
{$.fn.tableHoverHover=$.fn.addClass;}
else
{$.fn.tableHoverHover=$.fn.removeClass;}
var h=colIndex[cell.realIndex]||[],rH=[],i=0,rI,nn;if(settings.colClass!='')
{while(settings.spanCols&&++i<cell.colSpan&&colIndex[cell.realIndex+i])
{h=h.concat(colIndex[cell.realIndex+i]);}
$(h).tableHoverHover(settings.colClass);}
if(settings.rowClass!='')
{rI=cell.parentNode.realRIndex;if(rowIndex[rI])
{rH=rH.concat(rowIndex[rI]);}
i=0;while(settings.spanRows&&++i<cell.rowSpan)
{if(rowIndex[rI+i])
{rH=rH.concat(rowIndex[rI+i]);}}
$(rH).tableHoverHover(settings.rowClass);}
if(settings.cellClass!='')
{nn=cell.parentNode.parentNode.nodeName.toUpperCase();if((nn=='TBODY'&&settings.bodyCells)||(nn=='THEAD'&&settings.headCells)||(nn=='TFOOT'&&settings.footCells))
{$(cell).tableHoverHover(settings.cellClass);}}};fixCellIndexes(tbl);fixRowIndexes(tbl);for(r=0;r<tbl.rows.length;r++)
{rowIndex[r]=[];}
if(tbl.tHead)
{addToIndex(tbl.tHead.rows,'THEAD');}
for(r=0;r<tbl.tBodies.length;r++)
{addToIndex(tbl.tBodies[r].rows,'TBODY');}
if(tbl.tFoot)
{addToIndex(tbl.tFoot.rows,'TFOOT');}
$(this).bind('mouseover',over).bind('mouseout',out).click(click);});};})(jQuery);

/*
#		jQuery Slinky Slider Plugin
#		---------------------------
#		Version:			1.0
#		---------------------------
#		Author:				samhs
# 		http://ohwrite.co.uk/jquery/jquery-plugin-slinky-slider/
#		http://docs.jquery.com/Plugins/SlinkySlider
#
# 		Copyright (c) 2009 Sam Hampton-Smith
#
#		Dual licensed under the MIT and GPL licenses:
#	 	http://www.opensource.org/licenses/mit-license.php
#		http://www.gnu.org/licenses/gpl.html
#
#		Please view files mit.txt and gpl.txt for full license terms
#		And include these two files if you redistribute this software
*/

(function($) {
    $.fn.slinkySlider = function(settings) {	
        // Utility variables - do not alter
        var currentpanel;
        var panelwidth;
        var goforward = true;
        var t;
        settings = $.extend({}, $.fn.slinkySlider.defaults, settings);
        
        return $(this).each(function(){
            panelwidth = $(this).width();
            $(this).css("overflow","hidden");
            settings.largesize = panelwidth-((settings.numberofpanels-1)*(settings.smallsize+settings.panelspacing));
            container = $(this);
            elheight = container.height();
            for (var i=1;i<=settings.numberofpanels;i++) {
                    $(container).append("<div class='panelwrappers'><div class='panel'></div></div>");
                    //$(".panelwrappers:last .panel").load(settings.panelname+i+".html").parents(".panelwrappers").data("number",i);
                    $(".panelwrappers:last .panel").append($("#slider ul li."+settings.panelname+i).html()).parents(".panelwrappers").data("number",i);
            }
            currentpanel = $(".panelwrappers:first");
            $(".panelwrappers").css({
                            "width"		:	settings.smallsize+"px", 
                            "float"		:	"left",
                            "height"	:	elheight+"px"});
            $(".panels").css({
                            "width"		:	settings.largesize+"px",
                            "height"	:	"100%"});
            $(currentpanel).css("width",settings.largesize+"px");
            $(".panelwrappers").not(":last").css("margin-right",settings.panelspacing+"px");
            $(".panelwrappers").each(function(){
                    $(this).mouseover(function(){switchpanel(this);});
            });
            if (settings.doauto) t = setTimeout(function(){switchpanel(null);},settings.autotimer);
        });
        
        function switchpanel(newpanel) {
            if (newpanel==currentpanel) {
                // do nothing because we're already on this panel
            } else {
                var auto = false;
                if (newpanel==null) {
                        auto = true;
                        if (goforward && $(currentpanel).data("number")==settings.numberofpanels) {
                                goforward=false;
                        }
                        if (!goforward && $(currentpanel).data("number")==1) {
                                goforward=true;
                        }						
                        if (goforward) {
                                newpanel = $(currentpanel).next();
                        } else {
                                newpanel = $(currentpanel).prev();
                        }							
                }
                else {
                        $(".panelwrappers").stop();
                        clearTimeout(t);
                }
                $(".panelwrappers").not(newpanel).animate({width: settings.smallsize+"px"},settings.transition, "swing");
                $(newpanel).animate({width: settings.largesize+"px"},settings.transition, "swing");				
                currentpanel = newpanel;
                if (auto) t = setTimeout(function(){switchpanel(null);},settings.autotimer); 
            }
        }
    }
        
    $.fn.slinkySlider.defaults = {
        autotimer:8000,
        transition:1000,
        panelspacing:3,
        smallsize:20,
        numberofpanels:5,
        largesize:0,
        doauto:true,
        panelname:"panel"
    }

})(jQuery);

/*
 * 	Easy Slider 1.7 - jQuery plugin
 *	written by Alen Grakalic	
 *	http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding
 *
 *	Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
 *	Dual licensed under the MIT (MIT-LICENSE.txt)
 *	and GPL (GPL-LICENSE.txt) licenses.
 *
 *	Built for jQuery library
 *	http://jquery.com */
(function($){$.fn.easySlider=function(options){var defaults={prevId:"prevBtn",prevText:"Previous",nextId:"nextBtn",nextText:"Next",controlsShow:true,controlsBefore:"",controlsAfter:"",controlsFade:true,firstId:"firstBtn",firstText:"First",firstShow:false,lastId:"lastBtn",lastText:"Last",lastShow:false,vertical:false,speed:800,auto:false,pause:2000,continuous:false,numeric:false,numericId:"controls"};var options=$.extend(defaults,options);this.each(function(){var obj=$(this);var s=$("li",obj).length;var w=$("li",obj).width();var h=$("li",obj).height();var clickable=true;obj.width(w);obj.height(h);obj.css("overflow","hidden");var ts=s-1;var t=0;$("ul",obj).css("width",s*w);if(options.continuous){$("ul",obj).prepend($("ul li:last-child",obj).clone().css("margin-left","-"+w+"px"));$("ul",obj).append($("ul li:nth-child(2)",obj).clone());$("ul",obj).css("width",(s+1)*w);}if(!options.vertical){$("li",obj).css("float","left");}if(options.controlsShow){var html=options.controlsBefore;if(options.numeric){html+='<ol id="'+options.numericId+'"></ol>';}else{if(options.firstShow){html+='<span id="'+options.firstId+'"><a href="javascript:void(0);">'+options.firstText+"</a></span>";}html+=' <span id="'+options.prevId+'"><a href="javascript:void(0);">'+options.prevText+"</a></span>";html+=' <span id="'+options.nextId+'"><a href="javascript:void(0);">'+options.nextText+"</a></span>";if(options.lastShow){html+=' <span id="'+options.lastId+'"><a href="javascript:void(0);">'+options.lastText+"</a></span>";}}html+=options.controlsAfter;$(obj).after(html);}if(options.numeric){for(var i=0;i<s;i++){$(document.createElement("li")).attr("id",options.numericId+(i+1)).html("<a rel="+i+' href="javascript:void(0);"><span class=\"title\">'+(i+1)+"</span></a>").appendTo($("#"+options.numericId)).click(function(){animate($("a",$(this)).attr("rel"),true);});}}else{$("a","#"+options.nextId).click(function(){animate("next",true);});$("a","#"+options.prevId).click(function(){animate("prev",true);});$("a","#"+options.firstId).click(function(){animate("first",true);});$("a","#"+options.lastId).click(function(){animate("last",true);});}function setCurrent(i){i=parseInt(i)+1;$("li","#"+options.numericId).removeClass("current");$("li#"+options.numericId+i).addClass("current");}function adjust(){if(t>ts){t=0;}if(t<0){t=ts;}if(!options.vertical){$("ul",obj).css("margin-left",(t*w*-1));}else{$("ul",obj).css("margin-left",(t*h*-1));}clickable=true;if(options.numeric){setCurrent(t);}options.onChange(t);}

function animate(dir,clicked)
{
	//MC Hack para slide contínuo depois do click --- inicio  27/12/2011, issue 606
	t = parseInt(t + "", 10);
	//MC Hack para slide contínuo depois do click --- fim
	if(clickable){clickable=false;
	var ot=t;
	switch(dir)
	{
		case"next":t=(ot>=ts)?(options.continuous?t+1:ts):t+1;break;
		case"prev":t=(t<=0)?(options.continuous?t-1:0):t-1;break;
		case"first":t=0;break;
		case"last":t=ts;break;
		default:t=dir;break;
	}
	//if(t > ts && t == (ot * 10 + 1))
	var diff=Math.abs(ot-t);
	//console.log("diff = "+ diff);
	var speed=diff*options.speed;
	if(!options.vertical)
	{
		p=(t*w*-1);$("ul",obj).animate({marginLeft:p},{queue:false,duration:speed,complete:adjust});
	}
	else
	{
		p=(t*h*-1);$("ul",obj).animate({marginTop:p},{queue:false, duration:speed, complete:adjust});
	}
	if(!options.continuous&&options.controlsFade)
	{
		if(t==ts)
		{
			$("a","#"+options.nextId).hide();$("a","#"+options.lastId).hide();
		}
		else
		{
			$("a","#"+options.nextId).show();$("a","#"+options.lastId).show();
		}
		if(t==0)
		{
			$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide();
		}
		else
		{
			$("a","#"+options.prevId).show();$("a","#"+options.firstId).show();
		}
	}
	
	if(clicked)
	{
		clearTimeout(timeout);
		//MC Hack para slide contínuo depois do click --- inicio  27/12/2011, issue 606
		timeout=setTimeout(function(){animate("next",false);},diff*options.speed+options.pause);
		//MC Hack para slide contínuo depois do click --- fim
	}
	if(options.auto&&dir=="next"&&!clicked)
	{
		//MC Hack para slide contínuo depois do click --- inicio  27/12/2011, issue 606
		clearTimeout(timeout);
		//MC Hack para slide contínuo depois do click --- fim
		timeout=setTimeout(function(){animate("next",false);},diff*options.speed+options.pause);
	}
}
}
var timeout;
if(options.auto)
{
	timeout=setTimeout(function()
	{animate("next",false);}, options.pause );
}
if(options.numeric){setCurrent(0);}
if(!options.continuous&&options.controlsFade){$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide();}});};})(jQuery);

/*!
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */

(function(i){var q={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null, itemFallbackDimension:null},r=false;i(window).bind("load.jcarousel",function(){r=true});i.jcarousel=function(a,c){this.options=i.extend({},q,c||{});this.autoStopped=this.locked=false;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===undefined)this.options.rtl=(i(a).attr("dir")||i("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?this.options.rtl? "right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f<d.length;f++)if(d[f].indexOf("jcarousel-skin")!=-1){i(a).removeClass(d[f]);b=d[f];break}if(a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"){this.list=i(a);this.container=this.list.parent();if(this.container.hasClass("jcarousel-clip")){if(!this.container.parent().hasClass("jcarousel-container"))this.container=this.container.wrap("<div></div>");this.container=this.container.parent()}else if(!this.container.hasClass("jcarousel-container"))this.container= this.list.wrap("<div></div>").parent()}else{this.container=i(a);this.list=this.container.find("ul,ol").eq(0)}b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip"))this.clip=this.list.wrap("<div></div>").parent();this.buttonNext=i(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext= this.clip.after(this.options.buttonNextHTML).next();this.buttonNext.addClass(this.className("jcarousel-next"));this.buttonPrev=i(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next();this.buttonPrev.addClass(this.className("jcarousel-prev"));this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden",position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden", position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;b=this.list.children("li");var e=this;if(b.size()>0){var g=0,k=this.options.offset;b.each(function(){e.format(this,k++);g+=e.dimension(this, j)});this.list.css(this.wh,g+100+"px");if(!c||c.size===undefined)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.reload()};this.options.initCallback!==null&&this.options.initCallback(this,"init");if(!r&&i.browser.safari){this.buttons(false,false);i(window).bind("load.jcarousel",function(){e.setup()})}else this.setup()}; var h=i.jcarousel;h.fn=h.prototype={jcarousel:"0.2.7"};h.fn.extend=h.extend=i.extend;h.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;this.animating=false;this.tail=this.timer=null;this.inTail=false;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,true);this.prevFirst=this.prevLast=null;this.animate(a,false);i(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)}}, reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,h.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0; this.list.children("li").each(function(f){b+=a.dimension(this,c);if(f+1<a.first)d=b});this.list.css(this.wh,b+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(a){if(a!==undefined){this.options.size=a;this.locked||this.buttons()}return this.options.size},has:function(a,c){if(c===undefined||!c)c=a;if(this.options.size!==null&&c>this.options.size)c=this.options.size;for(var b= a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return false}return true},get:function(a){return i(".jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,f=i(c);if(b.length===0){var j,e=h.intval(a);for(b=this.create(a);;){j=this.get(--e);if(e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}}else d=this.dimension(b);if(f.get(0).nodeName.toUpperCase()=="LI"){b.replaceWith(f);b=f}else b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")), a);f=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;d=this.dimension(b,f)-d;a>0&&a<this.first&&this.list.css(this.lt,h.intval(this.list.css(this.lt))-d+"px");this.list.css(this.wh,h.intval(this.list.css(this.wh))+d+"px");return b},remove:function(a){var c=this.get(a);if(!(!c.length||a>=this.first&&a<=this.last)){var b=this.dimension(c);a<this.first&&this.list.css(this.lt,h.intval(this.list.css(this.lt))+b+"px");c.remove();this.list.css(this.wh,h.intval(this.list.css(this.wh))- b+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(false):this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(true):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(a){if(!(this.locked|| this.animating||!this.tail)){this.pauseAuto();var c=h.intval(this.list.css(this.lt));c=!a?c-this.tail:c+this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(c)}},scroll:function(a,c){if(!(this.locked||this.animating)){this.pauseAuto();this.animate(this.pos(a),c)}},pos:function(a,c){var b=h.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;if(this.options.wrap!="circular")a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a;for(var d= this.first>a,f=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(f):this.get(this.last),e=d?f:f-1,g=null,k=0,l=false,m=0;d?--e>=a:++e<a;){g=this.get(e);l=!g.length;if(g.length===0){g=this.create(e).addClass(this.className("jcarousel-item-placeholder"));j[d?"before":"after"](g);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)){j=this.get(this.index(e));if(j.length)g=this.add(e,j.clone(true))}}j=g;m=this.dimension(g);if(l)k+= m;if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<=this.options.size)))b=d?b+m:b-m}f=this.clipping();var p=[],o=0,n=0;j=this.get(a-1);for(e=a;++o;){g=this.get(e);l=!g.length;if(g.length===0){g=this.create(e).addClass(this.className("jcarousel-item-placeholder"));j.length===0?this.list.prepend(g):j[d?"before":"after"](g);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)){j=this.get(this.index(e));if(j.length)g= this.add(e,j.clone(true))}}j=g;m=this.dimension(g);if(m===0){throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");}if(this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size)p.push(g);else if(l)k+=m;n+=m;if(n>=f)break;e++}for(g=0;g<p.length;g++)p[g].remove();if(k>0){this.list.css(this.wh,this.dimension(this.list)+k+"px");if(d){b-=k;this.list.css(this.lt,h.intval(this.list.css(this.lt))-k+"px")}}k=a+o-1;if(this.options.wrap!="circular"&& this.options.size&&k>this.options.size)k=this.options.size;if(e>k){o=0;e=k;for(n=0;++o;){g=this.get(e--);if(!g.length)break;n+=this.dimension(g);if(n>=f)break}}e=k-o+1;if(this.options.wrap!="circular"&&e<1)e=1;if(this.inTail&&d){b+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&k==this.options.size&&k-o+1>=1){d=h.margin(this.get(k),!this.options.vertical?"marginRight":"marginBottom");if(n-d>f)this.tail=n-f-d}if(c&&a===this.options.size&&this.tail){b-=this.tail;this.inTail= true}for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=k;return b},animate:function(a,c){if(!(this.locked||this.animating)){this.animating=true;var b=this,d=function(){b.animating=false;a===0&&b.list.css(b.lt,0);if(!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last<b.options.size||b.last==b.options.size&&b.tail!==null&&!b.inTail))b.startAuto();b.buttons();b.notify("onAfterAnimation"); if(b.options.wrap=="circular"&&b.options.size!==null)for(var f=b.prevFirst;f<=b.prevLast;f++)if(f!==null&&!(f>=b.first&&f<=b.last)&&(f<1||f>b.options.size))b.remove(f)};this.notify("onBeforeAnimation");if(!this.options.animation||c===false){this.list.css(this.lt,a+"px");d()}else this.list.animate(!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},this.options.animation,this.options.easing,d)}},startAuto:function(a){if(a!==undefined)this.options.auto=a;if(this.options.auto===0)return this.stopAuto(); if(this.timer===null){this.autoStopped=false;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=true},pauseAuto:function(){if(this.timer!==null){window.clearTimeout(this.timer);this.timer=null}},buttons:function(a,c){if(a==null){a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap== "first")&&this.options.size!==null&&this.last>=this.options.size)a=this.tail!==null&&!this.inTail}if(c==null){c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1)c=this.tail!==null&&this.inTail}var b=this;if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);a&&this.buttonNext.bind(this.options.buttonNextEvent+ ".jcarousel",this.funcNext);this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?false:true);this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)}else this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+ ".jcarousel",this.funcPrev);c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?false:true);this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)}else this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b, null,c);this.buttonNextState=a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,c);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",a,c,this.first);this.callback("itemFirstOutCallback",a,c,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",a,c,this.last);this.callback("itemLastOutCallback",a,c,this.prevLast)}this.callback("itemVisibleInCallback", a,c,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,c,b,d,f,j,e){if(!(this.options[a]==null||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var g=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(i.isFunction(g)){var k=this;if(d===undefined)g(k,b,c);else if(f===undefined)this.get(d).each(function(){g(k,this,d,b,c)});else{a=function(m){k.get(m).each(function(){g(k, this,m,b,c)})};for(var l=d;l<=f;l++)l!==null&&!(l>=j&&l<=e)&&a(l)}}}},create:function(a){return this.format("<li></li>",a)},format:function(a,c){a=i(a);for(var b=a.get(0).className.split(" "),d=0;d<b.length;d++)b[d].indexOf("jcarousel-")!=-1&&a.removeClass(b[d]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c);return a},className:function(a){return a+" "+a+(!this.options.vertical? "-horizontal":"-vertical")},dimension:function(a,c){var b=a.jquery!==undefined?a[0]:a,d=!this.options.vertical?(b.offsetWidth||h.intval(this.options.itemFallbackDimension))+h.margin(b,"marginLeft")+h.margin(b,"marginRight"):(b.offsetHeight||h.intval(this.options.itemFallbackDimension))+h.margin(b,"marginTop")+h.margin(b,"marginBottom");if(c==null||d==c)return d;d=!this.options.vertical?c-h.margin(b,"marginLeft")-h.margin(b,"marginRight"):c-h.margin(b,"marginTop")-h.margin(b,"marginBottom");i(b).css(this.wh, d+"px");return this.dimension(b)},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-h.intval(this.clip.css("borderLeftWidth"))-h.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-h.intval(this.clip.css("borderTopWidth"))-h.intval(this.clip.css("borderBottomWidth"))},index:function(a,c){if(c==null)c=this.options.size;return Math.round(((a-1)/c-Math.floor((a-1)/c))*c)+1}});h.extend({defaults:function(a){return i.extend(q,a||{})},margin:function(a,c){if(!a)return 0; var b=a.jquery!==undefined?a[0]:a;if(c=="marginRight"&&i.browser.safari){var d={display:"block","float":"none",width:"auto"},f,j;i.swap(b,d,function(){f=b.offsetWidth});d.marginRight=0;i.swap(b,d,function(){j=b.offsetWidth});return j-f}return h.intval(i.css(b,c))},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a}});i.fn.jcarousel=function(a){if(typeof a=="string"){var c=i(this).data("jcarousel"),b=Array.prototype.slice.call(arguments,1);return c[a].apply(c,b)}else return this.each(function(){i(this).data("jcarousel", new h(this,a))})}})(jQuery);


/*
 * jQuery Timer Plugin
 * http://www.evanbot.com/article/jquery-timer-plugin/23
 *
 * @version      1.0
 * @copyright    2009 Evan Byrne (http://www.evanbot.com)
 */ 

jQuery.timer = function(time,func,callback){
    var a = {timer:setTimeout(func,time),callback:null}
    if(typeof(callback) == 'function'){a.callback = callback;}
    return a;
};
jQuery.clearTimer = function(a){
    clearTimeout(a.timer);
    if(typeof(a.callback) == 'function'){a.callback();};
    return this;
};

// start: format date- http://jacwright.com/projects/javascript/date_format
Date.prototype.format=function(format){var returnStr='';var replace=Date.replaceChars;for(var i=0;i<format.length;i++){var curChar=format.charAt(i);if(i-1>=0&&format.charAt(i-1)=="\\"){returnStr+=curChar;}
else if(replace[curChar]){returnStr+=replace[curChar].call(this);}else if(curChar!="\\"){returnStr+=curChar;}}
return returnStr;};Date.replaceChars={shortMonths:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],longMonths:['January','February','March','April','May','June','July','August','September','October','November','December'],shortDays:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],longDays:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],d:function(){return(this.getDate()<10?'0':'')+this.getDate();},D:function(){return Date.replaceChars.shortDays[this.getDay()];},j:function(){return this.getDate();},l:function(){return Date.replaceChars.longDays[this.getDay()];},N:function(){return this.getDay()+1;},S:function(){return(this.getDate()%10==1&&this.getDate()!=11?'st':(this.getDate()%10==2&&this.getDate()!=12?'nd':(this.getDate()%10==3&&this.getDate()!=13?'rd':'th')));},w:function(){return this.getDay();},z:function(){var d=new Date(this.getFullYear(),0,1);return Math.ceil((this-d)/86400000);},W:function(){var d=new Date(this.getFullYear(),0,1);return Math.ceil((((this-d)/86400000)+d.getDay()+1)/7);},F:function(){return Date.replaceChars.longMonths[this.getMonth()];},m:function(){return(this.getMonth()<9?'0':'')+(this.getMonth()+1);},M:function(){return Date.replaceChars.shortMonths[this.getMonth()];},n:function(){return this.getMonth()+1;},t:function(){var d=new Date();return new Date(d.getFullYear(),d.getMonth(),0).getDate()},L:function(){var year=this.getFullYear();return(year%400==0||(year%100!=0&&year%4==0));},o:function(){var d=new Date(this.valueOf());d.setDate(d.getDate()-((this.getDay()+6)%7)+3);return d.getFullYear();},Y:function(){return this.getFullYear();},y:function(){return(''+this.getFullYear()).substr(2);},a:function(){return this.getHours()<12?'am':'pm';},A:function(){return this.getHours()<12?'AM':'PM';},B:function(){return Math.floor((((this.getUTCHours()+1)%24)+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)*1000/24);},g:function(){return this.getHours()%12||12;},G:function(){return this.getHours();},h:function(){return((this.getHours()%12||12)<10?'0':'')+(this.getHours()%12||12);},H:function(){return(this.getHours()<10?'0':'')+this.getHours();},i:function(){return(this.getMinutes()<10?'0':'')+this.getMinutes();},s:function(){return(this.getSeconds()<10?'0':'')+this.getSeconds();},u:function(){var m=this.getMilliseconds();return(m<10?'00':(m<100?'0':''))+m;},e:function(){return"Not Yet Supported";},I:function(){return"Not Yet Supported";},O:function(){return(-this.getTimezoneOffset()<0?'-':'+')+(Math.abs(this.getTimezoneOffset()/60)<10?'0':'')+(Math.abs(this.getTimezoneOffset()/60))+'00';},P:function(){return(-this.getTimezoneOffset()<0?'-':'+')+(Math.abs(this.getTimezoneOffset()/60)<10?'0':'')+(Math.abs(this.getTimezoneOffset()/60))+':00';},T:function(){var m=this.getMonth();this.setMonth(0);var result=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,'$1');this.setMonth(m);return result;},Z:function(){return-this.getTimezoneOffset()*60;},c:function(){return this.format("Y-m-d\\TH:i:sP");},r:function(){return this.toString();},U:function(){return this.getTime()/1000;}};
// end: validation dates

//start: popup
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=yes,directories=no,status=yes,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
//end: popup

function addSWF(URL, WIDTH, HEIGHT, TRANSPARENT){
    document.write('<object classid="clsid:27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ WIDTH +'" height="'+ HEIGHT +'">');
    document.write('   <param name="movie" value="'+ URL +'" />');
    document.write('   <param name="quality" value="high" />');
    if(TRANSPARENT){ document.write('  	<param name="Wmode" value="Transparent" />'); }
    document.write('   <embed src="'+ URL +'" quality="high"');
    if(TRANSPARENT){ document.write(' Wmode = "transparent" '); }
    document.write(' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ WIDTH +'" height="'+ HEIGHT +'" wmode="transparent"></embed>');
    document.write('</object>');
}

function preg_quote (str, delimiter) {
    // Quote regular expression characters plus an optional character  
    // 
    // version: 1009.2513
    // discuss at: http://phpjs.org/functions/preg_quote    // +   original by: booeyOH
    // +   improved by: Ates Goral (http://magnetiq.com)
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: Onno Marsman
    // +   improved by: Brett Zamir (http://brett-zamir.me)    // *     example 1: preg_quote("$40");
    // *     returns 1: '\$40'
    // *     example 2: preg_quote("*RRRING* Hello?");
    // *     returns 2: '\*RRRING\* Hello\?'
    // *     example 3: preg_quote("\\.+*?[^]$(){}=!<>|:");    // *     returns 3: '\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:'
    return (str+'').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\'+(delimiter || '')+'-]', 'g'), '\\$&');
}

/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);


/* Text and/or Image Crawler Script ©2009 John Davenport Scheuer
   as first seen in http://www.dynamicdrive.com/forums/
   username: jscheuer1 - This Notice Must Remain for Legal Use
   */
function marqueeInit(config){if(!document.createElement){return;}marqueeInit.ar.push(config);marqueeInit.run(config.uniqueid);}(function(){if(!document.createElement){return;}marqueeInit.ar=[];document.write('<style type="text/css">.marquee{white-space:nowrap;overflow:hidden;visibility:hidden;}#marq_kill_marg_bord{border:none!important;margin:0!important;}</style>');var c=0,tTRE=[new RegExp("^\\s*$"),new RegExp("^\\s*"),new RegExp("\\s*$")],req1={position:"relative",overflow:"hidden"},defaultconfig={style:{margin:"0 auto"},direction:"left",inc:2,mouse:"pause"},dash,ie=false,oldie=0,ie5=false,iever=0;
if(!ie5){dash=new RegExp("-(.)","g");function toHump(a,b){return b.toUpperCase();}String.prototype.encamel=function(){return this.replace(dash,toHump);};}if(ie&&iever<8){marqueeInit.table=[];window.attachEvent("onload",function(){marqueeInit.OK=true;for(var i=0;i<marqueeInit.table.length;++i){marqueeInit.run(marqueeInit.table[i]);}});}function intable(el){while((el=el.parentNode)){if(el.tagName&&el.tagName.toLowerCase()==="table"){return true;}}return false;}marqueeInit.run=function(id){if(ie&&!marqueeInit.OK&&iever<8&&intable(document.getElementById(id))){marqueeInit.table.push(id);return;}if(!document.getElementById(id)){setTimeout(function(){marqueeInit.run(id);},300);}else{new Marq(c++,document.getElementById(id));}};function trimTags(tag){var r=[],i=0,e;while((e=tag.firstChild)&&e.nodeType==3&&tTRE[0].test(e.nodeValue)){tag.removeChild(e);}while((e=tag.lastChild)&&e.nodeType==3&&tTRE[0].test(e.nodeValue)){tag.removeChild(e);}if((e=tag.firstChild)&&e.nodeType==3){e.nodeValue=e.nodeValue.replace(tTRE[1],"");}if((e=tag.lastChild)&&e.nodeType==3){e.nodeValue=e.nodeValue.replace(tTRE[2],"");}while((e=tag.firstChild)){r[i++]=tag.removeChild(e);}return r;}function Marq(c,tag){var p,u,s,a,ims,ic,i,marqContent,cObj=this;this.mq=marqueeInit.ar[c];for(p in defaultconfig){if((this.mq.hasOwnProperty&&!this.mq.hasOwnProperty(p))||(!this.mq.hasOwnProperty&&!this.mq[p])){this.mq[p]=defaultconfig[p];}}this.mq.style.width=!this.mq.style.width||isNaN(parseInt(this.mq.style.width))?"100%":this.mq.style.width;if(!tag.getElementsByTagName("img")[0]){this.mq.style.height=!this.mq.style.height||isNaN(parseInt(this.mq.style.height))?tag.offsetHeight+3+"px":this.mq.style.height;}else{this.mq.style.height=!this.mq.style.height||isNaN(parseInt(this.mq.style.height))?"auto":this.mq.style.height;}u=this.mq.style.width.split(/\d/);this.cw=this.mq.style.width?[parseInt(this.mq.style.width),u[u.length-1]]:["a"];marqContent=trimTags(tag);tag.className=tag.id="";tag.removeAttribute("class",0);tag.removeAttribute("id",0);if(ie){tag.removeAttribute("className",0);}tag.appendChild(tag.cloneNode(false));tag.className=["marquee",c].join("");tag.style.overflow="hidden";this.c=tag.firstChild;this.c.appendChild(this.c.cloneNode(false));this.c.style.visibility="hidden";a=[[req1,this.c.style],[this.mq.style,this.c.style]];for(i=a.length-1;i>-1;--i){for(p in a[i][0]){if((a[i][0].hasOwnProperty&&a[i][0].hasOwnProperty(p))||(!a[i][0].hasOwnProperty)){a[i][1][p.encamel()]=a[i][0][p];}}}this.m=this.c.firstChild;if(this.mq.mouse=="pause"){this.c.onmouseover=function(){cObj.mq.stopped=true;};this.c.onmouseout=function(){cObj.mq.stopped=false;};}this.m.style.position="absolute";this.m.style.left="-10000000px";this.m.style.whiteSpace="nowrap";if(ie5){this.c.firstChild.appendChild((this.m=document.createElement("nobr")));}if(!this.mq.noAddedSpace){this.m.appendChild(document.createTextNode("\xa0"));}for(i=0;marqContent[i];++i){this.m.appendChild(marqContent[i]);}if(ie5){this.m=this.c.firstChild;}ims=this.m.getElementsByTagName("img");if(ims.length){for(ic=0,i=0;i<ims.length;++i){ims[i].style.display="inline";ims[i].style.verticalAlign=ims[i].style.verticalAlign||"top";if(typeof ims[i].complete=="boolean"&&ims[i].complete){ic++;}else{ims[i].onload=function(){if(++ic==ims.length){cObj.setup();}};}if(ic==ims.length){this.setup();}}}else{this.setup();}}Marq.prototype.setup=function(){if(this.mq.setup){return;}this.mq.setup=this;var s,cObj=this;if(this.c.style.height==="auto"){this.c.style.height=this.m.offsetHeight+4+"px";}this.c.appendChild(this.m.cloneNode(true));this.m=[this.m,this.m.nextSibling];if(this.mq.mouse=="cursor driven"){this.r=this.mq.neutral||16;this.sinc=this.mq.inc;this.c.onmousemove=function(e){cObj.mq.stopped=false;cObj.directspeed(e);};if(this.mq.moveatleast){this.mq.inc=this.mq.moveatleast;if(this.mq.savedirection){if(this.mq.savedirection=="reverse"){this.c.onmouseout=function(e){if(cObj.contains(e)){return;}cObj.mq.inc=cObj.mq.moveatleast;cObj.mq.direction=cObj.mq.direction=="right"?"left":"right";};}else{this.mq.savedirection=this.mq.direction;this.c.onmouseout=function(e){if(cObj.contains(e)){return;}cObj.mq.inc=cObj.mq.moveatleast;cObj.mq.direction=cObj.mq.savedirection;};}}else{this.c.onmouseout=function(e){if(!cObj.contains(e)){cObj.mq.inc=cObj.mq.moveatleast;}};}}else{this.c.onmouseout=function(e){if(!cObj.contains(e)){cObj.slowdeath();}};}}this.w=this.m[0].offsetWidth;this.m[0].style.left=0;this.c.id="marq_kill_marg_bord";this.m[0].style.top=this.m[1].style.top=Math.floor((this.c.offsetHeight-this.m[0].offsetHeight)/2-oldie)+"px";this.c.id="";this.c.removeAttribute("id",0);this.m[1].style.left=this.w+"px";s=this.mq.moveatleast?Math.max(this.mq.moveatleast,this.sinc):(this.sinc||this.mq.inc);while(this.c.offsetWidth>this.w-s){this.c.style.width=isNaN(this.cw[0])?this.w-s+"px":--this.cw[0]+this.cw[1];}this.c.style.visibility="visible";this.runit();};Marq.prototype.slowdeath=function(){var cObj=this;if(this.mq.inc){this.mq.inc-=1;this.timer=setTimeout(function(){cObj.slowdeath();},100);}};Marq.prototype.runit=function(){var cObj=this,d=this.mq.direction=="right"?1:-1;if(this.mq.stopped||this.mq.stopMarquee){setTimeout(function(){cObj.runit();},300);return;}if(this.mq.mouse!="cursor driven"){this.mq.inc=Math.max(1,this.mq.inc);}if(d*parseInt(this.m[0].style.left)>=this.w){this.m[0].style.left=parseInt(this.m[1].style.left)-d*this.w+"px";}if(d*parseInt(this.m[1].style.left)>=this.w){this.m[1].style.left=parseInt(this.m[0].style.left)-d*this.w+"px";}this.m[0].style.left=parseInt(this.m[0].style.left)+d*this.mq.inc+"px";this.m[1].style.left=parseInt(this.m[1].style.left)+d*this.mq.inc+"px";setTimeout(function(){cObj.runit();},30+(this.mq.addDelay||0));};Marq.prototype.directspeed=function(e){e=e||window.event;if(this.timer){clearTimeout(this.timer);}var c=this.c,w=c.offsetWidth,l=c.offsetLeft,mp=(typeof e.pageX=="number"?e.pageX:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft)-l,lb=(w-this.r)/2,rb=(w+this.r)/2;while((c=c.offsetParent)){mp-=c.offsetLeft;}this.mq.direction=mp>rb?"left":"right";this.mq.inc=Math.round((mp>rb?(mp-rb):mp<lb?(lb-mp):0)/lb*this.sinc);};Marq.prototype.contains=function(e){if(e&&e.relatedTarget){var c=e.relatedTarget;if(c==this.c){return true;}while((c=c.parentNode)){if(c==this.c){return true;}}}return false;};function resize(){for(var s,m,i=0;i<marqueeInit.ar.length;++i){if(marqueeInit.ar[i]&&marqueeInit.ar[i].setup){m=marqueeInit.ar[i].setup;s=m.mq.moveatleast?Math.max(m.mq.moveatleast,m.sinc):(m.sinc||m.mq.inc);m.c.style.width=m.mq.style.width;m.cw[0]=m.cw.length>1?parseInt(m.mq.style.width):"a";while(m.c.offsetWidth>m.w-s){m.c.style.width=isNaN(m.cw[0])?m.w-s+"px":--m.cw[0]+m.cw[1];}}}}if(window.addEventListener){window.addEventListener("resize",resize,false);}else{if(window.attachEvent){window.attachEvent("onresize",resize);}}})();


/* date validation */
function isDate(dateStr){var datePat=/^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;var matchArray=dateStr.match(datePat);if(matchArray==null){return false;}
day=matchArray[1];month=matchArray[3];year=matchArray[5];if(month<1||month>12){return false;}
if(day<1||day>31){alert("Day must be between 1 and 31.");return false;}
if((month==4||month==6||month==9||month==11)&&day==31){return false;}
if(month==2){var isleap=(year%4==0&&(year%100!=0||year%400==0));if(day>29||(day==29&&!isleap)){return false;}}return true;}

//jQuery.preloader - v0.95 - K Reeve aka BinaryKitten - http://binarykitten.me.uk/dev/jq-plugins/107-jquery-image-preloader-plus-callbacks.html
(function($){$.preLoadImages=function(imageList,callback){var pic=[],i,total,loaded=0;if(typeof imageList!='undefined'){if($.isArray(imageList)){total=imageList.length;for(i=0;i<total;i++){pic[i]=new Image();pic[i].onload=function(){loaded++;if(loaded==total){if($.isFunction(callback)){callback();}}};pic[i].src=imageList[i];}}
else{pic[0]=new Image();pic[0].onload=function(){if($.isFunction(callback)){callback();}}
pic[0].src=imageList;}}
pic=undefined;};$.preLoadCSSImages=function(callback){var pic=[],i,imageList=[],loaded=0,total,regex=new RegExp("url\((.*)\)",'i'),spl;var cssSheets=document.styleSheets,path,myRules,Rule,match,txt,img,sheetIdx,ruleIdx;for(sheetIdx=0;sheetIdx<cssSheets.length;sheetIdx++){var sheet=cssSheets[sheetIdx];if(typeof sheet.href=='string'&&sheet.href.length>0){spl=sheet.href.split('/');spl.pop();path=spl.join('/')+'/';}
else{path='./';}
if (sheet.cssRules){myRules=sheet.cssRules;}else{myRules=sheet.rules;}for(ruleIdx=0;ruleIdx<myRules.length;ruleIdx++){Rule=myRules[ruleIdx];txt=Rule.cssText?Rule.cssText:Rule.style.cssText;match=regex.exec(txt);if(match!=null){img=match[1].substring(1,match[1].indexOf(')',1));if(img.substring(0,4)=='http'){imageList[imageList.length]=img;}
else if(match[1].substring(1,2)=='/'){var p2=path.split('/');p2.pop();p2.pop();p2x=p2.join("/");imageList[imageList.length]=p2x+img;}
else{imageList[imageList.length]=path+img;}}};};total=imageList.length;for(i=0;i<total;i++){pic[i]=new Image();pic[i].onload=function(){loaded++;if(loaded==total){if($.isFunction(callback)){callback();}}};pic[i].src=imageList[i];}};$.preLoadAllImages=function(imageList,callback){if(typeof imageList!='undefined'){if($.isFunction(imageList)){callback=imageList;}
else if(!$.isArray(imageList)){imageList=[imageList];}}
$.preLoadCSSImages(function(){if(imageList.length>0){$.preLoadImages(imageList,function(){callback();});}
else{callback();}});}})(jQuery);
//myRules=sheet.cssRules?sheet.cssRules:sheet.rules;

