﻿// JavaScript Document

// Header Media accordion begin

haccordion.setup({
	accordionid: 'hc1', //main accordion div id
	paneldimensions: {peekw:'37px', fullw:'497px', h:'244px'},
	selectedli: [0, true], //[selectedli_index, persiststate_bool]
	collapsecurrent: false //<- No comma following very last setting!
});

// end


// Document on ready FUNCTIONS:
////////////////////////////////////////////////////////////////////////////

$(document).ready(
				function() {
					
// Header "Количка(0)" hover functions:

					$('#order_reg_left').mouseover(
							function() {
								$(this).css({
											'color' : '#52a813',
											'backgroundImage' : 
											$(this)
											.css('backgroundImage')
											.replace('normal', 'hover')
								});
					});
					
					$('#order_reg_left').mouseout(
							function() {
								$(this).css({
											'color' : '#878787',
											'backgroundImage' : 
											$(this)
											.css('backgroundImage')
											.replace('hover', 'normal')
											});
											
										
					});
				
// end
					
//Facebook Ad 
/*	
if (!$.cookie('shownImage')) {
            InitializePOPUPImage();
}
if (!$.cookie('androidCount')) {
	$.cookie('androidCount',1);
	ShowTOPImage();	
} else {
	if ($.cookie('androidCount') < 4) {
		$.cookie('androidCount',parseInt($.cookie('androidCount')) + 1);
		ShowTOPImage();	
	}
}
*/

// Products "Разгледайте още" vertical slider setup:

					var conveyor = $(".content-conveyor", $("#sliderContent")), item = $(
							".product_div", $("#sliderContent"));

					// set length of conveyor
					conveyor.css("width", (item.length * parseInt(item
							.css("width")))
							+ (item.length * 3));

					// config
					var sliderOpts = {
						max : ((item.length * parseInt(item.css("width")))
								+ (item.length * 3) - 3)
								- parseInt($(".viewer", $("#sliderContent"))
										.css("width")),
						slide : function(e, ui) {
							conveyor.css("left", "-" + ui.value + "px");
						}
					};

					// create slider
					$("#slider_scroller").slider(sliderOpts);
					$("#slider").easySlider( {
						auto : true,
						continuous : true,
						numeric : true
					});
					
// end

// Check if Media header is hidden/shown

				if (isHidden()) {
						$('#absolute_left').hide();
						$('#absolute_right').hide();
						$('#media_header_div').hide();
						$('#toggle_media_link')
								.find('img')
								.attr('src',
										  $('#toggle_media_link')
												.find('img')
												.attr('src')
												.replace('hide', 'show'));
						$('#short_media').show();
						$('#topbehind').css({
							'backgroundPosition' : '0px -250px'
						});
						$('#header_bottom_topright').css({
							'height' : '35px'
						});
				}
				
// end

// Products "Разгледайте още" button toggle


					$('#products_scrolling_toggle').click(
									function() {
										if ($('#slider_scroller').is(':visible')) {
											setCookie('scroller', 'hidden');
											$('#slider_scroller').fadeOut('slow');
											$('.viewer').fadeOut('slow',
															function() {
																$('#products_scrolling_toggle')
																	  .find('img')
																	  .attr('src',
																				$('#products_scrolling_toggle')
																						.find('img')
																						.attr('src')
																						.replace('close','show'))
											});
										} else {
											setCookie('scroller', 'visible');
											$('#slider_scroller')
													.fadeIn('slow');
											$('.viewer').fadeIn('slow',
															function() {
																$('#products_scrolling_toggle')
																	  .find('img')
																	  .attr('src',
																				$('#products_scrolling_toggle')
																						.find('img')
																						.attr('src')
																						.replace('show','close'))
											});
										}
										;
										return false;
									});

// end


// Check "Разгледай още" products hidden/shown

					if (getScroller()) {
						if (getScroller() == 'hidden') {
							$('#slider_scroller').hide();
							$('.viewer').hide();
							$('#products_scrolling_toggle').find('img')
														   .attr('src',
																 $('#products_scrolling_toggle').find('img')
																								.attr('src')
																								.replace('close','show'));
						}
					}
					
// end



// Comments hide/show additional

					$('#show_comments_text').click(
									function() {
										if (!$('#additional_comments').is(':visible')) {
											$('#additional_comments').slideDown('slow',
															function() {
																$('#show_comments_text')
																		 .html('Скрии');
																$('#arrow_show')
																		 .css({'marginLeft' : '145px'});
																$('#arrow_show')
																		.find('img')
																		.attr('src',getArrowUp());
															});
										} else {
											$('#additional_comments')
													.slideUp('slow',
															function() {
																$('#show_comments_text')
																		.html('Покажи всички');
																$('#arrow_show')
																		.css({'marginLeft' : '130px'});
																$('#arrow_show')
																		.find('img')
																		.attr('src',getArrowDown());
															});
										}
										return false;
					});
					
					$('#arrow_show').click(
									function() {
										if (!$('#additional_comments').is(':visible')) {
											$('#additional_comments').slideDown('slow',
															function() {
																$('#show_comments_text').html(
																				'Скрии коментари');
																$('#arrow_show').css({
																					'marginLeft' : '145px'
																				});
																$('#arrow_show').find('img')
																		        .attr('src',getArrowUp());
															});
										} else {
											$('#additional_comments').slideUp('slow',
															function() {
																$('#show_comments_text').html('Покажи всички');
																$('#arrow_show').css({
																					'marginLeft' : '130px'
																				});
																$('#arrow_show').find('img')
																		        .attr('src',getArrowDown());
															});
										}
										return false;
					});
					
// end


// Categories block hover:

					$('.categorie_div').mouseout(
							function() {
								$(this).find('div.categorie_div_top')
									  .css({
											'backgroundImage' : 
											$(this).find('div.categorie_div_top')
												   .css('backgroundImage')
												   .replace('hover', 'normal')
										})
							});

					$('.categorie_div').mouseover(
							function() {
								$(this).find('div.categorie_div_top')
									   .css({
											'backgroundImage' : 
											$(this).find('div.categorie_div_top')
												   .css('backgroundImage')
												   .replace('normal', 'hover')
										})
					});
					
// end


// Products popup block setup

					$('.topopup').click(
									function() {
										$('.topopup').show();
										$(this).hide();
										$('#popup_product_info').remove();
										$(this).parent()
											   .parent()
											   .prepend('<div id="popup_product_info"><div id="popup_content_div_prod"><div id="popup_content"><div id="popup_close_div"><img src="' + getPopupCloseprod() + '" width="15" height="15" id="close_popup_prod"/></div><div id="popup_block_information"><div id="popup_product_title"><strong></strong></div><div id="popup_product_pic_desc"><div id="popup_product_picture"><img src="" /></div><div id="popup_product_description"><span id="popup_product_price"></span><br /><br /><div id="popup_prod_desc"></div><a href="" id="popup_details_link"><img src="' + getPopupDetails() + '" width="90" height="23" /></a></div></div></div></div></div></div>');
										$('#popup_product_title strong').html(
												$(this).parent()
													   .parent()
													   .prev()
													   .find('a')
													   .html());
										$('#popup_product_price').html(
														$(this).parent()
															   .parent()
															   .parent()
															   .find('div.product_buy_left')
															   .html());
										$('#popup_prod_desc').html(
														$(this).parent()
															   .parent()
															   .parent()
															   .find('div.popup_full_product_description')
															   .html());
										$('#popup_product_picture img').attr('src',
														$(this).parent()
															   .parent()
															   .parent()
															   .find('div.popup_big_image img')
															   .attr('src'));
										$('#popup_details_link').attr('href',
														$(this).parent()
															   .parent()
															   .parent()
															   .find('div.product_buy div.product_buy_right a')
															   .attr('href'));
										$('#popup_content_div_prod').animate({
											width : 528,
											height : 300,
											opacity : 1,
											marginTop : 0
										}, 500, function() {
											$('#popup_content').fadeIn(500);
										});

					});
					
// end


// Enquiry form popup block setup

					$('.form1').click(
									function() {

										$('#popup_product_info').remove();
										$(this).parent()
											   .prepend(
														'<div id="popup_product_info"><div id="popup_content_div"><div id="popup_content"><div id="popup_close_div"><img src="' + getPopupClose() + '" width="7" height="7" id="close_popup"/></div>' + $('#prod_form_enq').html() + '</div></div></div>');
										$('#form1_productid').val(
												$(this).parent()
													   .parent()
													   .find('input')
													   .val());
										$('#popup_content_div').animate( {
											width : 528,
											height : 300,
											opacity : 1,
											marginTop : 0
										}, 500, function() {
											$('#popup_content').fadeIn(500);
										});

					});
					
// end

// Friend form popup block setup

					$('.form2').click(
									function() {
										productid = $(this).parent()
														   .parent()
														   .find('input')
														   .val();
										$('#popup_product_info').remove();
										$(this).parent()
											   .prepend(
														'<div id="popup_product_info"><div id="popup_content_div"><div id="popup_content"><div id="popup_close_div"><img src="' + getPopupClose() + '" width="7" height="7" id="close_popup"/></div>' + $('#prod_form_sfriend').html() + '</div></div></div>');
										$('#popup_content_div').animate( {
											width : 528,
											height : 300,
											opacity : 1,
											marginTop : 0
										}, 500, function() {
											$('#popup_content').fadeIn(500);
										});

					});
					
// end

// Enquiry form elements onclick change color to red

					$('#popup_content #popup_form_holder #contactname,#popup_content #popup_form_holder #email-address,#popup_content #popup_form_holder #enquiry')
							.live('click', 
								  function() {
									  $(this).css({'color' : '#000'})
							});
							
// end

// Enquiry form elements onclick reset value

					$('#popup_content #popup_form_holder #contactname')
							.live('click', 
									function() {
										if ($(this).val() == 'Пълно име' || $(this).val() == 'Въведете пълно име!') $(this).val('');
							});
					$('#popup_content #popup_form_holder #email-address')
							.live('click',
									function() {
										if ($(this).val() == 'Email адрес' || $(this).val() == 'Въведете валиден email адрес!') $(this).val('');
							});
					$('#popup_content #popup_form_holder #enquiry')
							.live('click',
									function() {
										if ($(this).val() == 'Запитване' || $(this).val() == 'Направете запитване!') $(this).val('');
							});
							
// end

// Friend form elements onclick change color to red

					$('#popup_content #popup_form2_holder #contactname,#popup_content #popup_form2_holder #email,#popup_content #popup_form2_holder #enquiry,#popup_content #popup_form2_holder #friendname,#popup_content #popup_form2_holder #friendemail')
							.live('click', 
								  function() {
									  $(this).css({'color' : '#000'})
							});
							
// end

// Friend form elements onclick reset value
							
					$('#popup_content #popup_form2_holder #contactname')
							.live('click',
									function() {
										if ($(this).val() == 'Вашето име' || $(this).val() == 'Въведете Вашето име!') $(this).val('');
							});
					$('#popup_content #popup_form2_holder #email')
							.live('click',
									function() {
										if ($(this).val() == 'Вашият Email' || $(this).val() == 'Вашият email адрес не е валиден!') $(this).val('');
							});
					$('#popup_content #popup_form2_holder #friendname')
							.live('click',
									function() {
										if ($(this).val() == 'Име на приятеля' || $(this).val() == 'Въведете име на приятеля!') $(this).val('');
							});
					$('#popup_content #popup_form2_holder #friendemail')
							.live('click',
									function() {
										if ($(this).val() == 'Email на приятеля' || $(this).val() == 'Email адресът на приятеля не е валиден!') $(this).val('');
							});
					$('#popup_content #popup_form2_holder #enquiry')
							.live('click',
									function() {
										if ($(this).val() == 'Съобщение' || $(this).val() == 'Напишете съобщение!') $(this).val('');
									});
							
// end

// Enquiry send button onpress

					$('#send_enquiry')
							.live('click',
									function() {
										valid = true;
										contactname = $('#popup_content #contactname');
										email = $('#popup_content #email-address');
										enquiry = $('#popup_content #enquiry');
										subject = $('#popup_content #subject');
										if (contactname.val() == ''
												|| contactname.val() == 'Пълно име'
												|| contactname.val() == 'Въведете пълно име!') {
											valid = false;
											contactname.val('Въведете пълно име!');
											contactname.css({'color' : '#f00'});
										}
										if (!email.val().match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i)) {
											valid = false;
											email.val('Въведете валиден email адрес!');
											email.css({'color' : '#f00'});
										}
										if (enquiry.val() == ''
												|| enquiry.val() == 'Запитване'
												|| enquiry.val() == 'Направете запитване!') {
											valid = false;
											enquiry.val('Направете запитване!');
											enquiry.css({'color' : '#f00'});
										}
										if (valid) {
											datastr = 'contactname='
													+ contactname.val()
													+ '&email=' + email.val()
													+ '&subject='
													+ subject.val()
													+ '&enquiry='
													+ enquiry.val();
											sendEnquiry(datastr);
										}
										return false;
					});
							
// end

// Friend send button onpress

					$('#send_friend')
							.live('click',
									function() {
										valid = true;
										contactname = $('#popup_content #contactname');
										email = $('#popup_content #email');
										friendname = $('#popup_content #friendname');
										friendemail = $('#popup_content #friendemail');
										enquiry = $('#popup_content #enquiry');
										if (contactname.val() == ''
												|| contactname.val() == 'Вашето име'
												|| contactname.val() == 'Въведете Вашето име!') {
											valid = false;
											contactname.val('Въведете Вашето име!');
											contactname.css({'color' : '#f00'});
										}
										if (!email.val().match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i)) {
											email.val('Вашият email адрес не е валиден!');
											email.css({'color' : '#f00'});
										}
										if (friendname.val() == ''
												|| friendname.val() == 'Име на приятеля'
												|| friendname.val() == 'Въведете име на приятеля!') {
											valid = false;
											friendname.val('Въведете име на приятеля!');
											friendname.css({'color' : '#f00'});
										}
										if (!friendemail.val().match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i)) {
											valid = false;
											friendemail.val('Email адресът на приятеля не е валиден!');
											friendemail.css({'color' : '#f00'});
										}
										if (enquiry.val() == ''
												|| enquiry.val() == 'Съобщение'
												|| enquiry.val() == 'Напишете съобщение!') {
											valid = false;
											enquiry.val('Напишете съобщение!');
											enquiry.css({'color' : '#f00'});
										}
										if (valid) {
											datastr = 'contactname='
													+ contactname.val()
													+ '&email=' + email.val()
													+ '&friendname='
													+ friendname.val()
													+ '&friendemail='
													+ friendemail.val()
													+ '&enquiry='
													+ enquiry.val();
											sendFriend(datastr);
										}
										return false;
					});
							
