$(document).ready(function () {

//Functions filling in content
	var d = new Date();
	var yr = d.getFullYear();
	$('#bottomLine').append('people we know:<br/>');
	$('#bottomLine').append('<a href="http://www.palaceofthegoldenhorses.com.my/" alt="visit main site" target="_blank">palace of the golden horses</a>');
	$('#bottomLine').append('<a href="http://cheektocheekentertainment.blogspot.com/" alt="visit main site" target="_blank">cheek to cheek entertainment</a>');
	$('#bottomLine').append('<a href="http://berjayahotel.com/berjayahills/index.asp" alt="visit main site" target="_blank">berjaya hills</a>');
	$('#bottomLine').append('<a href="http://www.idojewellery.com/" alt="visit main site" target="_blank">ido jewellery</a>');
	$('#bottomLine').append('<a href="http://faifong.wordpress.com/" alt="visit main site" target="_blank">fai fong gifts &amp; bakery</a>');
	$('#bottomLine').append('<a href="http://www.rwgenting.com/" alt="visit main site" target="_blank">genting city of entertainment</a>');
	$('#bottomLine').append('<a href="http://minealesi.com/" alt="visit main site" target="_blank">mine allessi</a>');
	$('#bottomLine').append('<a href="http://www.imedeen.com.my/default.aspx" alt="visit main site" target="_blank">imedeen</a>');
	$('#bottomLine').append('<a href="http://www.figurelinebeauty.com/t1/index.php" alt="visit main site" target="_blank">figureline</a>');
	$('#bottomLine').append('<a href="http://www.favorsessence.com/" alt="visit main site" target="_blank">favor essence</a>');
	$('#bottomLine').append('<a href="http://www.ttrb.com.my/content.asp?root=100013&id=100014&parent=100002&bdrcolor=%23990000&loc=100014" alt="visit main site" target="_blank">tai thong group of restaurant</a>');
	$('#bottomLine').append('<br/>&copy; Copyright '+yr+' by Eminent Style Sdn Bhd. All Rights Reserved.');
	$('#optionalEscapeLink').append('<br/>&copy; Copyright '+yr+' by Eminent Style Sdn Bhd. All Rights Reserved.');
	
 	$('#leftColumn').html('<h2>Recent Updates</h2><ul id="news"></ul>');
	$('#leftColumn ul').append('<li><p class="date"><span class="day">01</span><span class="month">Job Vacancy</span></p><p class="description"><b>Vacancy in SS2, Petaling Jaya</b><br />Sales Consultant (experienced)<br />Ass. Sales Consultant (with or without experienced)<br />Ass.Photographer<br />Designer<br /><br /><b>Vacancy in Sibu, Sarawak</b><br />Sales Consultant (experienced)<br />Make Up Artist (experienced)</p></li>');
	$('#leftColumn ul').append('<li><p class="date"><span class="day">02</span><span class="month">Latest Destinations</span></p><p class="description"><img src="images/page-photos/eminent-oversea-ads.jpg" width="200" height="122"/><br/>Eminent France Taipei is proud to present to you our Paris Pre-Wedding Photography package. Fly with us to your favourite destinations. Why wait, send in enquiries now at admin@eminentfrancetaipei.com.my.</p></li>');
	
	$('#mainLinks').html('<h3>Main Links</h3>');
	$('#mainLinks').append('<a href="index.htm" title="index">index</a><br/>');
	$('#mainLinks').append('<a href="eminent-home.htm" title="home">home</a><br/>');
	$('#mainLinks').append('<a href="eminent-introduction.htm" title="introduction">introduction</a><br/>');
	$('#mainLinks').append('<a href="eminent-services.htm" title="services">services</a><br/>');
	$('#mainLinks').append('<a href="eminent-contact-us.htm" title="contact us">contact us</a><br/>');
	$('#portfolio').html('<h3>Portfolio</h3>');
	$('#portfolio').append('<a href="eminent-gallery-pre-wedding-photography.htm">Pre-Wedding Photography</a><br/>');
	$('#portfolio').append('<a href="eminent-gallery-pre-wedding-videography.htm">Pre-Wedding Videography</a><br/>');	
	$('#portfolio').append('<a href="eminent-gallery-wedding-day-photography.htm">Wedding Day Photography</a><br/>');	
	$('#portfolio').append('<a href="eminent-gallery-couple-photography.htm">Couple Photography</a><br/>');	

	$('#portfolio').append('<a href="eminent-gallery-pre-wedding-customer.htm">Our Customers</a><br/>');
	
	$('#otherPages').html('<h3>Other Pages</h3>');
	$('#otherPages').append('<a href="eminent-product.htm">Album Making</a><br/>');
	$('#otherPages').append('<a href="eminent-gallery-image-design.htm">Image Designs</a><br/>');
	$('#otherPages').append('<a href="eminent-gallery-car-decoration.htm">Car Decoration</a><br/>');
	$('#otherPages').append('<a href="eminent-gallery-flower.htm">Flower Bouquet</a><br/>');
	$('#otherPages').append('<a href="eminent-gallery-gowns.htm">Gowns</a><br/>');
	$('#otherPages').append('<a href="eminent-photography-destination.htm">Photography Destinations</a><br/>');
	
	$('#socialMedia').html('<h3>Social Media</h3><div id="social-media-icons"><ul></ul></div><div id="add-to-any"></div><div id="likeBox"></div>');
	$('#socialMedia ul').append('<li><a href="http://www.facebook.com/pages/Eminent-France-Taipei/337384617615?v=wall" target="_blank" class="facebook icons standardElement">Facebook</a></li>');
	$('#socialMedia ul').append('<li><a href="http://vimeo.com/eminentfrancetaipei" target="_blank" class="vimeo icons standardElement">Vimeo</a></li>');
	$('#socialMedia ul').append('<li><a href="http://eminentfrancetaipei.blogspot.com/" target="_blank" class="blogger icons standardElement">Blogger</a></li>');
	$('#socialMedia ul').append('<li><a href="http://www.youtube.com/user/EminentFranceTaipei" target="_blank" class="youtube icons standardElement">Youtube</a></li>');
	$('#socialMedia ul').append('<li><a href="http://www.flickr.com/photos/eminentfrancetaipei/" target="_blank" class="flickr icons standardElement">Flickr</a></li>');
	
	$('#socialMedia #add-to-any').append('<a class="a2a_dd" href="http://www.addtoany.com/share_save?linkurl=www.eminentfrancetaipei.com.my&amp;linkname="><img src="http://static.addtoany.com/buttons/share_save_106_16.gif" width="106" height="16" border="0" alt="Share"/></a>');
	$('#socialMedia #add-to-any').append('<script type="text/javascript">var a2a_config = a2a_config || {};a2a_config.linkurl = "www.eminentfrancetaipei.com.my";</script><script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>');
	$('#socialMedia #likeBox').append('<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FEminent-France-Taipei%2F337384617615%3Fv%3Dwall&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:190px; height:80px;" allowTransparency="true"></iframe>');
	
	$('#tips').html('<img src="images/page-photos/close.gif" width="8px" height="8px" alt="" id="close"/><b>Tips:</b> click on any thumbs to enlarge pictures, you may use left / right keys to navigate picture slide show or simply clicking next / previous buttons.');

	
				
	$('#blog-bottom').html('powered by eminentfrancetaipei.com.my');
	
	$('body .eminentPage').ready(function(){
		$('#logo').html('<a href="eminent-home.htm" title="home" ><h1 class="eminentLogo">Eminent France Taipei Bridal House</h1></a>');
		$('#menu').html('<ul><li><a href="index.htm" title="index">Index</a></li><li><a href="eminent-introduction.htm" title="introduction">Introduction</a></li><li><a href="eminent-gallery.htm" title="gallery">Gallery</a></li><li><a href="eminent-services.htm" title="services">Services</a></li><li><a href="eminent-contact-us.htm" title="contact">Contact</a></li></ul>');
	});
	
	
												
	
 	Cufon.replace('h2'); // Works without a selector engine
	Cufon.replace('h3'); // Works without a selector engine
	Cufon.replace('#sub1'); // Requires a selector engine for IE 6-7, see above
	
	$(document).pngFix();
    $('#menu ul li a[title="index"]').html('<img src="images/eft-general/eft-menu-element-index.png" alt="index" />');
	$('#menu ul li a[title="introduction"]').html('<img src="images/eft-general/eft-menu-element-introduction.png" alt="introduction" />');
	$('#menu ul li a[title="gallery"]').html('<img src="images/eft-general/eft-menu-element-gallery.png" alt="gallery" />');
	$('#menu ul li a[title="services"]').html('<img src="images/eft-general/eft-menu-element-services.png" alt="services" />');
	$('#menu ul li a[title="contact"]').html('<img src="images/eft-general/eft-menu-element-contact.png" alt="contact" />');

/** Hover Effects **/

    $('#menu li a').hover(function() {
	    	$(this).fadeTo(350, 0.5);
	    }, function() {
	    	$(this).fadeTo(700, 1);
	    }
	);
	
	$('#container dl dt').after('<dd class="background"></dd>');
	$('#container dl').hover(function() {
			$(this).find('dt img').fadeTo(1000, 0.85);
		}, function() {
			$(this).find('dt img').fadeTo(1000, 1);
		}
	);
    $('#container dl').hover(function() {
    		$(this).find('dd').fadeIn(1000);
    	}, function() {
    		$(this).find('dd').fadeOut(1000);
    	}
    );
	$('#photo').hover(function() {
			$(this).find('p, h1').fadeIn(400);
		}, function() {
			$(this).find('p, h1').fadeOut(800);
		}
	);
	
/** Sliding Functions **/
	$.easing.elasout = function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
	};
	//$('#container').scrollTo(0,1500);
	$.scrollTo.defaults.axis = 'x';
	$.scrollTo(0, {
		duration: 0,
		axis: 'xy'
	});
	
	$('a.scroll').click(function () {
		var $Target = this.hash;
		var $screenReso = screen.width;
		//var $position = (($screenReso*0.1)+400)-((($screenReso*0.1)+400)*2);
		var $position = 0;
		$.scrollTo($Target, 1500, {
			offset: $position,
			onAfter: function () {
				$('#cloud1').animate({
					opacity: 0
				},
				300);
			}
		});
		return false;
	});

	$('a.scrolly').click(function () {
		var $Target = this.hash;
		var $position = -130;
		$.scrollTo($Target, 1500, {
			axis: 'y',
			offset: $position
		});
		return false;
	});

/**
 * works with gallery
 */
	
	$('.returnTop').click(function () {
		//var $Target = this.hash;
		var $position = -130;
		$.scrollTo('#top', 1500, {
			axis: 'y',
			offset: $position
		});
		return false;
	});
	
	$('#close').click(function() {
		$('#tips').slideUp('slow');
	});
	
	$('.hidden').hide();
   	$('.hideshowlink').toggle(function() {
		$(this).prev().slideDown('slow');
		$(this).text('hide');
	}, function() {
		$(this).prev().slideUp('slow');
		$(this).text('more');
	});

	$('#wrap-gallery a').lightBox();

});

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 9/11/2008
 * @author Ariel Flesler
 * @version 1.4
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
/**
 * --------------------------------------------------------------------
 * jQuery-Plugin "pngFix"
 * Version: 1.1, 11.09.2007
 * by Andreas Eberhard, andreas.eberhard@gmail.com
 *                      http://jquery.andreaseberhard.de/
 *
 * Copyright (c) 2007 Andreas Eberhard
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(s($){3.1s.1k=s(j){j=3.1a({12:\'1m.1j\'},j);8 k=(n.P=="r 10 Z"&&U(n.v)==4&&n.v.E("14 5.5")!=-1);8 l=(n.P=="r 10 Z"&&U(n.v)==4&&n.v.E("14 6.0")!=-1);o(3.17.16&&(k||l)){3(2).L("1r[@m$=.M]").z(s(){3(2).7(\'q\',3(2).q());3(2).7(\'p\',3(2).p());8 a=\'\';8 b=\'\';8 c=(3(2).7(\'K\'))?\'K="\'+3(2).7(\'K\')+\'" \':\'\';8 d=(3(2).7(\'A\'))?\'A="\'+3(2).7(\'A\')+\'" \':\'\';8 e=(3(2).7(\'C\'))?\'C="\'+3(2).7(\'C\')+\'" \':\'\';8 f=(3(2).7(\'B\'))?\'B="\'+3(2).7(\'B\')+\'" \':\'\';8 g=(3(2).7(\'R\'))?\'1d:\'+3(2).7(\'R\')+\';\':\'\';8 h=(3(2).1c().7(\'1b\'))?\'19:18;\':\'\';o(2.9.y){a+=\'y:\'+2.9.y+\';\';2.9.y=\'\'}o(2.9.t){a+=\'t:\'+2.9.t+\';\';2.9.t=\'\'}o(2.9.w){a+=\'w:\'+2.9.w+\';\';2.9.w=\'\'}8 i=(2.9.15);b+=\'<x \'+c+d+e+f;b+=\'9="13:11;1q-1p:1o-1n;O:W-V;N:1l;\'+g+h;b+=\'q:\'+3(2).q()+\'u;\'+\'p:\'+3(2).p()+\'u;\';b+=\'J:I:H.r.G\'+\'(m=\\\'\'+3(2).7(\'m\')+\'\\\', D=\\\'F\\\');\';b+=i+\'"></x>\';o(a!=\'\'){b=\'<x 9="13:11;O:W-V;\'+a+h+\'q:\'+3(2).q()+\'u;\'+\'p:\'+3(2).p()+\'u;\'+\'">\'+b+\'</x>\'}3(2).1i();3(2).1h(b)});3(2).L("*").z(s(){8 a=3(2).T(\'N-S\');o(a.E(".M")!=-1){8 b=a.X(\'1g("\')[1].X(\'")\')[0];3(2).T(\'N-S\',\'1f\');3(2).Q(0).Y.J="I:H.r.G(m=\'"+b+"\',D=\'F\')"}});3(2).L("1e[@m$=.M]").z(s(){8 a=3(2).7(\'m\');3(2).Q(0).Y.J=\'I:H.r.G\'+\'(m=\\\'\'+a+\'\\\', D=\\\'F\\\');\';3(2).7(\'m\',j.12)})}1t 3}})(3);',62,92,'||this|jQuery||||attr|var|style|||||||||||||src|navigator|if|height|width|Microsoft|function|padding|px|appVersion|margin|span|border|each|class|alt|title|sizingMethod|indexOf|scale|AlphaImageLoader|DXImageTransform|progid|filter|id|find|png|background|display|appName|get|align|image|css|parseInt|block|inline|split|runtimeStyle|Explorer|Internet|relative|blankgif|position|MSIE|cssText|msie|browser|hand|cursor|extend|href|parent|float|input|none|url|after|hide|gif|pngFix|transparent|blank|line|pre|space|white|img|fn|return'.split('|'),0,{}));
