jQuery(document).ready(function($) {
    jQuery("#left-tag-line").mouseenter(function(){slideOutLeftPane();});
    jQuery("#left-tag-line").mouseleave(function(){slideBackLeftPane();});
    jQuery("#feature").mouseenter(function(){slideOutRightPane();});
    jQuery("#feature").mouseleave(function(){slideBackRightPane();});    
	jQuery(".feature-banner-inner").css("background-color", "#fff");   
	jQuery(".left-tag-line-banner-inner").css("background-color", "#fff"); 
});

function slideOutLeftPane(){
    jQuery("#left-tag-line").stop().animate({left : "-28px"},100,"linear",addLeftZindex);
    showLeftPane();
}

function showLeftPane(){
    jQuery("#cell1").addClass("hidden");
    jQuery("#left-pane-content").removeClass("left-pane-content");
    jQuery("#left-pane-content").addClass("left-pane-content-hover");
    jQuery("#cell1-select").removeClass("hidden");
}

function slideBackLeftPane(){
    removeLeftZindex();
    jQuery("#left-tag-line").stop().animate({left : "0px"},100,"linear",hideLeftPane);
}

function addLeftZindex(){ 
	jQuery(".left-tag-line-listing-inner").css("background-color", "#fff");
	jQuery(".left-tag-line-banner-inner").css("background-color","#fff");
	jQuery(".left-tag-line-listing-inner").fadeIn('fast',function(){
    if (jQuery.browser.msie){this.style.removeAttribute('filter');}
});
    jQuery(".left-tag-line-banner-inner").fadeIn('fast',function(){
    if (jQuery.browser.msie){this.style.removeAttribute('filter');}
});
}

function removeLeftZindex(){
	jQuery(".left-tag-line-listing-inner").css("background-color", "#fff");
	jQuery(".left-tag-line-banner-inner").css("background-color","#fff");
    jQuery(".left-tag-line-listing-inner").fadeOut('fast',function(){
    if (jQuery.browser.msie){this.style.removeAttribute('filter');}
});
    jQuery(".left-tag-line-banner-inner").fadeOut('fast',function(){
    if (jQuery.browser.msie){this.style.removeAttribute('filter');}
});
}

function hideLeftPane(){
    jQuery("#cell1").removeClass("hidden");
    jQuery("#left-pane-content").removeClass("left-pane-content-hover");
    jQuery("#left-pane-content").addClass("left-pane-content");
    jQuery("#cell1-select").addClass("hidden");
}

function slideOutRightPane(){
    jQuery("#feature").stop().animate({left : "530px"},100,"linear",addRightZindex);
    showRightPane();
}

function showRightPane(){
    jQuery("#cell3").addClass("hidden");
    jQuery("#feature").css({"padding-right":"22px","width":"570px"});
    jQuery("#cell3-select").removeClass("hidden");
}

function slideBackRightPane(){
    removeRightZindex();
    jQuery("#feature").stop().animate({left : "499px"},100,"linear",hideRightPane);
}

function hideRightPane(){
    jQuery("#cell3").removeClass("hidden");
    jQuery("#feature").css({"padding-right":"27px","width":"568px"});
    jQuery("#cell3-select").addClass("hidden");
}

function addRightZindex(){
	jQuery(".feature-listing-inner").css("background-color", "#fff");
	jQuery(".feature-banner-inner").css("background-color","#fff");
	jQuery(".feature-listing-inner").fadeIn('fast',function(){
    if (jQuery.browser.msie){this.style.removeAttribute('filter');}
});
    jQuery(".feature-banner-inner").fadeIn('fast',function(){
    if (jQuery.browser.msie){this.style.removeAttribute('filter');}
});
}

function removeRightZindex(){
	jQuery(".feature-listing-inner").css("background-color", "#fff");
	jQuery(".feature-banner-inner").css("background-color","#fff");
    jQuery(".feature-listing-inner").fadeOut('fast',function(){
    if (jQuery.browser.msie){this.style.removeAttribute('filter');}
});
    jQuery(".feature-banner-inner").fadeOut('fast',function(){
    if (jQuery.browser.msie){this.style.removeAttribute('filter');}
});
} 