// end

// Close button on popup forms onclick

					$('#close_popup').live('click', function() {
						$('#popup_content').hide();
						$('#popup_content_div').animate( {
							width : 0,
							height : 0,
							opacity : 0,
							marginTop : 150
						}, 500, function() {
							$('.topopup').show();
							$('#popup_product_info').remove();
						});

					});
					
// end

// Close button on popup products onclick

					$('#close_popup_prod').live('click', function() {
						$('#popup_content').hide();
						$('#popup_content_div_prod').animate( {
							width : 0,
							height : 0,
							opacity : 0,
							marginTop : 150
						}, 500, function() {
							$('.topopup').show();
							$('#sliderContent .topopup').hide();
							$('#popup_product_info').remove();
						});

					});
					
// end


// On change tab close the current popup

					$('#tabs_div').click(function() {
						$('.topopup').show();
						$('#popup_product_info').remove();
					});
					
// end

// Relate tabs to divs content products and make first active

					$('.tab').eq(0).click(function() {
						$('.tabs_products').hide();
						$('.tabs_products').eq(0).show();
					});
					$('.tab').eq(1).click(function() {
						$('.tabs_products').hide();
						$('.tabs_products').eq(1).show();
					});
					$('.tab').eq(2).click(function() {
						$('.tabs_products').hide();
						$('.tabs_products').eq(2).show();
					});

					$('.tab').eq(0).attr('id', 'activetab');
					$('.tabs_products').eq(0).show();
					
					$('.tab').click(function() {
						$('#activetab').attr('id', '');
						$(this).attr('id', 'activetab');
					});
					
