function clearMe(formfield){
if (formfield.defaultValue==formfield.value)
         formfield.value = ""
}

$(document).ready( function(){
							
	//Adds active class to left nav
	$('.navsub', this).hide();
	$('li.expand > .navsub', this).show();
	$('li.expand > .navsub', this).prev().addClass('active');
	
	//Part Number Dropdown
	$('#SearchType').sSelect({ ddMaxHeight: '200px' });
	
	//FAQs
	$(".toggle_container").hide();
	$("a.trigger").toggle(function(){
		$(this).addClass("active"); 
		}, function () {
		$(this).removeClass("active");
	});
	$("a.trigger").click(function(){
		$(this).next(".toggle_container").slideToggle("slow,");
    });

    $("[rel=photo_gallery]").fancybox({
        'titleShow': true,
        'transitionIn': 'none',
        'transitionOut': 'elastic',
        'titlePosition': 'over',
        'titleFormat': function (title, currentArray, currentIndex, currentOpts) {
            return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
        },
        'thumbMinWidth': 100
    });
});

function ClosePopupContent() {
    $("#fancybox-close").trigger('click');
}


