$(document).ready(function(){
	
	$('#left-menu-show').hide();
	$('#bookmark').css({
        width: '760',
        height: '410'
    });
	$('#bookmark2').css({
        height: '300'
    });
		
    $('.images').hide();
    $('#bookmark').show();
	$('#bookmark2').show();
    $('#left-menu-bookmark').show();
	$('#home-fade').hide();
    $('#left-foot-content').hide();
    $('#foot').hide();
    $('.prod-title:first').addClass('selected first');
    $('.prod-title:last').addClass('last');
    $('.li-selected span').addClass('selected');
    $('li.last-item span').addClass('last');
	 $("ul.sf-menu").superfish({ 
            pathClass:  'current' 
        }); 
	$('ul.sf-menu').addClass('sf-navbar');
});



$(window).load(function(){

    $('#bookmark').hide();
	$('#bookmark2').hide();
    $('#home-fade').show();
    $('#home-fade .xt-multimediacontents-wrapper').cycle({
        fx: 'fade',
        timeout: 1500,
        speed: 3000
    });
	$('#left-menu-bookmark').hide();
	$('#left-menu-show').css('display','block');
    $('#the-left-menu').accordion({
        header: 'p.p-level-2',
        navigation: true,
        active: true,
        event: 'click',
		autoheight:false,
		active:'.in-path'
    });
	$('p.p-level-2 in-path').addClass ('selected');
	$('p.p-level-3 a.in-path').addClass ('current');
	$('div#the-left-menu').addClass('selected');
	
    $('.images').show();
    $('.the-image:not(:first)').hide();
	$('.the-image:first').show();
    

	
	
	var h = $('#foot').height();
    if (h < 236) {
        $('#foot').css('height','235');
		$('#left-foot-content').css('height','235');
        h = $('#foot').height();
    }
    
    $('#left-foot-content').css('height', h);
    $('.prod-title').each(function(i){
        $(this).click(function(){
            var id = '.the-image:eq(' + i + ')';
            $('.prod-title').removeClass('selected');
            $('.the-image').hide();
            $(id).show();
            $(this).addClass('selected');
            return false;
        });
    });
    $('#left-foot-content').show();
    $('#foot').show();
	
		var hnews = $('#the-news').height();
	if (hnews < 645) {
		$('#the-news').height(645);
	}
	
	
	var hnews = $('#the-news').height();
	if (hnews > 650) {
		$('#left-foot-content').height(hnews-410);
	}
	
});
