/*
$(document).ready(function(){
    initaccordion1();
    initcycle();
    $('.analitic-center .scroll-box').jScrollPane({showArrows: true});
});
$(window).load(function(){
    initHeight($('.analitic-center'));
});
*/

var printData = "";

function printElement(elemendId) {
    printData = document.getElementById(elemendId).outerHTML;
    window.open('../print.php?elementid='+elemendId,null,'');
}

function initaccordion1(){
    $(".account-title").click(function(){        
        $(this).next(".account-info").slideToggle("fast")
        .siblings(".account-info:visible").slideUp("fast");
        $(this).toggleClass("active-slide");        
        $(this).siblings(".title").removeClass("active-slide");
        return false;
    });
}
function initcycle(){
    $('.video-slide    ').cycle({
        fx:      'scrollHorz',
        speed:  400, 
        timeout:  3000,
        prev:    '.prev', 
        next:    '.next' 
    
    });
}
function initHeight(boxes){
    boxes.each(function(){
        setHeight($(this).find('.bg-news'));
    });    
};
function setHeight(col) {  
    var maxHeight = 0;
    col = $(col);
    col.each(function() {  
    if ($(this).height()==0) {$(this).css('height','auto');}
       if ($(this).height() > maxHeight) {    
          maxHeight = $(this).height();
        }
    });
    col.height(maxHeight);
};

var expressInstall = "http://www.mediaforex.net/scripts/expressInstall.swf"; 
function FireFlash(domain){ 
    var path = "http://www.mediaforex.net/users/forexbroker/teaser.swf"; 
    var params = { 
        menu: "false", 
        allowScriptAccess:"always" , 
        allowFullScreen:"true", 
        wmode: "transparent"
    }; 
    var flashvars = { 
        language: "Russian",
        autoPlay: "no", 
        com :"forexbroker", 
        coursePath:"http://"+domain+"/education/forex_education" 
    }; 
    swfobject.embedSWF(path, "teaser", "640", "360", "10.1.0", expressInstall, flashvars, params, false); 
} 

