jQuery.noConflict();

jQuery(document).ready(function ($)
{
    if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {

        var count = 0;
        var link = '#';

        $('.sf-menu > li:nth-child(2) > a').bind('touchstart', function() {
            if(count === 0) {
                link = $(this).attr('href');
                $(this).attr('href', '#');
            }
            else {
                $(this).attr('href', link);
            }

            count++;
        });
    }

    $('.sf-menu > li').hover(function () {
            $('ul', this).stop(true, true).delay(250).slideDown(150);
        },
        function () {
            $('ul', this).stop(true, true).slideUp(150);
        }
    );

});
