// clear fields script
function clearText(field){

    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;

}

function myfunk(){
}

// Sitemap effect
SSS_faq = {
	init : function() {
		$('div.sitemap .subcategories').not(':first').slideToggle('slow');
		$('div.sitemap .categories').click(function() { SSS_faq.toggle(this) });
	},
	
	toggle : function(elt) {
		$(elt).toggleClass('active');
		$(elt).siblings('.subcategories').slideToggle('slow');
	}
}

// Go to top script
jQuery(function( $ ){
$('#top').click(function(){
		$.scrollTo( '.globalContainer', 850 );
	});
});

jQuery(document).ready(function() {
	jQuery('#products').jcarousel({
		scroll:1,
		auto: 5,
        wrap: 'last'
    });
	
	jQuery('#promo').jcarousel({
		scroll:1,
		auto: 5,
        wrap: 'last'
    });
	
	$("ul.gallery li a span b").animate({opacity: 0}, 0);
	$("ul.gallery li a span b").addClass('on');
	
	$("ul.gallery li").hover(function() { //On hover...
		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		//$(this).find("img").animate({width:135, height:135, right:10, top:-5 }, 300);
		$(this).find("b").animate({opacity: 0.6}, 300);
		//Animate the image to 0 opacity (fade it out)
	} , function() { //on hover out...
		//Animate the image back to 100% opacity (fade it back in)
		//$(this).find("img").animate({width:130, height:130, right:0, top:0 }, 300);
		$(this).find("b").animate({opacity: 0}, 300);
	});
	
        $('.ngg-gallery-thumbnail a').lightBox();
		$('.editor a img').parent().lightBox();
		
		$('.menuBlock ul li ul li ul').css({"display":"block"});
		//$('li').not(".current-cat").find("ul").css({"display":"none"});
		//$('.current-cat ul li ul').css({"display":"none"});
		//$('.menuBlock .current-cat-parent').parent().css('display':'inherit');
		$('.current-cat').children().addClass("active");
});


