$(function(){
	if ( $(".slideshow .headline_item").size() > 1 ) {
            $("#slideshow_nav").tabs(".slideshow .headline_item", {
                autoplay: false,
                autopause: true,
                interval: 5500,
                effect: 'fade',
                rotate: true
            }).slideshow();
    } 

    setTimeout(function(){$("#slideshow_nav").data("slideshow").play();},3000);

    $('#nav_header ul').mobileMenu({
        switchWidth: 799,                   //width (in px to switch at)
        topOptionText: 'Menu',     //first option text
    	indentString: '&nbsp;&nbsp;&nbsp;'  //string for indenting nested items
    });
    $('noscript[data-large][data-small]').each(function(){
            var src = screen.width >= 600 ? $(this).data('large') : $(this).data('small');
            $('<img src="' + src + '" alt="' + $(this).data('alt') + '" />').insertAfter($(this));
    });
    
    $('.headline_item').each(function() {
		id  = $(this).attr('id');
		src = $(this).find('img').attr('src');
		alt = $(this).find('img').attr('alt');
		// headline_item_loadim(id, src, alt);
    });
    
    
    $('.produk .item_link').each(function() {
		$(this).hover(
		    function () {
			$(this).find('.item_info').stop().animate({
			    marginTop: 0
			}, 200, function() {} );
		    },
		    function () {
			$(this).find('.item_info').stop().animate({
			    marginTop: 94
			}, 500, function() {} );
		    }
		);
    });
    
});
