// JavaScript Document



$(document).ready(function() {

	
<!--SHOW / HIDE LOGGIN-->
	


$('body').click(
function(){
$("#adm_container").hide("fast");
});


$("#toggleLoggin").click(
function(event){

if (event.stopPropagation) {
 // this code is for Mozilla and Opera
 event.stopPropagation();
 }
 else if (window.event) {
 // this code is for IE
 window.event.cancelBubble = true;
 }

$("#adm_container").slideToggle("fast");
});

$("#adm_container").click(
function(event){

if (event.stopPropagation) {
// this code is for Mozilla and Opera
event.stopPropagation();
}
else if (window.event) {
// this code is for IE
window.event.cancelBubble = true;
}

}); 

$(".marquee_container").click(
function(event){

if (event.stopPropagation) {
// this code is for Mozilla and Opera
event.stopPropagation();
}
else if (window.event) {
// this code is for IE
window.event.cancelBubble = true;
}

}); 

	
<!--LOAD TWEETS-->

$(function(){
      $(".tweet").tweet({
        count: 1,
        fetch: 5,
        filter: function(t){ return ! /^@\w+/.test(t["tweet_raw_text"]); },
        username: "bjolov",
		template: "{text} {time}",
		loading_text: "Laster inn tweets..."
      });
});

<!--DEFAULT TEXT IN TEXTFIELDS-->
	
$(".defaultText").focus(function(srcc)
    {
        if ($(this).val() == $(this)[0].title)
        {
            $(this).removeClass("defaultTextActive");
            $(this).val("");
        }
    });
    
    $(".defaultText").blur(function()
    {
        if ($(this).val() == "")
        {
            $(this).addClass("defaultTextActive");
            $(this).val($(this)[0].title);
        }
    });
    
    $(".defaultText").blur();
	
<!--TOOLTIP-->
	
$("#logginInfoIcon").tooltip({ 
effect: 'slide',

position: "center right",

offset: [50, 0],

delay:200,

relative: 'false'

});

<!--SUBMENU-->


$("#mainmekkemenu li ul").appendTo("#navSub");


<!--OVERLAY FORM-->

$(function() {
		$("img[rel]").overlay({mask: '#000', effect: 'apple' });
});


<!--FORM VALIDATOR-->

$("#myform").validator();

<!--REMOVE LINK ON LOGO-->

var cnt = $("#produktIkon a").contents()
$("#produktIkon").replaceWith(cnt);


});
