﻿jQuery.timer = function(time,func,callback){
	var a = {timer:setTimeout(func,time),callback:null}
	if(typeof(callback) == 'function'){a.callback = callback;}
	return a;
};
$(document).ready(function() {
    $("#PostCardCarousel").jcarousel();
//     $.timer(1000, function() {
       $('div#contact').accordion({
            header: 'div.accordiantab',
            alwaysOpen: false,
            animated: 'easeslide',
            autoheight: false
        });
//    });

    $("ul#PostCardCarousel li img").hover(function() {
        var link = $(this).attr("src").replace('t_', '');
        MM_preloadImages(link);
        $('div.pics2friend').attr('style', 'background:url(' + link + ') no-repeat 25px 25px;');
        $('input#EFPostCard').val(link);
        //alert(link);
    });
});

function RefreshImage(valImageId) {
    var objImage = document.images[valImageId];
    if (objImage == undefined) {
        return;
    }
    var now = new Date();
    objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}