// end

// Show/hide Media header and set Cookies

					$('#toggle_media_link').click(
									function() {
										if ($('#media_header_div').is(':visible')) {
											var liindextocookie = -1;
											$('li.accordli').each(
															function() {
																var $target = $(this);
																if ($target.width() == $target.data('hpaneloffsetw'))
																	liindextocookie = $target.data('pos')
															});
											// setCookie($('.haccordion').eq(0).attr('id'),liindextocookie);
											setCookie($('.haccordion').eq(0).attr('id'),0);
											$(this).hide();
											$('#media_header_div').fadeOut(500,
													function() {
														$('#topbehind').css({
																			'backgroundPosition' : '0px -250px'
														});
														$('#absolute_left').hide();
														$('#absolute_right').hide();
														$('#header_bottom_topright').css({
																			'height' : '35px'
														});
														$('#short_media').fadeIn(1500,
																		function() {
																			$('#toggle_media_link').find('img')
																   							       .attr('src',
																									 $('#toggle_media_link').find('img')
																															.attr('src')
																															.replace('hide','show'));
																			$('#toggle_media_link').show();
														});
											});

											setCookie('media', 'hidden');
										} else {
											$('#short_media').fadeOut('slow',
															function() {
																$('#toggle_media_link').hide();
																$('#header_bottom_topright').css({
																					'height' : '263px'
																});
																$('#topbehind').css({
																					'backgroundPosition' : '0px -30px'
																});
																$('#absolute_left').show();
																$('#absolute_right').show();
																$('#media_header_div').fadeIn('slow',
																		function() {
																			$('#toggle_media_link').find('img')
																					               .attr('src',
																									 $('#toggle_media_link').find('img')
																								                            .attr('src')
																								                            .replace('show','hide'));
																			setTimeout("$('#toggle_media_link').show();",600);
																});
											});

											setCookie('media', 'visible');
										}
										return false;
					});
					
