﻿/* sifr */

var nobellight = { 
    src: '/UI/Flash/nobellight.swf' 
    ,ratios: [6, 1.24, 11, 1.13, 12, 1.12, 21, 1.07, 29, 1.04, 30, 1.05, 49, 1.03, 53, 1.02, 54, 1.03, 74, 1.02, 77, 1.01, 78, 1.02, 83, 1.01, 84, 1.02, 89, 1.01, 90, 1.02, 95, 1.01, 96, 1.02, 1.01]
};
sIFR.activate(nobellight);
sIFR.replace(nobellight, {
    selector: 'h1',
    wmode: 'transparent',
    css: '.sIFR-root { font-size:55px; color:#ffffff; text-transform:uppercase; letter-spacing: 4;}'
});
sIFR.replace(nobellight, {
    selector: 'h2',
    wmode: 'transparent',
    
    css: '.sIFR-root { font-size:44px; color:#808080;leading:8;}'
});


/* end */

/* google map */



function gMapLoad() {
   if (GBrowserIsCompatible()) { 
        var m = new GMap2(document.getElementById("gMap"));
        m.setCenter(new GLatLng(59.3343, 18.0725), 14);
        m.addControl(new GSmallMapControl());
        m.setMapType(G_SATELLITE_MAP);

        var ipmIcon = new GIcon();
        ipmIcon.image = "/UI/Images/kartplutten.png";
        ipmIcon.iconSize = new GSize(26, 26);
        ipmIcon.iconAnchor = new GPoint(12, 12);
       
        markerOptions = { icon: ipmIcon };
        var point = new GLatLng(59.3343, 18.0725);
        m.addOverlay(new GMarker(point, markerOptions));
        m.addOverlay(new GPolygon([new GLatLng(-85, 0), new GLatLng(85, 0), new GLatLng(85, 90), new GLatLng(-85, 90)], null, 0, 0, "#000000", 0.25));
        m.addOverlay(new GPolygon([new GLatLng(-85, 90), new GLatLng(85, 90), new GLatLng(85, 180), new GLatLng(-85, 180)], null, 0, 0, "#000000", 0.25));
        m.addOverlay(new GPolygon([new GLatLng(-85, 180.000001), new GLatLng(85, 180.000001), new GLatLng(85, 270), new GLatLng(-85, 270)], null, 0, 0, "#000000", 0.25));
        m.addOverlay(new GPolygon([new GLatLng(-85, 270), new GLatLng(85, 270), new GLatLng(85, 360), new GLatLng(-85, 360)], null, 0, 0, "#000000", 0.25));


 
   }
   else { alert("Sorry, your browser want work with google maps"); }   
}; 
/*end*/

/* checkboxes */

jQuery.fn.cssCheckbox = function() {

jQuery("input[@type='checkbox'] + label", this)
   
		.each(function() {
		    if (jQuery(this).prev()[0].checked)
		        jQuery(this).addClass("checked");
		})

		.click(function() {
		    jQuery(this)
				.toggleClass("checked")
				.prev()[0].checked = !jQuery(this).prev()[0].checked;
		})
		.prev().hide();
}
$(document).ready(function() {
    $("label").addClass("unchecked");
    $().cssCheckbox();

    $("form[@name='subscribeForm']").cssCheckbox();
});

/*end*/

/* empty input */

$(document).ready(function() {

    $(".searchBox").focus(function(srcc) {
        if ($(this).val() == $(this)[0].title) {

            $(this).val("");
        }
    });

    $(".searchBox").blur(function() {
        if ($(this).val() == "") {
            $(this).addClass(".searchBox");
            $(this).val($(this)[0].title);
        }
    });


});
/*end */
function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } }
