﻿var $j=jQuery.noConflict()
var MC={}
MC.homeSlider={
processing: false,
slideAll: false,
offsetWrapper: 0,
offsetContent: 0,
offsetLogo: 0,
targetLogo: '0px',
speed: 800,
init: function(){
MC.homeSlider.slideAll=$j('body').hasClass('v2')
MC.homeSlider.offsetMargin=$j('#top .container').css('marginRight')
MC.homeSlider.offsetWrapper=$j('#top').css('width')
MC.homeSlider.offsetWrapper
$j('.open-close').live('click',function(e){
e.preventDefault()
if(!MC.homeSlider.processing){
if($j('#top').hasClass('open')){
$j('#raidesswf').hide();	
$j('#raidesjpg').show();
MC.homeSlider.close();
}else{
$j('#raidesswf').hide();	
$j('#raidesjpg').show();	
MC.homeSlider.open()
MC.homeSlider.processing = false;}}
})
},
open: function(){
MC.homeSlider.processing=true
$j('#right-content').removeClass('hide-content')
$j('#right-content').addClass('reveal-content')
$j('#top').addClass('processing')
$j('#base .container').animate({opacity: .4},150,'easeInOutCubic',function(){
$j('#top .container').animate({marginRight: 0},MC.homeSlider.speed,'easeInOutCubic',function(){
$j('#top').addClass('open')
$j('#top').removeClass('processing')
})
if(MC.homeSlider.slideAll)$j(this).animate({marginLeft: MC.homeSlider.offsetMargin},MC.homeSlider.speed,'easeInOutCubic')
})
},
close: function(){
MC.homeSlider.processing=true
$j("#top").removeClass('open')
MC.homeSlider.processing=true
$j('#top').addClass('processing')
$j('#top .container').animate({marginRight: MC.homeSlider.offsetMargin},MC.homeSlider.speed,'easeInOutCubic',function(){
$j('#base .container').animate({opacity: 1},450,'easeInOutCubic',function(){
$j('#top').removeClass('processing')
$j('#right-content').addClass('hide-content')
$j('#right-content').removeClass('reveal-content')
MC.homeSlider.processing=false
})
})
if(MC.homeSlider.slideAll)$j('#base .container').animate({marginLeft: 0},MC.homeSlider.speed,'easeInOutCubic')}}
$j(document).ready(function(){
MC.homeSlider.init()
$j('#top, .exposed, #base, .container').matchColumns()
$j(window).resize(function(){
$j('#top, .exposed, #base, .container').matchColumns()
})
})
$j.fn.matchColumns=function(){
var height_tar=$j(document).height()
$j(this).css({"height":(height_tar)+"px"})}
