
/*overstate*/
$(document).ready(function() {
    //nth-child photos
    $('.photos > a:nth-child(4n)').css('margin-right', '0px');
    
    //fancybox
    $("a[rel=photos]").fancybox({
	    'titleShow'     : false,
	    'transitionIn'	: 'none',
	    'transitionOut'	: 'none'
	});
    
    //list items hover
    $(".list-item-right li").hover(function() {
        $(this).find(".price a").show();
    }, function() {
        $(this).find(".price a").hide();
    });
    
    $(".gigs-item li").hover(function() {
        $(this).find(".price a").show();
    }, function() {
        $(this).find(".price a").hide();
    });
    
    //dropdown menu
    $(".drop").hover(function() {
        $(this).find("#featured-venues").show();
    }, function() {
        $(this).find("#featured-venues").hide();
    });

    $(".menuoverstate").each(function (i) {

        preload_image = new Image();
        preload_image.src = this.src.replace(".jpg", "_o.jpg");

        $(this).hover(
            function () {
                if (this.src.indexOf("_o.jpg") == -1) {
                    this.src = this.src.replace(".jpg", "_o.jpg");
                }

            },

            function () {
                this.src = this.src.replace("_o.jpg", ".jpg");

            });

    }
        );
    
});

