﻿
$(document).ready(function() {
	
    //drop down local menu functionality
    $('ul#productList > li > a').click(function() {
        if ($(this).siblings('ul').css('display') != 'block' && $(this).siblings('ul').children().length > 0) {
            $('ul#productList ul').hide();
            $(this).siblings('ul').show();
        }
        /*
        else {
            $(this).siblings('ul').hide();
        }*/
        return false;
    });

});

function CreateBookmarkLink() {
    title = "Citron Design";
    url = document.location.href;
    if (window.sidebar)
    { 
        // Mozilla Firefox Bookmark		
        window.sidebar.addPanel(title, url,"");
    } 
    else if( window.external ) 
    { // IE Favorite		
        window.external.AddFavorite( url, title); 
    }	
    else if (window.opera && window.print) 
    { // Opera Hotlist
        return true;
    }
}

function checkEmail(strValue) {
    var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
    if (!filter.test(strValue)) {
        return false;
    }
    return true;
}

function dowebadminpopup(url, width, height, scrollbars, resizable, toolbar, menubar, location, status) {
    var win = window.open(url, "_blank", "toolbar=" + ((toolbar) ? 1 : 0) + ",resizable=" + ((!resizable) ? 1 : 0) + ",scrollbars=" + ((scrollbars) ? 1 : 0) + ",height=" + height + ",width=" + width + ",menubar=" + ((menubar) ? 1 : 0) + ",location=" + ((location) ? 1 : 0) + ",status=" + ((status) ? 1 : 0) + "");
    win.focus();
}