// end

// Add comment toggle

					$('#add_comment_link').click(
									function() {
										if (!$('#add_comment_form').is(':visible')) {
											$('#add_comment_form').slideDown('slow',
															function() {
																$('#add_comment_link').html('Скрии');
															});
										} else {
											$('#add_comment_form').slideUp('slow',
															function() {
																$('#add_comment_link').html('Добави коментар');
															});

										}
										return false;
					});
					
// end

					
// Header Media accordion section button setup
					

					$(".accordion_toggle").click(
									function() {
										$('div.accordion_arrow').css( {
											'background' : 'none'
										});
										$(this).next()
												.find('div.accordion_arrow')
												.css({
															'backgroundImage' : 'url(' + getArrow() + ')',
															'backgroundRepeat' : 'no-repeat',
															'backgroundPosition' : '0 10px'
												});
										$(".accordion_toggle").css({
											'cursor' : 'pointer'
										});
										$(this).css({
											'cursor' : 'default'
										});
										if ($(this).attr('id') != 'activeblock') {
											$('#activeblock').find('img')
											                 .attr('src',
																   $('#activeblock').find('img')
																   .attr('src')
															       .replace('active','normal'));
											$(this).find('img')
												   .attr('src',
															$(this).find('img')
																   .attr('src')
																   .replace('normal','active'));
										}
										$('#activeblock').removeAttr('id');
										$(this).attr('id', 'activeblock');
					});
					
