   $(function(){

	$(".home").hover(function (){$(".home .sub").show('fast');},function (){$(".home .sub").hide('fast');});

	$(".offers").hover(function (){$(".offers .sub").show('fast');},function (){$(".offers .sub").hide('fast');});
	$(".hosting").hover(function (){$(".hosting .sub").show('fast');},function (){$(".hosting .sub").hide('fast');});
	$(".domains").hover(function (){$(".domains .sub").show('fast');},function (){$(".domains .sub").hide('fast');});
	$(".servers").hover(function (){$(".servers .sub").show('fast');},function (){$(".servers .sub").hide('fast');});
	$(".design").hover(function (){$(".design .sub").show('fast');},function (){$(".design .sub").hide('fast');});
	$(".streaming").hover(function (){$(".streaming .sub").show('fast');},function (){$(".streaming .sub").hide('fast');});
	$(".development").hover(function (){$(".development .sub").show('fast');},function (){$(".development .sub").hide('fast');});
	$(".chat").hover(function (){$(".chat .sub").show('fast');},function (){$(".chat .sub").hide('fast');});


});

// border-radius
// Jonah Fox
// MIT Licensed
// Use like : $(".myClass").borderRadius() will attempt to apply curved corners as per the elements -moz-border-radius attribute
// Good:
//   - supports textured forgrounds and backgrounds
//   - maintains layouts
//   - very easy to use
//   - IE6 and IE7
// Bad:
//   - not fluid. Reapply if the dimensions change
//   - only supports rounding all corners
//   - no hover
//   - no Opera

;(function($){

  if($.browser.msie && document.namespaces["v"] == null) {
    document.namespaces.add("v", "urn:schemas-microsoft-com:vml");
    var ss = document.createStyleSheet().owningElement;
    ss.styleSheet.cssText = "v\\:*{behavior:url(#default#VML);}"
  }

  function RR(o) {
    var html = '<div class="ie_border_radius" style="position: absolute; left: 0px; top: 0px; z-index: -1; width:' + (o.width) + "px;height:" + (o.height) + 'px;">'
    html += '<v:roundrect arcsize="' + o.arcSize + '" strokecolor="' + o.strokeColor + '" strokeweight="' + o.strokeWeight + '" style="behavior: url(#default#VML); position:absolute;  antialias: true; width:' + (o.width) + "px;height:" + (o.height) + 'px;' + "" + '" >';
    html += '<v:fill color="' + o.fillColor + '" src="' + o.fillSrc + '" type="tile" style="behavior: url(#default#VML);" />';
    html += '</v:roundrect>';
    html += "</div>"

	  return html;
  }

  $.fn.borderRadius = !$.browser.msie ? function() {} : function(options){

  	  var options = options || {}

      return this.each(function() {

        var opts = {}

	    	if(this._border_radius_opts) {
    			opts = this._border_radius_opts
    		  $(this).find(".ie_border_radius").remove();
    		}
        else
        {
    			opts.strokeColor = this.currentStyle.borderColor;
    			opts.strokeWeight = this.currentStyle.borderWidth;

    			opts.fillColor = this.currentStyle.backgroundColor;
    			opts.fillSrc = this.currentStyle.backgroundImage.replace(/^url\("(.+)"\)$/, '$1');

    			this.style.border = 'none'; // perhaps add onto padding?
    			this.style.background = 'transparent';
    			this._border_radius_opts = opts
    		}

    		opts.width = $(this).outerWidth()
    		opts.height = $(this).outerHeight()

    		var r = options.radius || parseInt( this.currentStyle['-ie-border-radius'] ||  this.currentStyle['-moz-border-radius'] || this.currentStyle['moz-border-radius'] );

    		opts.arcSize = Math.min( r / Math.min(opts.width, opts.height), 1);

        this.innerHTML +=  RR(opts);

        if(this.currentStyle.position != "absolute")
          this.style.position = "relative";


        this.style.zoom = 1; // give it a layout
      });
    }
})(jQuery);

$(document).ready(function() {

	//Set Default State of each portfolio piece
	$(".paging").show();
	$(".paging a:first").addClass("active");

	//Get size of images, how many there are, then determin the size of the image reel.
	var imageWidth = $(".window").width();
	var imageSum = $(".image_reel img").size();
	var imageReelWidth = imageWidth * imageSum;

	//Adjust the image reel to its new size
	$(".image_reel").css({'width' : imageReelWidth});

	//Paging + Slider Function
	rotate = function(){
		var triggerID = $active.attr("rel") - 1; //Get number of times to slide
		var image_reelPosition = triggerID * imageWidth; //Determines the distance the image reel needs to slide

		$(".paging a").removeClass('active'); //Remove all active class
		$active.addClass('active'); //Add active class (the $active is declared in the rotateSwitch function)

		//Slider Animation
		$(".image_reel").animate({
			left: -image_reelPosition
		}, 500 );

	};

	//Rotation + Timing Event
	rotateSwitch = function(){
		play = setInterval(function(){ //Set timer - this will repeat itself every 3 seconds
			$active = $('.paging a.active').next();
			if ( $active.length === 0) { //If paging reaches the end...
				$active = $('.paging a:first'); //go back to first
			}
			rotate(); //Trigger the paging and slider function
		}, 7000); //Timer speed in milliseconds (3 seconds)
	};

	rotateSwitch(); //Run function on launch

	//On Hover
	$(".image_reel a").hover(function() {
		clearInterval(play); //Stop the rotation
	}, function() {
		rotateSwitch(); //Resume rotation
	});

	//On Click
	$(".paging a").click(function() {
		$active = $(this); //Activate the clicked paging
		//Reset Timer
		clearInterval(play); //Stop the rotation
		rotate(); //Trigger rotation immediately
		rotateSwitch(); // Resume rotation
		return false; //Prevent browser jump to link anchor
	});

});

/*******************************************************************************/
$(document).ready(function(){
    $('.openphoto').fancybox({
        'titleShow'     : false,
        'transitionIn'	: 'elastic',
        'transitionOut'	: 'elastic',
        'easingIn'      : 'easeOutBack',
        'easingOut'     : 'easeInBack'
    });
});

$(document).ready(function(){
window.setTimeout("showlogin()", 1000);
$('.footerlogo').mouseover(function(){
$(this).attr('src',"images/footerlogo_over.png");
});
$('.footerlogo').mouseout(function(){
$(this).attr('src',"images/footerlogo_out.png");
});
});
function showlogin(){$('.loginform').slideDown({duration: 1500, easing: 'easeOutExpo'});}


     // Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};
jQuery(function( $ ){

	/**
	 * No need to have only one element in view, you can use it for slideshows or similar.
	 * In this case, clicking the images, scrolls to them.
	 * No target in this case, so the selectors are absolute.
	 */

	$('#slideshow').serialScroll({
		items:'li',
		prev:'.prev',
		next:'.next',
		offset:-230, //when scrolling to photo, stop 230 before reaching it (from the left)
		start:1, //as we are centering it, start at the 2nd
		duration:1200,
		force:true,
		stop:true,
		lock:false,
		cycle:true, //don't pull back once you reach the end
		easing:'easeOutQuart', //use this easing equation for a funny effect
		jump: true //click on the images to scroll to them
	});
});
    //$(".login_username").borderRadius();
    $('#topmenu li.last').corner("tl 10px");
    $('#topmenu li.first').corner("tr 10px");
    //$('ul#topmenu li .sub').corner("bl br 7px");
    DD_roundies.addRule('ul#topmenu li .sub', '0px 0px 7px 7px',true);
    DD_roundies.addRule('.login_username', '10px',true);


