google.load("feeds", "1");
jQuery(document).ready(function($) {
	$('#accordion').dcAccordion({
		showCount: true,
		saveState: true,
		autoClose    : true,
		cookie	: 'nav-plugin'
	});
	var checkCookie = $.cookie('nav-plugin');
	if(checkCookie == null){
		$('#default-plugin').show();
	}
	$('#contact').contactable({subject: 'Design Chemical Online Contact Form'});
	$('.email').nospam({replaceText: true, filterLevel: 'normal'});
	var content = $(".email");
    content.load("/emailaddress.htm");
	$('a[rel*=external]').click(function(){
		this.target = "_blank";
	});
	$(".img-swap").hover(
          function(){this.src = this.src.replace("_off","_on");},
          function(){this.src = this.src.replace("_on","_off");
     });
	$('a.feed').gFeed({target: '#feed', tabs: false});
	$('.demo').each(function(){
		var linkText = $(this).text();
		linkText = '<span>'+linkText+'</span>';
		$(this).empty().append(linkText);
	});
	if(geoplugin_countryCode() == 'CN'){
		$('.hide-contact, #contact').hide();
	}
});

function defaulttextFunction(){
			$(".defaultText").focus(function(srcc) {
				if ($(this).val() == $(this)[0].title) {
					$(this).removeClass("defaultTextActive");
					$(this).val("");
				}
			});
			$(".defaultText").blur(function() {
				if ($(this).val() == "") {
					$(this).addClass("defaultTextActive");
					$(this).val($(this)[0].title);
				}
			});
			$(".defaultText").addClass("defaultTextActive").blur();
		}
