/**
* Common Javascript Methods
*
* @author 		Zone
* @email		info@zonecontent.com
* @url 			http://www.zonecontent.com/
* @copyright 	Copyright (c) 2009, zonecontent.com. All rights reserved.
* @version		0.0.1
*/
var CLASSES = {
    "focus": "focus",
    "hover": "hover",
    "selected": "selected"
}

// MSIE 6
if ($.browser.msie && $.browser.version < 7) {

    // Hover
    $("#products > li").hover(function() {
        $(this).addClass(CLASSES.hover);
    }, function() {
        $(this).removeClass(CLASSES.hover);
    });
    $("#information > li").hover(function() {
        $(this).addClass(CLASSES.hover);
    }, function() {
        $(this).removeClass(CLASSES.hover);
    });

    // BUGGY IN IE!!
    // $("fieldset.form label.required").each(function () {
    // 	var el = $(this);
    // 	el.( el.text() + "*" );
    // });
    $("div.grid_row div[@class*='grid']:first-child, #products li:first-child, #information>li>ol>li:first").addClass("first_child");
    $("div.grid_row div[@class*='grid']:not(:only-child):last-child, #legals li:last-child a").addClass("last_child");
    $("input[@type=text]").addClass("text");
    $("input[@type=password]").addClass("password");

}

// Open external links in a new window
$("a[@rel*=external]").click(function() {
    window.open(this.href);
    return (false);
});

// Hide multiple address form for popup
$("#multiple_address_form").css("display", "none");