﻿// JScript File
/*
function GenATB(textareaid,title,goodname,iconurl,imageurl,goodhref)
{
    if (document.getElementById(textareaid))
    {
        document.getElementById(textareaid).value='<div style="border:2px solid white; font-family:Tahoma;font-weight:normal; font-size:12px; color:black;">\n'+
	    '<div style="border:2px solid #49af00; padding:4px; width:336px; height:156px; overflow:hidden">\n'+
		    '<table cellpadding="0" border="0" cellspacing="0">\n'+
			    '<tr valign="top"><td rowspan="3"  style="width:156px; height:156px; padding-right:4px; "><img src="'+imageurl+'" alt="'+title+': '+goodname+'" title="'+title+': '+goodname+'"  /></td>\n'+
				    '<td colspan="2" style=" height:61px; width:174px"><div style="padding:3px;">'+title+'</div></td>\n'+
			    '</tr><tr><td colspan="2" style="background-color:#8be452; width:170px; height:56px;  overflow:hidden"><div style="padding:3px;">'+goodname+'</div></td>\n'+
			    '</tr><tr><td style="padding-top:7px; width:28px; overflow:hidden"><img src="'+iconurl+'" alt="'+title+'" title="'+title+'" style="margin-right:6px" /></td>\n'+
				'    <td><a style="color:black; font-weight:normal; font-size:12px" href="'+goodhref+'">подробнее на podarki.ru</a></td></tr></table></div></div>\n'
				
	    try
        {
            document.getElementById(textareaid).select();
        }
        catch(ex){}
    }
}
*/
function show_full_about(o) {
    var div_full = o.find('.full');
    full_height = div_full.height();
    initial_height = o.find('.pre').height();

    o.find('.pre').hide();
    div_full.height(initial_height);
    div_full.css('display', 'block');
    div_full.animate({ "height": full_height },
									"slow",
									"swing",
									function () {
									    $(this).height('auto');
									}
									);
}

$(document).ready(
    function () {
        //make links opening in new window
        $('a[rel=external]').click(function () {
            this.target = "_blank";
        });

        //fancy box
        $('a[rel=fancybox_single]').fancybox({
            'zoomOpacity': true,
            'zoomSpeedIn': 500,
            'zoomSpeedOut': 500,
            'transitionIn': 'elastic',
            'transitionOut': 'elastic',
            'orig':$('.fancybox_orig'),
            'hideOnOverlayClick': true, 
			'hideOnContentClick':true, 
        });

    }
);