/* --------- CAROUSEL -------------*/
jQuery(document).ready(function() {
							
				
    jQuery('#mycarousel').jcarousel();
	jQuery('#sim_carousel').jcarousel();
	
	$("a.my_lightbox").fancybox({ 'hideOnContentClick': true }); 
	
	$("a.btn_addcart").fancybox({ 'hideOnContentClick': false });
	
	$('.maillist_btn').toggle(function()
			{
				$('#mailbox_wrapper:hidden').slideDown();
				$('.maillist_btn')[0].blur();
				$(this).addClass('on');
				return false;
			},
			function()
			{
				$('#mailbox_wrapper:visible').slideUp();
				$('.maillist_btn')[0].blur();
				$(this).removeClass('on');
				return false;
			}
	);
   
	var $panels = $('#slider .scrollContainer > div');
    var $container = $('#slider .scrollContainer');

    // collect the scroll object, at the same time apply the hidden overflow
    // to remove the default scrollbars that will appear
    var $scroll = $('#slider .scroll').css('overflow', 'hidden');

    // handle nav selection
    function selectNav() {
        $(this)
            .parents('ul:first')
                .find('a')
                    .removeClass('selected')
                .end()
            .end()
            .addClass('selected');
    }

    $('#slider #tab-nav').find('a').click(selectNav);

    // go find the navigation link that has this target and select the nav
    function trigger(data) {
        var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0);
        selectNav.call(el);
    }

    if (window.location.hash) {
        trigger({ id : window.location.hash.substr(1) });
    } else {
        $('ul.navigation a:first').click();
    }
	
	 $('button').hover(function() {
      $(this).addClass('hoverme');
    }, function() {
      $(this).removeClass('hoverme');
    });

	/* --------- SUPERFISH -------------*/	
	jQuery('ul.sf-menu').superfish();
	
});



