﻿$(document).ready(function() {
    $('.item').hover(
		function() { $(this).addClass('hover') },
		function() { $(this).removeClass('hover') }
	)

    $('.item').click(function() {
        var the_url = $(this).find('.link').attr('href')
        if (the_url) the_url = document.location = the_url;
    })

    if (($('div .col1 .padding .titles .title').text() == $('div .col2combo3 .padding .titles .titlepad').text()) || ($('div .col1 .padding .titles .title').text() == $('div .col2 .padding .titles .titlepad').text()))
        $('div .col1 .padding .titles .title').hide();
})

function display(showId, HideId) {
    document.getElementById(showId).style.display = 'block'
    document.getElementById(HideId).style.display = 'none'
}

function simpledisplay(showId) {
    document.getElementById(showId).style.display = 'block'
}

function simplehide(hideId) {
    document.getElementById(hideId).style.display = 'none'
}

function showJQueryContact() {
    $("#contactBlock").show("slide", { direction: "up" }, 0);
}

function zap(id) {
    if (document.getElementById(id).style.display == 'block') {
        document.getElementById(id).style.display = 'none'
    }else{
        document.getElementById(id).style.display = 'block'
    }
}

function changeImageMenu(id,on) {
    obj = document.getElementById(id)

    var string = obj.src
    if (on == 'on') {
        if (string.indexOf("_o.gif") > 0) {

        } else {
            obj.src = string.replace(".gif", "_o.gif");
        }
    } else {
        if (string.indexOf("_o.gif") > 0) {
            obj.src = string.replace("_o.gif", ".gif");
        } else {
            obj.src = string.replace(".gif", "_o.gif");
        }
    }
}

function clearField(id) {
    document.getElementById(id).value = ""
}