// end

// Additional pictures of the product hover

					$('.additional_pic').mouseover(function() {
						$('#main_image').removeAttr('width');
						$('#main_image').removeAttr('height');
						$('#main_image').attr('src', 
											  $(this).next()
											         .val());
						$(this).find('img.enlarge')
						       .show();
					});

					$('.additional_pic').mouseout(
							function() {
								$('#main_image').attr('src',
										$('#hiddenmainimg').val());
								$(this).find('img.enlarge')
								       .hide();
					});
					
// end


// Radio buttons (order section) setup 	

                    $('.curier').click(
									function() {
										$('#shipping').val($(this).attr('id'));
										$('.curier').css({
															'backgroundImage' : 'url(includes/templates/eftini-2010/images/curier_notchosen.jpg)'
										});
										$(this).css({
															'backgroundImage' : 'url(includes/templates/eftini-2010/images/curier_chosen.jpg)'
										});
										curier = $(this).attr('id');
					});

					$('.curierimg').click(
									function() {
										$('#shipping').val($(this).attr('id'));
										for (i = 0; i < $('img.pay_img').length; i++) {
											$('img.pay_img').eq(i).attr('src',
													$('img.pay_img').eq(i)
															.attr('src')
															.replace('chosen','normal'));
										}
										$('.curierimg').css({
															'backgroundImage' : 'url(includes/templates/eftini-2010/images/curier_notchosen.jpg)'
										});
										$(this).css({
															'backgroundImage' : 'url(includes/templates/eftini-2010/images/curier_chosen.jpg)'
										});
										$(this).find('img').attr('src',
												$(this).find('img')
												       .attr('src')
													   .replace('normal','chosen'));
										curier = $(this).attr('id');
					});
					
// end

// Order change address form show button

					$('#order_change_address').click(function() {
						$('#order_change_address_form').slideDown('normal');
						$(this).css({
							'cursor' : 'default !important'
						})
					});
					
// end

// Input remember current value of radio buttons

					if ($('#shipping').val() != '') {
						value = $('#shipping').val();
						$('#' + value).css({
											'backgroundImage' : 'url(includes/templates/eftini-2010/images/curier_chosen.jpg)'
										});
					}
					
// end
					
});

// document ready functions end
///////////////////////////////

// functions which run when u call them

