jQuery(document).ready(function($){
	$('a[href^="http://"]').filter(function() {
		return this.hostname && this.hostname !== location.hostname;
	}).attr('target', '_blank');

/***** Login Block *****/

	$('#block-menu-menu-top-menu a[href*="user/login"]').click(function(e) {
		e.preventDefault();
		$('#block-user-login').fadeIn();
	});

	$('#block-user-login h2').click(function() {
		$('#block-user-login').fadeOut();
	});

	$('#block-user-login').mouseleave(function() {
		$('#block-user-login').fadeOut();		
	});

/***** Hint Text *****/

	    function hintText(selector, text) {
			var $input = $(selector);
	    $input.focus(function() {
	      if ($input.val() == text) {
	        $input.val('');
	      }
	    }).blur(function() {
	      if ($input.val() === '') {
	        $input.val(text);
	      }
	    }).blur();
    }

    hintText('#edit-search-block-form--2', 'Search...');

/***** Product Tabs *****/
	$('#product-links .product-tab.first a').addClass('active');
	$('#features').hide();
	$('#literature').hide();

$('#product-links .product-tab a').click(function(e) {
	$('#product-links .product-tab a').removeClass('active');
	$(this).addClass('active');
	e.preventDefault();
	$('#overview').hide();
	$('#features').hide();
	$('#literature').hide();

	var anchor = $(this).attr("href");

	$(anchor).show();
	});

/***** Drop Down Menu *****/

	$('#navigation ul li').hover(
		function() {
			$(this).children('ul').show();
		},
		function() {
			$(this).children('ul').hide();
		}
	);

});
;

