$(function(){
$("#content table td, #content table").removeAttr('width');
$('#content table').attr('cellspacing', '0');
$('#content table').attr('cellpadding', '0');

});

$("#content").each(function() {
            var $this = $(this);
            var itemCount = $this.find(".item_container").length;

            for (var i = 0; i < itemCount; i++) {

                        if(i%4==0) $this.find(".item_container").eq(i-1).addClass("end_item");

            };
});

$(function() {
			$('.item_container').hover(function(){
				$(this).find('.over').animate({top:'230px'},{queue:false,duration:500});
			}, function(){
				$(this).find('.over').animate({top:'380px'},{queue:false,duration:500});
			});
		});

$(function(){

$("#thumbs img").error(function () { 
    $(this).parent().parent().remove(); 
});

$("#mainimages img").error(function () { 
    $(this).remove(); 
});

   $('#mainimages').cycle({
        fx:     'fade',
        speed:  'fast',
        timeout: 0,
        pager:  '#thumbs',
pagerEvent: 'mouseover',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#thumbs li:eq(' + (idx) + ') a';
        }
    });

//$('#mainimages').cycle();

//});

});

