$(document).ready(function() {
    var imgSize = new Array('100px', '174px');
    if (typeof ($("ul.thumb").attr("data-value")) != undefined && $("ul.thumb").attr("data-value") != null) {
        imgSize = $("ul.thumb").attr("data-value").split(":");
    }
    
    $("ul.thumb li").hover(function() {
        $(this).css({
            'z-index' : '10'
        });
        $(this).find('img').addClass("hover").stop()
        .animate({
            marginTop: '-110px', 
            marginLeft: '-110px', 
            top: '50%', 
            left: '50%', 
            width: imgSize[1], 
            height: imgSize[1],
            padding: '10px' 
        }, 200);
	
    } , function() {
        $(this).css({
            'z-index' : '0'
        });
        $(this).find('img').removeClass("hover").stop()
        .animate({
            marginTop: '0', 
            marginLeft: '0',
            top: '0', 
            left: '0', 
            width: imgSize[0], 
            height: imgSize[0], 
            padding: '5px'
        }, 400);
    });

    $("ul.thumb li a").click(function() {
		
        var mainImage = $(this).attr("href");
        var bigImage = $(this).attr("rel");
        $("#main_view img").attr({
            src: mainImage
        });
        $("#main_view a").attr({
            href: bigImage
        });
        return false;		
    });
 
});
