$(function(){
    $('a.uc').click(function() {
        alert('In lucru'); 
        return false;
    });
    
    $.fn.fancyzoom.defaultsOptions.imgDir= ssMVC_BASE + '/js/jqueryfancyzoom/ressources/';   //must finish with a /

    // Select all links with tozoom class, set the open animation time to 1000
    $('a.tozoom').fancyzoom({Speed:1000, overlay:0.8});


    var groups = new Array();
    $("[@class^=sameheight]").each(function() {
        var classes = this.className.split(' ');
        for(var i=0;i<classes.length;i++) {
            if (classes[i].substring(0,10) == 'sameheight') {
                if(groups[classes[i]]) {
                    groups[classes[i]] = Math.max($(this).height(),groups[classes[i]]);
		    
                } else {
                    groups[classes[i]] = $(this).height();
                }
            }
        }
        //alert(this.className);
    });
    for(var i in groups) {
        $("."+i).height(groups[i]);
    }
    

swfobject.embedSWF("/media/banner_125x125.swf", "BTClub", "125", "125", "9.0.0", "expressInstall.swf");
});

if (!Number.toFixed) {
Number.prototype.toFixed=function(x) {
   var temp=this;
   temp=Math.round(temp*Math.pow(10,x))/Math.pow(10,x);
   return temp;
}}
function PMT (ir, np, pv) {
 /*
 ir - interest rate per month
 np - number of periods (months)
 pv - present value
  */
 return( ir * ( pv * Math.pow ( (ir+1), np )) ) / ( (  1 ) * ( Math.pow ( (ir+1), np) - 1 ) );
}
function calcBT(nluni, pret)
{
	if(typeof nluni != 'number' || !isFinite(nluni))
	{
		return -3;
	}
	if(typeof pret != 'number' || !isFinite(pret))
	{
		return -2;
	}
	if(pret <= 299.99)
	{
		return -1;
	}
	comisionAcordare = 150;
	dob = 16.9 / 100;
	comisionAdministrare = 9.90;
	pretFinal = pret + comisionAcordare;
	valoare_rata = PMT(dob/12, nluni, pretFinal) + comisionAdministrare;
	return valoare_rata;
}


