jQuery(document).ready(function(){
	jQuery('a[href^="#"]').bind('click.smoothscroll',function (e) {
		e.preventDefault();
		var target = this.hash;
		if (target!="")
		{
			starget = jQuery(target);
			jQuery('html, body').stop().animate({
				'scrollTop': starget.offset().top
			}, 1000, 'swing', function () {
				window.location.hash = target;
			});
		}
	});
	if ("'"+smallbusinesswide_parm.testHome+"'"!='1')
	{
		jQuery('body').css('display', 'none');
		jQuery('body').fadeIn(1000);
		jQuery('.link').click(function() {
			event.preventDefault();
			newLocation = this.href;
			jQuery('body').fadeOut(1000, newpage);
		});
	}
	function newpage() {
		window.location = newLocation;
	}
	jQuery('.comment-reply-link').click(function() {
		jQuery('#respond').toggle();
	});
	jQuery('#addcomment').click(function() {
		jQuery('#respond').toggle();
	});
});
function get_browser(){
    var ua=navigator.userAgent,tem,M=ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; 
    if(/trident/i.test(M[1])){
        tem=/\brv[ :]+(\d+)/g.exec(ua) || []; 
        return {name:'IE',version:(tem[1]||'')};
        }   
    if(M[1]==='Chrome'){
        tem=ua.match(/\bOPR\/(\d+)/)
        if(tem!=null)   {return {name:'Opera', version:tem[1]};}
        }   
    M=M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
    if((tem=ua.match(/version\/(\d+)/i))!=null) {M.splice(1,1,tem[1]);}
    return {
      name: M[0],
      version: M[1]
    };
}
function bubClick(obj) {
	var browser = get_browser();
	if (browser.name!="MSIE" || browser.version>"8") {
		document.getElementById(obj).style.backgroundImage="url('"+smallbusinesswide_parm.imgBulleBas+"')";
		document.getElementById(obj).getElementsByTagName('a')[0].style.lineHeight='130px';
	}
}
function bubPop(obj) {
	var browser = get_browser();
	if (browser.name!="MSIE" || browser.version>"8") {
		document.getElementById(obj).style.backgroundImage="url('"+smallbusinesswide_parm.imgBulle+"')";
		document.getElementById(obj).getElementsByTagName('a')[0].style.lineHeight='120px';
	}
}