function getArrow() {
	return arrow;
}

function getArrowUp() {
	return arrowup;
}

function getArrowDown() {
	return arrowdown;
}

function getPopupClose() {
	return popupclose;
}

function getPopupCloseprod() {
	return popupcloseprod;
}

function getPopupDetails() {
	return popupdetails;
}

function isHidden() {
	return hidden;
}

// AJAX functions

function sendEnquiry(datastr) {
	$
			.ajax( {
				type : "POST",
				url : "send.php",
				data : datastr,
				cache : false,
				success : function(html) {
					$('#popup_form_holder')
							.fadeOut(
									1500,
									function() {

										$('#popup_content').append('<div id="enquiry_message"><b>Вашето запитване беше изпратено!</b></div>');
										setTimeout(
												function() {
													$('#popup_content').hide();
													$('#popup_content_div').animate({
																		width : 0,
																		height : 0,
																		opacity : 0,
																		marginTop : 150
																	    },
																	    500,
																	    function() {
																		  $('#popup_product_info').remove();
																	    });

												}, 5000);

									});

				}
			});
}

function sendFriend(datastr) {
	$
			.ajax( {
				type : "POST",
				url : "friend.php?action=send",
				data : datastr,
				cache : false,
				success : function(html) {
					$('#popup_form2_holder')
							.fadeOut(
									1500,
									function() {

										$('#popup_content').append('<div id="enquiry_message"><b>Вашето съобщение беше изпратено!</b></div>');
										setTimeout(
												function() {
													$('#popup_content').hide();
													$('#popup_content_div').animate({
																		width : 0,
																		height : 0,
																		opacity : 0,
																		marginTop : 150
																	    },
																	    500,
																	    function() {
																		  $('#popup_product_info').remove();
																	    });

												}, 5000);

									});

				}
			});
}

// end

// Cookie functions SET/GET

function getMedia() {
	var re = new RegExp("media=[^;]+", "i") // construct RE to search for target
											// name/value pair
	if (document.cookie.match(re)) // if cookie found
		return document.cookie.match(re)[0].split("=")[1] // return its value
	return null
}

function getScroller() {
	var re = new RegExp("scroller=[^;]+", "i") // construct RE to search for
												// target name/value pair
	if (document.cookie.match(re)) // if cookie found
		return document.cookie.match(re)[0].split("=")[1] // return its value
	return null
}

function setCookie(name, value) {
	document.cookie = name + "=" + value + "; path=/"
}

if (!getMedia() || getMedia() == 'visible') {
	var hidden = false;
} else {
	var hidden = true;
}

function InitializePOPUPImage() {
$.cookie('shownImage',true, { expires: 15, path: '/', domain: 'eftini.com' });
$('body').append('<div id="make_opacity"></div><div id="absolute_from_top"><div id="relative_centered"><div id="facebook_like_butoon"><fb:fan profile_id="143058839066537" stream="0" connections="6" logobar="0" width="200" height="400" css="http://eftini.com/includes/templates/eftini-2010/css/no_stylefb.css?1"></fb:fan></div><a href="#" id="relative_centered_a"><img src="http://eftini.com/images/banners/landing-page_close_btn.gif" width="24" height="24" border="0" /></a><img src="http://eftini.com/images/banners/landing-page.jpg" width="520" height="419" /></div></div>');
$('#make_opacity').height($(document).height());
$('#relative_centered_a').click(function(){
$('#absolute_from_top').remove();
$('#make_opacity').remove();
return false;
});

$('#relative_centered').click(function(){
return false;	
});

$('#make_opacity, #absolute_from_top').click(function(){
$('#absolute_from_top').remove();
$('#make_opacity').remove();
});
}

function ShowTOPImage() {
		$('#welcome').append('<div id="android_image"><img src="http://eftini.com/images/banners/igra-baner_android_x.gif" id="android_close" /><a href="http://www.facebook.com/pages/%D0%9E%D0%BD%D0%BB%D0%B0%D0%B9%D0%BD-%D0%A5%D0%B8%D0%BF%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-eFtinicom/143058839066537" title="Онлайн магазин - Спечели Таблет Android!" target="_blank"><img src="http://eftini.com/images/banners/igra-baner_android.jpg" /></a></div>');
		$('#android_image').slideDown(1000);
		$('#android_close').click(function(){
			$.cookie('androidCount',4);
			$('#android_image').slideUp('normal',function(){ $(this).remove(); });
		});
}

// end

// end
