  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-28807351-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
$(function() {
    if ($("#fade").length) {
        $('#fade').cycle();
    }
    $("a.colorbox-iframe").colorbox({
        iframe: true,
        innerWidth: 640,
        innerHeight: 400
    });

    $("a.colorbox").colorbox({
        photo: true
    });

    $("a[rel='colorbox']").colorbox({
        photo: true,
        current: ""
    });

    $("a.clickable").click (function () {
        var _sc = $("html").attr("scrollTop");
        var ppp = $(this).parent().parent();
        var _id = $(this).attr("rel");
        if (_id != 'descriere') {
            $("div#content").find("h1").first().addClass("grey");
        } else {
            $("div#content").find("h1").first().removeClass("grey");
        }
        
        if (typeof productBanner != 'undefined' && productBanner[_id]) {
            var imgP = $("img#fadeImg").parent();
            $("img#fadeImg").remove();
            productBanner[_id].hide();
            imgP.html(productBanner[_id].attr("id", "fadeImg").show(200));
        }
        var pp = $(this).parent();
        $("div.product").hide();
        ppp.find("li").removeClass("selected");
        pp.addClass("selected");
        $("div#" + _id).fadeIn(200);
        $("html").attr("scrollTop", _sc);
        return false;
    });
});
