;jQuery.preloadCssImages=function(settings){settings=jQuery.extend({statusTextEl:null,statusBarEl:null,errorDelay:1999,simultaneousCacheLoading:5},settings);var allImgs=[],loaded=0,imgUrls=[],thisSheetRules,errorTimer;function onImgComplete(){clearTimeout(errorTimer);if(imgUrls&&imgUrls.length&&imgUrls[loaded]){loaded++;if(settings.statusTextEl){var nowloading=(imgUrls[loaded])?'Now Loading: <span>'+imgUrls[loaded].split('/')[imgUrls[loaded].split('/').length-1]:'Loading complete';jQuery(settings.statusTextEl).html('<span class="percentLoaded">'+(loaded/imgUrls.length*100).toFixed(0)+'%</span>');}
if(settings.statusBarEl){var barWidth=jQuery(settings.statusBarEl).width();var percent=(loaded/imgUrls.length*100).toFixed(0);jQuery(settings.statusBarEl).css({position:"absolute",marginLeft:0,marginTop:0,left:percent+'%'});if(loaded==imgUrls.length){jQuery('#loading').fadeOut(800);}}
loadImgs();}}
function loadImgs(){if(imgUrls&&imgUrls.length&&imgUrls[loaded]){var img=new Image();img.src=imgUrls[loaded];if(!img.complete){jQuery(img).bind('error load onreadystatechange',onImgComplete);}else{onImgComplete();}
errorTimer=setTimeout(onImgComplete,settings.errorDelay);}}
function parseCSS(sheets,urls){var w3cImport=false,imported=[],importedSrc=[],baseURL;var sheetIndex=sheets.length;while(sheetIndex--){var cssPile='';if(urls&&urls[sheetIndex]){baseURL=urls[sheetIndex];}else{var csshref=(sheets[sheetIndex].href)?sheets[sheetIndex].href:'window.location.href';var baseURLarr=csshref.split('/');baseURLarr.pop();baseURL=baseURLarr.join('/');if(baseURL){baseURL+='/';}}
if(sheets[sheetIndex].cssRules||sheets[sheetIndex].rules){thisSheetRules=(sheets[sheetIndex].cssRules)?sheets[sheetIndex].cssRules:sheets[sheetIndex].rules;var ruleIndex=thisSheetRules.length;while(ruleIndex--){if(thisSheetRules[ruleIndex].style&&thisSheetRules[ruleIndex].style.cssText){var text=thisSheetRules[ruleIndex].style.cssText;if(text.toLowerCase().indexOf('url')!=-1){cssPile+=text;}}else if(thisSheetRules[ruleIndex].styleSheet){imported.push(thisSheetRules[ruleIndex].styleSheet);w3cImport=true;}}}
var tmpImage=cssPile.match(/[^\("]+\.(gif|jpg|jpeg|png)/g);if(tmpImage){var i=tmpImage.length;while(i--){var imgSrc=(tmpImage[i].charAt(0)=='/'||tmpImage[i].match('://'))?tmpImage[i]:baseURL+tmpImage[i];if(jQuery.inArray(imgSrc,imgUrls)==-1){imgUrls.push(imgSrc);}}}
if(!w3cImport&&sheets[sheetIndex].imports&&sheets[sheetIndex].imports.length){for(var iImport=0,importLen=sheets[sheetIndex].imports.length;iImport<importLen;iImport++){var iHref=sheets[sheetIndex].imports[iImport].href;iHref=iHref.split('/');iHref.pop();iHref=iHref.join('/');if(iHref){iHref+='/';}
var iSrc=(iHref.charAt(0)=='/'||iHref.match('://'))?iHref:baseURL+iHref;importedSrc.push(iSrc);imported.push(sheets[sheetIndex].imports[iImport]);}}}
if(imported.length){parseCSS(imported,importedSrc);return false;}
var downloads=settings.simultaneousCacheLoading;while(downloads--){setTimeout(loadImgs,downloads);}}
parseCSS(document.styleSheets);return imgUrls;};$(document).ready(function(){$.smoothAnchors("slow","swing",false);$.preloadCssImages({statusTextEl:'#textStatus',statusBarEl:'#stBar'});var scrollWidth=0;var Content=document.getElementById('main');var scrollBar=document.getElementById('slider');var scrollBarBg=document.getElementById('bar');var contentH=(Content.offsetHeight)-500;var scrollBgH=(scrollBarBg.offsetHeight)-88;var scrollContent=0;var percent=0;var scrollContent2=0;var percent2=0;$("#slider").draggable({axis:'y',iframeFix:true,scroll:false,scrollSpeed:40,cursor:'hand',distance:30,containment:'parent',drag:function(event,ui){clearTimeout(timer);},stop:function(event,ui){scrollTop=parseInt(scrollBar.style.top);percent=Math.round(((scrollTop*100)/(myHeight-88)));scrollContent=(((Content.offsetHeight)-500)*percent)/100;$("html:not(:animated),body:not(:animated)").animate({"scrollTop":scrollContent},700);timer=setTimeout('ShowMessage()',500);}});$("html:not(:animated),body:not(:animated)").mousewheel(function(event,delta){var scrollTOP;var mainH;if(typeof(window.innerWidth)=='number'){scrollTOP=window.pageYOffset;mainH=Content.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientHeight)){scrollTOP=document.documentElement.scrollTop;mainH=Content.offsetHeight;}
else if(document.body&&(document.body.clientHeight)){scrollTOP=document.body.scrollTop;mainH=Content.offsetHeight;}
if(delta>0)
{if(scrollTOP>0){contPercent=Math.round(((scrollTOP*100)/(Content.offsetHeight-523)));scrollContent=scrollTOP-300;sliderPOS=(scrollBgH*contPercent)/100;$("html:not(:animated),body:not(:animated)").animate({"scrollTop":scrollContent},250);}}
else if(delta<0)
{if(scrollTOP<=(Content.offsetHeight-523)){contPercent=Math.round(((scrollTOP*100)/(Content.offsetHeight-523)));scrollContent=scrollTOP+300;sliderPOS=(scrollBgH*contPercent)/100;$("html:not(:animated),body:not(:animated)").animate({"scrollTop":scrollContent},500);}}
event.stopPropagation();event.preventDefault();});ShowMessage();document.getElementById('bar').height=myHeight;});var myHeight=0;if(typeof(window.innerWidth)=='number'){myHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientHeight)){myHeight=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientHeight)){myHeight=document.body.clientHeight;}
function ShowMessage(){if(typeof(window.innerWidth)=='number'){contPercent=Math.round(((window.pageYOffset*100)/((document.getElementById('main').offsetHeight)-523)));}else if(document.documentElement&&(document.documentElement.clientHeight)){contPercent=Math.round(((document.documentElement.scrollTop*100)/((document.getElementById('main').offsetHeight)-523)));}else if(document.body&&(document.body.clientHeight)){contPercent=Math.round(((document.body.scrollTop*100)/((document.getElementById('main').offsetHeight)-523)));}
sliderPOS=((myHeight-88)*contPercent)/100;$("#slider").animate({"top":sliderPOS},200);timer=setTimeout('ShowMessage()',500);}
$(function(){$('#carousel').infiniteCarousel({displayTime:6000,textholderHeight:.25,displayProgressBar:0,displayThumbnailBackground:0});});$(function(){$("#we").click(function(){$("#we-div").show('blind',1000)
return false;});$("#we-close").click(function(){$("#we-div").hide('blind',600)
return false;});$("#hello").click(function(){$("#hello-div").show('blind',1000)
return false;});$("#hello-close").click(function(){$("#hello-div").hide('blind',600)
return false;});$("#we2").click(function(){$("#we-div").show('blind',1000)
return false;});$("#hello2").click(function(){$("#hello-div").show('blind',1000)
return false;});var proChk1=0;var proChk2=0;var proChk3=0;var proChk4=0;var proChk5=0;var proChk6=0;var proChk7=0;var proChk8=0;var proChk9=0; var proChk12=0;var proChk13=0;var proChk14=0;var proChk15=0;var proChk16=0; var proChk17=0; var proChk18=0;var proChk10=0;var proChk11=0;$("#pro1").click(function(){if(proChk1==0)
{$("#pro1-fullview").show('blind',1000)
proChk1=1;}
else{proChk1=0;$("#pro1-fullview").hide('blind',500)}
return false;});$("#pro2").click(function(){if(proChk2==0)
{$("#pro2-fullview").show('blind',1000)
proChk2=1;}

else{proChk2=0;$("#pro2-fullview").hide('blind',500)}
return false;});$("#pro3").click(function(){if(proChk3==0)
{$("#pro3-fullview").show('blind',1000)
proChk3=1;}

else{proChk3=0;$("#pro3-fullview").hide('blind',500)}
return false;});$("#pro4").click(function(){if(proChk4==0)
{$("#pro4-fullview").show('blind',1000)
proChk4=1;}
else{proChk4=0;$("#pro4-fullview").hide('blind',500)}
return false;});$("#pro5").click(function(){if(proChk5==0)
{$("#pro5-fullview").show('blind',1000)
proChk5=1;}
else{proChk5=0;$("#pro5-fullview").hide('blind',500)}
return false;});$("#pro6").click(function(){if(proChk6==0)
{$("#pro6-fullview").show('blind',1000)
proChk6=1;}
else{proChk6=0;$("#pro6-fullview").hide('blind',500)}
return false;});$("#pro7").click(function(){if(proChk7==0)
{$("#pro7-fullview").show('blind',1000)
proChk7=1;}
else{proChk7=0;$("#pro7-fullview").hide('blind',500)}
return false;});$("#pro8").click(function(){if(proChk8==0)
{$("#pro8-fullview").show('blind',1000)
proChk8=1;}
else{proChk8=0;$("#pro8-fullview").hide('blind',500)}
return false;});$("#pro9").click(function(){if(proChk9==0)
{$("#pro9-fullview").show('blind',1000)
proChk9=1;}
else{proChk9=0;$("#pro9-fullview").hide('blind',500)}
return false;});$("#pro10").click(function(){if(proChk10==0)
{$("#pro10-fullview").show('blind',1000)
proChk10=1;}
else{proChk10=0;$("#pro10-fullview").hide('blind',500)}
return false;});$("#pro11").click(function(){if(proChk11==0)
{$("#pro11-fullview").show('blind',1000)
proChk11=1;}
else{proChk11=0;$("#pro11-fullview").hide('blind',500)}
return false;});$("#pro12").click(function(){if(proChk12==0)
{$("#pro12-fullview").show('blind',1000)
proChk12=1;}
else{proChk12=0;$("#pro12-fullview").hide('blind',700)}
return false;});$("#pro13").click(function(){if(proChk13==0)
{$("#pro13-fullview").show('blind',1000)
proChk13=1;}
else{proChk13=0;$("#pro13-fullview").hide('blind',500)}
return false;});$("#pro14").click(function(){if(proChk14==0)
{$("#pro14-fullview").show('blind',1000)
proChk14=1;}
else{proChk14=0;$("#pro14-fullview").hide('blind',500)}
return false;});$("#pro15").click(function(){if(proChk15==0)
{$("#pro15-fullview").show('blind',1000)
proChk15=1;}
else{proChk15=0;$("#pro15-fullview").hide('blind',500)}
return false;});$("#pro16").click(function(){if(proChk16==0)
{$("#pro16-fullview").show('blind',1000)
proChk16=1;}
else{proChk16=0;$("#pro16-fullview").hide('blind',500)}
return false;});$("#pro17").click(function(){if(proChk17==0)
{$("#pro17-fullview").show('blind',1000)
proChk17=1;}
else{proChk17=0;$("#pro17-fullview").hide('blind',500)}
return false;});$("#pro18").click(function(){if(proChk18==0)
{$("#pro18-fullview").show('blind',1000)
proChk18=1;}
else{proChk18=0;$("#pro18-fullview").hide('blind',500)}


return false;});});(function($){var types=['DOMMouseScroll','mousewheel'];$.event.special.mousewheel={setup:function(){if(this.addEventListener)
for(var i=types.length;i;)
this.addEventListener(types[--i],handler,false);else
this.onmousewheel=handler;},teardown:function(){if(this.removeEventListener)
for(var i=types.length;i;)
this.removeEventListener(types[--i],handler,false);else
this.onmousewheel=null;}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});function handler(event){var args=[].slice.call(arguments,1),delta=0,returnValue=true;event=$.event.fix(event||window.event);event.type="mousewheel";if(event.wheelDelta)delta=event.wheelDelta/120;if(event.detail)delta=-event.detail/3;args.unshift(event,delta);return $.event.handle.apply(this,args);}})(jQuery);(function($){$.extend({smoothAnchors:function(speed,easing,redirect){speed=speed||"fast";easing=easing||null;redirect=(redirect===true||redirect==null)?true:false;$("a").each(function(i){var url=$(this).attr("href");if(url){if(url.indexOf("#")!=-1&&url.indexOf("#")==0){var aParts=url.split("#",2);var anchor=$("a[name='"+aParts[1]+"']");if(anchor){$(this).click(function(){if($(document).height()-anchor.offset().top>=$(window).height()||anchor.offset().top>$(window).height()||$(document).width()-anchor.offset().left>=$(window).width()||anchor.offset().left>$(window).width()){$('html, body').animate({scrollTop:anchor.offset().top,scrollLeft:anchor.offset().left},speed,easing,function(){if(redirect){window.location=url}});}
return false;});}}}});}});})(jQuery);(function($){$.fn.extend({infiniteCarousel:function(options)
{var defaults={transitionSpeed:1500,displayTime:6000,textholderHeight:.2,displayProgressBar:1,displayThumbnails:1,displayThumbnailNumbers:1,displayThumbnailBackground:1,thumbnailWidth:'20px',thumbnailHeight:'20px',thumbnailFontSize:'.7em'};var options=$.extend(defaults,options);return this.each(function(){var randID=Math.round(Math.random()*100000000);var o=options;var obj=$(this);var curr=1;var numImages=$('img',obj).length;var imgHeight=$('img:first',obj).height();var imgWidth=$('img:first',obj).width();var autopilot=1;$('span',obj).hide();$(obj).width(imgWidth).height(imgHeight);if(o.displayProgressBar)
{$(obj).append('<div id="progress'+randID+'" style="position:absolute;bottom:0;background:#bbb;left:'+$(obj).css('paddingLeft')+'"></div>');}
$(obj).css({'position':'relative'});$('li:last',obj).prependTo($('ul',obj));$('ul',obj).css('left',-imgWidth+'px');$('ul',obj).width(9999);$('ul',obj).css({'list-style':'none','margin':'0','padding':'0','position':'relative'});$('li',obj).css({'display':'inline','float':'left'});$(obj).append('<div id="textholder'+randID+'" class="textholder" style="position:absolute;bottom:0px;margin-bottom:'+-imgHeight*o.textholderHeight+'px;left:'+$(obj).css('paddingLeft')+'"></div>');var correctTHWidth=parseInt($('#textholder'+randID).css('paddingTop'));var correctTHHeight=parseInt($('#textholder'+randID).css('paddingRight'));$('#textholder'+randID).width(imgWidth-(correctTHWidth*2)).height((imgHeight*o.textholderHeight)-(correctTHHeight*2));showtext($('li:eq(1) span',obj).html());function showtext(t)
{if(t!=null)
{$('#textholder'+randID).html(t).animate({marginBottom:'-80px','opacity':1},500);}}
function borderpatrol(elem)
{}
function anim(direction,dist)
{if(direction=="next")
{if(curr==numImages)curr=0;if(dist>1)
{$('ul',obj).animate({left:-imgWidth*(dist+1)},o.transitionSpeed,function(){$('li:lt(2)',obj).remove();for(j=1;j<=dist-2;j++)
{$('li:first',obj).clone().insertAfter($('li:last',obj));$('li:first',obj).remove();}
showtext($('li:eq(1) span',obj).html());$(this).css({'left':-imgWidth});curr=curr+dist;});}
else
{borderpatrol($('#thumb'+randID+'_'+(curr+1)));$('li:first',obj).clone().insertAfter($('li:last',obj));$('ul',obj).animate({left:-imgWidth*2},o.transitionSpeed,function(){$('li:first',obj).remove();$('ul',obj).css('left',-imgWidth+'px');if(autopilot)$('#pause_btn'+randID).fadeIn(250);showtext($('li:eq(1) span',obj).html());if(autopilot)
{$('#progress'+randID).width(imgWidth).height(5);$('#progress'+randID).animate({'width':0},o.displayTime,function(){$('#pause_btn'+randID).fadeOut(50);setTimeout(function(){$('#pause_btn'+randID).fadeIn(250)},o.transitionSpeed)});}
curr=curr+1;});}}
if(direction=="prev")
{if(dist>1)
{borderpatrol($('#thumb'+randID+'_'+(curr-dist)));$('li:gt('+(numImages-(dist+1))+')',obj).clone().insertBefore($('li:first',obj));$('ul',obj).css({'left':(-imgWidth*(dist+1))}).animate({left:-imgWidth},o.transitionSpeed,function(){$('li:gt('+(numImages-1)+')',obj).remove();$('#play_btn'+randID).fadeIn(250);showtext($('li:eq(1) span',obj).html());curr=curr-dist;});}
else
{borderpatrol($('#thumb'+randID+'_'+(curr-1)));$('#thumbs'+randID+' a').css({'cursor':'default'}).unbind('click');$('li:last',obj).clone().insertBefore($('li:first',obj));$('ul',obj).css('left',-imgWidth*2+'px').animate({left:-imgWidth},o.transitionSpeed,function(){$('li:last',obj).remove();if(autopilot)$('#pause_btn'+randID).fadeIn(250);showtext($('li:eq(1) span',obj).html());curr=curr-1;if(curr==0)curr=numImages;});}}}
var clearInt=setInterval(function(){anim('next');},o.displayTime+o.transitionSpeed);});}});})(jQuery);
