/* 
Filename: util.js
Author: 33Delivered 
Website: http://www.33delivered.com
Last Modified: 1.22.2011

Description: library of common utility javascript functions for stockland martel.
*/

/*
* sm_inc_script
* 
* includes a js file from within javascript
* used to manually order script execution
* 
* pre-conditions: DOM is ready, js file exists on server 
* post-conditions: script is executed at the time of inclusion 
* side-effects: script is added into the head section of the document DOM
* 
* @param {string} s basename of file (w/ extension) that resides in the /js folder (ex: 'util.js')
* @return void
*/
function sm_inc_script(s) {
    var script = document.createElement('script');
    script.src = '/js/' + s;
    script.type = 'text/javascript';
    document.getElementsByTagName('head')[0].appendChild(script);
}
function showpic() {

    //1.22.2011 - nav image dropshadow fix
    //$(this).find("img").css("display","block");	
    $(this).find("img").css("display", "block");
    $(this).find("div.ima_pic_div").css("display", "block");


}
function hidepic() {

    //1.22.2011 - nav image dropshadow fix
    $(this).find("div.ima_pic_div").css("display", "none");
    $(this).find("img").css("display", "none");

}

function showmenu() {

    //if there are no stickies, normal behavoir
    if (!$.areAnySticky()) {
        //1.22.2011 - nav image dropshadow fix
        //$(this).find("div").css("display","block");		
        $(this).find("div.ima_nav_div").css("display", "block");

    }


}
function hidemenu() {

    //if there are no stickies, normal behavoir
    if (!$.areAnySticky()) {
        //1.22.2011 - nav image dropshadow fix
        //$(this).find("div").css("display","none");		
        $(this).find("div.ima_nav_div").css("display", "none");

    }
}

function baseName(str) {
    return String(str).substring(str.lastIndexOf('/') + 1);
}


