/* Path for this file: /content/dam/nissan/codepack/nissan/components/pages/layout/mainlayout.js/jcr:content/renditions/original */
// these were pulled from main JS file into mainlayout.js
/*
jQuery(document).ready(function() {
    if(jQuery("#frameBg").size()>0){
        //jQuery("#frameBg").height(jQuery("#frameContent").height()+20);
    }
    jQuery("#frameContent").click(function(){
        //jQuery("#frameContent").html(jQuery("#frameContent").html()+"<br /><br />");
        //resizeMe(jQuery("#frameContent").height());
    });    
});
function resizeMe(hgt){
    if(jQuery("#frameBg").size()>0){
        jQuery("#frameBg").height(hgt+20);
        if(jQuery("#frameContent").height() + 50 > jQuery("#pageBg").height()){
            //jQuery("#pageBg").height(jQuery("#pageBg").height()+20);
        }
    }
}
*/

jQuery(document).ready(function() {
    if(jQuery.browser.msie && parseInt(jQuery.browser.version) === 6) jQuery('#frameBg + #frameContent').addClass('frameContentHasBg');
 
    if(jQuery("#frameContent").height() + 50 > jQuery("#pageBg").height()){         
            jQuery("#pageBg").css("margin-bottom","50px");
        }
    
});


jQuery(document).ready(function(){
    var siteLinks = jQuery('.mreSitesImgSec a');
    for (var i = 0; i < siteLinks.length; i++){
        if(jQuery(siteLinks[i]).attr('href').match('/parts')){
            var link = siteLinks[i];
        }
    }
    
    if (link != undefined) {
        jQuery(link).click(function(e){
            e.preventDefault();
            try{
                crmEvent600();
            }catch(e){}
            var endLink = jQuery(this).attr('href');
            setTimeout(function(){
                window.open (endLink);
            },500);
        }); 
    }
});














