//** Smooth Navigational Menu- By Dynamic Drive DHTML code library: http://www.dynamicdrive.com
//** Script Download/ instructions page: http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/
//** Menu created: Nov 12, 2008
//** Dec 12th, 08" (v1.01): Fixed Shadow issue when multiple LIs within the same UL (level) contain sub menus: http://www.dynamicdrive.com/forums/showthread.php?t=39177&highlight=smooth
//This is for the news scroller
//scroller width
var swidth=240;
//scroller height
var sheight=150;
//background color
var sbcolor='#e3e0d2';
//scroller's speed
var sspeed=3;
var msg=''
//Your messages go below:
msg += 'State of the County Survey
It\'s that time again! Please take a few minutes to let us know how your business is doing in Tuolumne County? Return to Chamber no later than 2/20/12.
';msg += 'French Riverera Trip
8 day Journey Departing 10/27/12-$2,369 per person if deposited before 3/30/12.
Click on this link to watch a day by day tour.
';msg += 'Business Directory
You can now view our Business Directory by going to this link.
Click here to view our Business Directory
';msg += 'Ireland Trip
Spend St. Patrick\'s Day in Ireland! Reserve your seat today for the 2012 trip to Scenic Ireland with the travel agency CHAMBER DISCOVERIES . This is an "8-day Journey" departing 3/13/2012. $2,149 per person if deposited before 11/1/2011(extended).
Click here to watch a day by day video of what to expect on your trip.
';msg += 'Chamber Radio Show First Sunday of the Month
Be sure to listen to "The B.E.A.T."Tuolumne County Chamber of Commerce Radio Show on the first Sunday of each month! Hosted by George Segarini & Nanci Sikes (Tuolumne County Visitors Bureau) and produced by Michele Menzies.
More Info About The B.E.A.T. Radio Show
';msg += 'SCORE-Free One-on-One Business Counseling
The Business Alliance of Tuolumne County offers counseling to existing and new businesses free of charge. Providing this service is a collaborative effort between the Tuolumne County Chamber of Commerce, Economic Development Authority, SCORE and Small Business Development Center. Counselors are provided through SCORE and the Small Business Development Center. To make an appointment, download the PDF below (SBA Counseling Information Form) and fill out Part 1 and question 30 of Part 2. Fax the completed form to the Chamber at 209-532-8068 or save and email it to the Chamber at info@TCchamber.com. You can also mail/bring to the Chamber offices: 222 South Shepherd Street in Downtown Sonora. A counselor will respond for an appointment. Building Tuolumne County ... one Business at a Time
';msg += 'Celebrating 100 Years Union Democrat Paper Insert
Click Here to view our 28 page insert in the Union Democrat paper published April 15, 2008 in honor of our achievements over the past 100 years and all of our goals for the future!
';msg += 'Are there changes at your company?
Let us help you tell people about the changes at your business through our Business Briefs. New employees, promotions, change of location, new products or services? We\'ll help you get the word out. It\'s a member benefit!
We are interested in any changes that happen at our member companies. If you send us information we will publicize it in our newsletter and on the website. We can even include photos. Contact our Chamber office at 209-532-4212, 877-532-4212, info@TCchamber.com
';msg += 'Member Benefits Discounts
We have over three dozen companies offering all employees of Chamber member organizations discounts on products and services. Shop Local, save money and support Chamber member companies. Find out how your company can participate... it\'s FREE!
';
//End of your messages
// Begin the ticker code
var resumesspeed=sspeed;
function start() {
if (document.all) iemarquee(ticker);
else if (document.getElementById)
ns6marquee(document.getElementById('ticker'));
}
function iemarquee(whichdiv){
iediv=eval(whichdiv)
sheight += 50;
iediv.style.pixelTop=0;
iediv.innerHTML=msg
sizeup=iediv.offsetHeight
setTimeout("ieslide()", 5000);
}
function ieslide(){
if (iediv.style.pixelTop>=sizeup*(-1)){
iediv.style.pixelTop-=sspeed
setTimeout("ieslide()",100)
}
else{
iediv.style.pixelTop=sheight
ieslide()
}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv)
sheight += 50;
ns6div.style.top="0px";
ns6div.innerHTML=msg
sizeup=ns6div.offsetHeight
setTimeout("ns6slide()", 5000)
}
function ns6slide(){
if (parseInt(ns6div.style.top)>=sizeup*(-1)){
theTop = parseInt(ns6div.style.top)-sspeed
ns6div.style.top = theTop + "px";
setTimeout("ns6slide()",100)
}
else {
ns6div.style.top = sheight + "px";
ns6slide()
}
}
////End news slider
var ddsmoothmenu={
//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
arrowimages: {down:['downarrowclass', 'down.gif', 23], right:['rightarrowclass', 'right.gif']},
transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds
shadow: {enabled:false, offsetx:5, offsety:5},
///////Stop configuring beyond here///////////////////////////
detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1, //detect WebKit browsers (Safari, Chrome etc)
getajaxmenu:function($, setting){ //function to fetch external page containing the panel DIVs
var $menucontainer=$('#'+setting.contentsource[0]) //reference empty div on page that will hold menu
$menucontainer.html("Loading Menu...")
$.ajax({
url: setting.contentsource[1], //path to external menu file
async: true,
error:function(ajaxrequest){
$menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText)
},
success:function(content){
$menucontainer.html(content)
ddsmoothmenu.buildmenu($, setting)
}
})
},
buildshadow:function($, $subul){
},
buildmenu:function($, setting){
var smoothmenu=ddsmoothmenu
var $mainmenu=$("#"+setting.mainmenuid+">ul") //reference main menu UL
var $headers=$mainmenu.find("ul").parent()
$headers.each(function(i){
var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header
var $subul=$(this).find('ul:eq(0)').css({display:'block'})
this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
this.istopheader=$curobj.parents("ul").length==1? true : false //is top level header?
$subul.css({top:this.istopheader? this._dimensions.h+"px" : 0})
$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: smoothmenu.arrowimages.down[2]} : {}).append( //add arrow images
''
)
if (smoothmenu.shadow.enabled){
this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx : this._dimensions.w), y:(this.istopheader? $subul.offset().top+smoothmenu.shadow.offsety : $curobj.position().top)} //store this shadow's offsets
if (this.istopheader)
$parentshadow=$(document.body)
else{
var $parentLi=$curobj.parents("li:eq(0)")
$parentshadow=$parentLi.get(0).$shadow
}
this.$shadow=$('').prependTo($parentshadow).css({left:this._shadowoffset.x+'px', top:this._shadowoffset.y+'px'}) //insert shadow DIV and set it to parent node for the next shadow div
}
$curobj.hover(
function(e){
var $targetul=$(this).children("ul:eq(0)")
this._offsets={left:$(this).offset().left, top:$(this).offset().top}
var menuleft=this.istopheader? 0 : this._dimensions.w
menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent
if ($targetul.queue().length<=1){ //if 1 or less queued animations
$targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, ddsmoothmenu.transition.overtime)
if (smoothmenu.shadow.enabled){
var shadowleft=this.istopheader? $targetul.offset().left+ddsmoothmenu.shadow.offsetx : menuleft
var shadowtop=this.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety : this._shadowoffset.y
if (!this.istopheader && ddsmoothmenu.detectwebkit){ //in WebKit browsers, restore shadow's opacity to full
this.$shadow.css({opacity:1})
}
this.$shadow.css({overflow:'', width:this._dimensions.subulw+'px', left:shadowleft+'px', top:shadowtop+'px'}).animate({height:this._dimensions.subulh+'px'}, ddsmoothmenu.transition.overtime)
}
}
},
function(e){
var $targetul=$(this).children("ul:eq(0)")
$targetul.animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime)
if (smoothmenu.shadow.enabled){
if (ddsmoothmenu.detectwebkit){ //in WebKit browsers, set first child shadow's opacity to 0, as "overflow:hidden" doesn't work in them
this.$shadow.children('div:eq(0)').css({opacity:0})
}
this.$shadow.css({overflow:'hidden'}).animate({height:0}, ddsmoothmenu.transition.outtime)
}
}
) //end hover
}) //end $headers.each()
$mainmenu.find("ul").css({display:'none', visibility:'visible'})
},
init:function(setting){
if (typeof setting.customtheme=="object" && setting.customtheme.length==2){
var mainmenuid='#'+setting.mainmenuid
document.write('')
}
jQuery(document).ready(function($){ //override default menu colors (default/hover) with custom set?
if (typeof setting.contentsource=="object"){ //if external ajax menu
ddsmoothmenu.getajaxmenu($, setting)
}
else{ //else if markup menu
ddsmoothmenu.buildmenu($, setting)
}
})
}
} //end ddsmoothmenu variable
//Initialize Menu instance(s):
ddsmoothmenu.init({
mainmenuid: "smoothmenu1", //menu DIV id
//customtheme: ["#1c5a80", "#18374a"], //override default menu CSS background values? Uncomment: ["normal_background", "hover_background"]
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})