// CONFIGURARE CUFON
Cufon.replace('#meniu ul li', { fontFamily: 'Myriad Pro', hover: true });
Cufon.replace('#content_blog_stanga h1', { fontFamily: 'Cocon', hover: true });
Cufon.replace('#content_about_stanga h1, #content_about_stanga h2, #content_about_stanga h3, #portofoliu_page h1, #content_contact_stanga h1, #other_page h1, #pagina_eroare h1', { fontFamily: 'Cocon' });
Cufon.replace('#other_page h2, #other_page h3, #other_page h4', { fontFamily: 'Myriad Pro' });
// END CUFON

// LINK EXTERN
function externalLinks() {  
 if (!document.getElementsByTagName) return;  
 var anchors = document.getElementsByTagName("a");  
 for (var i=0; i<anchors.length; i++) {  
   var anchor = anchors[i];  
   if (anchor.getAttribute("href") &&  
       anchor.getAttribute("rel") == "external")  
     anchor.target = "_blank";  
 }  
}  
window.onload = externalLinks;
// END LINK EXTERN

// INITIALIZARE CAROUSEL HOMEPAGE
function carouselhome_initCallback(carousel)
{
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });
    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
// END INITIALIZARE CAROUSEL HOMEPAGE

// CAROUSEL PORTOFOLIU HOMEPAGE
jQuery(document).ready(function() {						
    jQuery('#carousel_proiecte').jcarousel({
		auto: 3,
        scroll: 1,
		wrap: 'circular',
		initCallback: carouselhome_initCallback
    });
});
// END CAROUSEL PORTOFOLIU HOMEPAGE

// INTEROGARE FUNCTIE - SCOATE HIGLIGHT CAND DAI NEXT RAPID IN JCAROUSEL
jQuery(function($) {
$(".jcarousel-prev, .jcarousel-next").disableTextSelect();
});
// END INTEROGARE FUNCTIE - SCOATE HIGLIGHT CAND DAI NEXT RAPID IN JCAROUSEL

// SCOATE HIGLIGHT CAND DAI NEXT RAPID IN JCAROUSEL
(function($) {
    if ($.browser.mozilla) {
        $.fn.disableTextSelect = function() {
            return this.each(function() {
                $(this).css({
                    'MozUserSelect' : 'none'
                });
            });
        };
        $.fn.enableTextSelect = function() {
            return this.each(function() {
                $(this).css({
                    'MozUserSelect' : ''
                });
            });
        };
    } else if ($.browser.msie) {
        $.fn.disableTextSelect = function() {
            return this.each(function() {
                $(this).bind('selectstart.disableTextSelect', function() {
                    return false;
                });
            });
        };
        $.fn.enableTextSelect = function() {
            return this.each(function() {
                $(this).unbind('selectstart.disableTextSelect');
            });
        };
    } else {
        $.fn.disableTextSelect = function() {
            return this.each(function() {
                $(this).bind('mousedown.disableTextSelect', function() {
                    return false;
                });
            });
        };
        $.fn.enableTextSelect = function() {
            return this.each(function() {
                $(this).unbind('mousedown.disableTextSelect');
            });
        };
    }
})(jQuery);
// END SCOATE HIGLIGHT CAND DAI NEXT RAPID IN JCAROUSEL

