jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); } var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } }; //Detect Internet Explorer and/or Firefox var isMac = false; var isFirefox = false; var isIE6 = false; if (navigator.platform.indexOf("Mac")>-1) isMac = true; if (navigator.userAgent.indexOf("Firefox")>-1) isFirefox = true; var hasScrollers = false; var isEmailOptInVisible = false; $(document).ready(function(){ $(".alphaover").fadeTo(0,1); $(".alphaover").hover( function(){$(this).fadeTo(150,0.7);}, function(){$(this).fadeTo(150,1);} ); /*menu*/ isIE6 = detectIE(6); if (isMac & isFirefox) hasScrollers = checkForScrollers(); $('#menu .dropList .subNavContainer').hide(); $("#menu .subNavContainer").hover( function(){ $(this).addClass('active'); if (isIE6){ $(".selectHider", this).css('top', 28); $(".selectHider", this).css('width', $(".subNavContainer", this).css('width')); $(".selectHider", this).css('height', $(".subNavContainer", this).height()); $(".selectHider", this).fadeIn("fast"); } }, function(event){ $(this).removeClass('active'); } ); $("#menu .dropList li").hover( function(){ $(this).addClass('active'); if (isMac & isFirefox) $(".subNavContainer", this).slideDown("fast"); else { $(".subNavContainer", this).fadeIn("fast"); if (isIE6){ $(".selectHider", this).css('top', 28); $(".selectHider", this).css('width', $(".subNavContainer", this).css('width')); $(".selectHider", this).css('height', $(".subNavContainer", this).height()); $(".selectHider", this).fadeIn("fast"); } } }, function(){ $(this).removeClass('active'); $(".subNavContainer", this).slideUp("fast"); } ); $("#menu .dropList").mouseout( function(){ if( isIE6 ) $(".selectHider").slideUp("fast"); } ); /* FONT SIZE */ $(function(){ fontsizeChange(); }); function fontsizeChange(){ var changeArea = $("#wrapper"); var btnArea = $(".letterSize"); var changeBtn = btnArea.find(".changeBtn"); var fontSize = [100,112,123.1]; var selStr = "_selected"; var defaultSize = 0; var cookieExpires = 365; var sizeLen = fontSize.length; var useImg = selStr!="" && changeBtn.is("[src]"); function curCookie(){ return $.cookie("fontsize"); } function imgChange(elm1,elm2,str1,str2){ elm1.attr("src",elm2.attr("src").replace(new RegExp("^(\.+)"+str1+"(\\.[a-z]+)$"),"$1"+str2+"$2")); } function mouseOut(){ for(var i=0; i"),elm,"",selStr); } } if(useImg){ changeBtn.each(function(i){ var self = $(this); self.hover( function(){ if(curCookie()!=fontSize[i]){ imgChange(self,self,"",selStr); } }, function(){ mouseOut(); }); }); } changeBtn.click(function(){ var index = changeBtn.index(this); var self = $(this); cookieSet(index); sizeChange(); if(useImg){ mouseOut(); } }); } }); detectIE = function(version) { var isie = false; var istargetversion = false; if (navigator.appName.indexOf("Explorer")>-1 & navigator.userAgent.indexOf('Opera')==-1) isie = true; if (isie) { var min = version; var max = version + 1; var tmp=navigator.appVersion.split("MSIE") var browserVersion=parseFloat(tmp[1]) if (browserVersion>=min & browserVersion < max) { istargetversion = true; } } return istargetversion; }; // Runs only for Firefox Mac - checks for DIVs (and only DIVs) that have an overflow: auto or : scroll property. function checkForScrollers() { try { var scrollers = false var startElem = document.getElementById("middle"); var divs = startElem.getElementsByTagName("div"); for (var i=0; i').attr( 'src', jro.rollover.newimage( $(this).attr('src') ) ); }); }); }, newimage: function( src ){ src = src.replace(/_over/g, ''); return src.substring( 0, src.search(/(\.[a-z]+)$/) ) + '_over' + src.match(/(\.[a-z]+)$/)[0]; }, oldimage: function( src ){ return src.replace(/_over/g, ''); } }; /*smooth scroll*/ function SmoothScroll(targetID){ if( !document.getElementById ) {return true;} var step=10; var max=200; var accel=5; var interval=20; var current_y = document.body.scrollTop || document.documentElement.scrollTop; var element=document.getElementById(targetID); if (!element){return true;} var target_y = 0; for (i = element;i.offsetParent;i=i.offsetParent ){ target_y += i.offsetTop; } var count=0; if ( current_y > target_y ){ step = -(step); accel = -(accel);} var timerid = setInterval( function(){ if (step width) features+=", left="+(window.screen.width-width)/2; else width=window.screen.width; features+=", width="+width; } if (height) { if (window.screen.height > height) features+=", top="+(window.screen.height-height)/2; else height=window.screen.height; features+=", height="+height; } window.open(url,windowname,features); }