jQuery.noConflict();
jQuery(function($){
    var frontend =
    {
        init: function(){
            this.mapHover();
            this.checkBoxFun();
            // this.submitHover(); -- fixed in newer SS
            // this.datePickerField(); -- fixed in newer SS
            this.bannerSlide();
        },
	    
        mapHover: function(){
            if ($('#Map a.location').length > 0 && $('#ie6').length == 0) {
                var oldsrc;
                $('a.location img').hover(function(){
                    oldsrc = $(this).attr('src');
                    var img = oldsrc.split('.');
                    var newsrc = img[0] + "-hover." + img[1];
                    $(this).attr('src', newsrc);
                }, function(){
                    $(this).attr('src', oldsrc);
                });
            }
        },
	    
        checkBoxFun: function(){
            if ($('body.CocktailPage').length > 0) {
                $('#Love input[type=checkbox]').checkbox({
                    'empty': 'themes/default/images/empty.png'
                });
            }
        },
		
        submitHover: function()
        {
            if($('input.rollover').length > 0)
            {
                var oldsrc;
                $('input.rollover').hover(function(){
                    oldsrc = $(this).attr('src');
                    oldsrc.replace('_over','');
                    var img = oldsrc.split('.');
                    var newsrc = img[0] + "_over." + img[1];
                    $(this).attr('src', newsrc);
                }, function(){
                    $(this).attr('src', oldsrc);
                });
            }
        },
		
        datePickerField:function()
        {
            if($('.datePicker').length)
            {
                $('.datePicker').datepicker({
                    dateFormat: 'dd/mm/yy',
                    minDate: '+0d',
                    duration: 'fast'
                });
            }
        },
		
        bannerSlide: function()
        {
            if ($('#BannerImages').length > 0) {
                $('#BannerImages').cycle({
                    pause: 1,
                    speed: 800
                });
            }
        }
    }
    frontend.init();
});

Cufon.replace('#Content h1');
Cufon.replace('#Main a', {
    hover: true
});

