jQuery(function($){
				

	//show background after 10 secs	
	window.setTimeout(function() {
 	//jQuery("li#welcome.sub").css('background', 'transparent url(images/p1.jpg) no-repeat scroll 100% 100%');
		$('#intro').flash(
    				{ src: 'giggle-home.swf',
          			width: 365,
          			height: 280 },
        			{ version: 8 }
    			);
	}, 1500);
	
	
			            	
                $.easing.elasout = function(x, t, b, c, d){
                    var s = 0.00158;
                    var p = 0;
                    var a = c;
                    if (t == 0) 
                        return b;
                    if ((t /= d) == 1) 
                        return b + c;
                    if (!p) 
                        p = d * .3;
                    if (a < Math.abs(c)) {
                        a = c;
                        var s = p / 4;
                    }
                    else 
                        var s = p / (2 * Math.PI) * Math.asin(c / a);
                    return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
                };
                
                var match = /#/.test(location.href);
                //alert(match);
                
                var target = $('#content').get(0);//the scrolled div
                target.scrollLeft = target.scrollTop = 0;
                
                if (match) {
                    //scroll initially if there's a hash (#something) in the url 
                    $.localScroll.hash({
                        target: target, //could be a selector or a jQuery object too.
                        axis: 'xy',//the default is 'y'
                        queue: true,
                        duration: 1,//11000,
                        easing: 'elasout'
                    });
                }
                else {
                    //alert(match);
                    $("#content").animate({
                        scrollLeft: '1024'
                    }, {
                        "duration": "slow",
                        "easing": "elasout"
                    });
                    
                }
                
                
                var $last = $([]);//save the last link
                $.localScroll({
                    target: target, //could be a selector or a jQuery object too.
                    axis: 'xy', //the default is 'y'
                    queue: true,
                    duration: 3000,//11000,
                    easing: 'elasout',
                    hash: true,
                    onBefore: function(e, anchor, $target){//'this' is the clicked link
                        $last.removeClass('scrolling');
                        $last = $(this).addClass('scrolling');
                        if (this.blur) 
                            this.blur();//remove the awful outline
                    },
                    onAfter: function(anchor){
                        $last.removeClass('scrolling');
                    }
                });
                
                
            });