
/* - site.js - */
var imgWidth = {
	init : function(){
		
		jq( "#content dl.image" ).each(
			function(){
				w = jq( this ).find( "img" ).width();
				if( w > 0 ) {
					jq( this ).width( w );
				}
			}
		);
		
	}};

var mapSlide = {
	init : function(){
		
		jq('a#map-toggle').click(function() {
			if(jq("#map").hasClass('large')) {
				jq("#map").removeClass('large');
				jq("dl.map dt").animate( {width: "516px", height: "206px"} );
				jq("#map").animate( {width: "516px", height: "206px"} );
				//jq("dl.map dt").html('<iframe id="map" width="516" height="206" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.dk/maps?f=q&amp;hl=da&amp;geocode=&amp;q=Industriparken+44A&amp;sll=55.869147,8.657227&amp;sspn=5.031933,9.129639&amp;ie=UTF8&amp;s=AARTsJoYOQDmzAGHIpA_OrIR2fkV_BPyDw&amp;ll=55.727932,12.386656&amp;spn=0.009957,0.044289&amp;z=14&amp;output=embed"></iframe>');
			} else {
				jq("#map").addClass('large');
				jq("dl.map dt").animate( {width: "696px", height: "506px"} );
				jq("#map").animate( {width: "696px", height: "506px"} );
				//jq("dl.map dt").html('<iframe id="map" width="696" height="506" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.dk/maps?f=q&amp;hl=da&amp;geocode=&amp;q=Industriparken+44A&amp;sll=55.869147,8.657227&amp;sspn=5.031933,9.129639&amp;ie=UTF8&amp;s=AARTsJoYOQDmzAGHIpA_OrIR2fkV_BPyDw&amp;ll=55.727932,12.386656&amp;spn=0.009957,0.044289&amp;z=14&amp;output=embed"></iframe>');
			}
			return false;
		});
		
	}};

jq(document).ready(function(){
	
	imgWidth.init();
	mapSlide.init();
// Fancy boxes
	
	jq("a#login-toggle").fancybox({
		'zoomSpeedIn':	400, 
		'zoomSpeedOut':	400,
		'overlayShow':	true,
		'overlayOpacity': 0.4,
		'hideOnContentClick': false,
		'frameWidth': 450,
		'frameHeight': 280
	});
	
	jq("div#portal-content-wrapper a.fancy").fancybox({
		'hideOnContentClick': true
	});
	
	
	
	
});

