Subversion Repositories SmartDukaan

Rev

Rev 8138 | Rev 8177 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
7063 kshitij.so 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px; color: #006699';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
7680 rajveer 74
 
7809 rajveer 75
	$('#cod_know_more,.cod_know_more').click(function(){
7680 rajveer 76
		$.colorbox({
7872 rajveer 77
    		width: "400px",
78
    		height: "200px",
7680 rajveer 79
    		inline: true,
7898 amit.gupta 80
    		href: "<ul style='list-style:inside; margin-left: 25px; margin-right:12px; font-size:15px; line-height: 22px;'>"
7872 rajveer 81
    			+ "Expected Delivery Date for "
7873 rajveer 82
    			+"<li list-style:inside>Prepaid orders is " + $("#shipping_time .red").html() + "</li>"+
83
    			"<li list-style:inside>" + $("#shipping_time .cod").html() + "</li>"+
7809 rajveer 84
        "</ul>",
7680 rajveer 85
        onComplete: function(){
7809 rajveer 86
		trackEventWithGA('Widget', 'COD Know More is clicked', '');
7680 rajveer 87
			}
88
    	});
89
	});
90
 
7846 rajveer 91
 
4237 varun.gupt 92
	$('#shoppingExpInfo').click(function(){
93
		$.colorbox({
4284 varun.gupt 94
    		width: "550px",
95
    		height: "320px",
4237 varun.gupt 96
    		inline: true,
97
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 98
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
99
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
100
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 101
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 102
			onComplete: function(){
6261 amit.gupta 103
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 104
			}
4237 varun.gupt 105
    	});
106
	});
6245 kshitij.so 107
 
6552 kshitij.so 108
 
6970 kshitij.so 109
	$('.insuranceInfo').click(function(){
110
		$.colorbox({
111
    		width: "520px",
112
    		height: "280px",
113
    		inline: true,
114
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
115
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
116
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
117
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
118
    		"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
7062 kshitij.so 119
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;color:#006699';>Detailed Terms and Conditions</a>"+
6970 kshitij.so 120
    		"</ul>",
121
			onComplete: function(){
122
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
123
			}
124
    	});
125
	});
126
 
127
 
6959 kshitij.so 128
	$('.emiInfo').click(function(){
6453 kshitij.so 129
		$.colorbox({
6967 kshitij.so 130
    		width: "590px",
131
    		height: "480px",
6453 kshitij.so 132
    		inline: true,
7051 kshitij.so 133
    		href: "<h3 style='font-size: 15px; text-align: center; font-weight: bold; margin-left: 15px; margin-bottom: 10px; margin-top: 7px;'>Completely Free EMI For 3 Months</h3>" +
6967 kshitij.so 134
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 135
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9, 12 and 18 months.Completely free for 3 months<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 136
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
137
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
138
    		"<thead>"+
139
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
140
            "</thead>"+
141
            "<tbody>"+
142
            "<tr>"+
143
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
144
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
145
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
7011 kshitij.so 146
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
147
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6967 kshitij.so 148
            "</tr>"+
149
            "<tr>"+
150
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
151
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
152
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
7011 kshitij.so 153
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
154
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>15.36%</td>"+
6967 kshitij.so 155
            "</tr>"+
156
            "</tbody>"+
157
            "</table>"+
158
            "<br>"+
159
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
160
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 161
    		"<br>"+
6967 kshitij.so 162
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
163
    		"</ul>"+
6959 kshitij.so 164
    		"<br>"+
6967 kshitij.so 165
    		"</div>"+
166
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 167
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 168
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
6970 kshitij.so 169
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 170
    		"<thead>"+
171
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 172
            "</thead>"+
173
            "<tbody>"+
174
            "<tr>"+
6970 kshitij.so 175
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
176
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 177
            "</tr>"+
178
            "<tr>"+
179
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
180
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
181
            "</tr>"+
182
            "</tbody>"+
183
            "</table>"+
184
            "<br>"+
185
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
186
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
187
    		"<br>"+
188
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
189
    		"</ul>"+
190
    		"<br>"+
191
    		"</div>"+
192
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 193
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 194
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
195
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
196
    		"<thead>"+
6970 kshitij.so 197
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 198
            "</thead>"+
199
            "<tbody>"+
200
            "<tr>"+
201
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6959 kshitij.so 202
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
203
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
204
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
205
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
206
            "</tr>"+
6772 kshitij.so 207
            "<tr>"+
7051 kshitij.so 208
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 209
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
210
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
211
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
212
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6772 kshitij.so 213
            "</tr>"+
6967 kshitij.so 214
            "</tbody>"+
215
            "</table>"+
216
            "<br>"+
217
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
218
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
219
    		"<br>"+
6970 kshitij.so 220
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 221
    		"</ul>"+
8138 kshitij.so 222
    		"<br>"+ 
6967 kshitij.so 223
    		"</div>"+
224
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 225
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 226
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
227
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
228
    		"<thead>"+
6970 kshitij.so 229
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 230
            "</thead>"+
231
            "<tbody>"+
6772 kshitij.so 232
            "<tr>"+
6967 kshitij.so 233
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
234
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
235
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
236
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
237
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6772 kshitij.so 238
            "</tr>"+
239
            "<tr>"+
7051 kshitij.so 240
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 241
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
242
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
243
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
244
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
245
            "</tr>"+
246
            "</tbody>"+
247
            "</table>"+
248
            "<br>"+
249
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
250
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
251
    		"<br>"+
6970 kshitij.so 252
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
6967 kshitij.so 253
    		"</ul>"+
254
    		"<br>"+
255
    		"</div>"+
8138 kshitij.so 256
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/kotak-icon.png' style='vertical-align: middle;'></div>"+
257
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-kotak\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
258
    		"<div id='emi-table-kotak' style='padding-left: 5px;display: none;'>"+
259
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
260
    		"<thead>"+
261
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
262
            "</thead>"+
263
            "<tbody>"+
264
            "<tr>"+
265
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
266
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
267
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
268
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
269
            "</tr>"+
270
            "<tr>"+
271
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
272
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
273
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
274
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
275
            "</tr>"+
276
            "</tbody>"+
277
            "</table>"+
278
            "<br>"+
279
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
280
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
281
    		"<br>"+
282
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
283
    		"</ul>"+
284
    		"<br>"+
285
    		"</div>"+
6967 kshitij.so 286
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 287
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 288
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
6970 kshitij.so 289
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 290
    		"<thead>"+
6970 kshitij.so 291
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 292
            "</thead>"+
293
            "<tbody>"+
294
            "<tr>"+
7017 kshitij.so 295
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
296
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
297
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
298
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6967 kshitij.so 299
            "</tr>"+
300
            "<tr>"+
7051 kshitij.so 301
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
7017 kshitij.so 302
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
303
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
304
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 305
            "</tr>"+
6967 kshitij.so 306
            "</tbody>"+
307
            "</table>"+
308
            "<br>"+
309
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
310
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
311
    		"<br>"+
6970 kshitij.so 312
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 313
    		"</ul>"+
314
    		"<br>"+
315
    		"</div>"+
316
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 317
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 318
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
319
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
320
    		"<thead>"+
6970 kshitij.so 321
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 322
            "</thead>"+
323
            "<tbody>"+
6772 kshitij.so 324
            "<tr>"+
6970 kshitij.so 325
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%%;'>3 Months</th>"+
6967 kshitij.so 326
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
327
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
328
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6772 kshitij.so 329
            "</tr>"+
330
            "<tr>"+
7051 kshitij.so 331
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 332
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
333
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
334
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 335
            "</tr>"+
6967 kshitij.so 336
            "</tbody>"+
337
            "</table>"+
338
            "<br>"+
339
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
340
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
341
    		"<br>"+
6970 kshitij.so 342
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
6967 kshitij.so 343
    		"</ul>"+
344
    		"<br>"+
345
    		"</div>"+
346
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 347
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 348
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
349
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
350
    		"<thead>"+
351
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
352
            "</thead>"+
353
            "<tbody>"+
6959 kshitij.so 354
            "<tr>"+
6967 kshitij.so 355
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
356
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
357
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 358
            "</tr>"+
359
            "<tr>"+
7051 kshitij.so 360
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%%</td>"+
6967 kshitij.so 361
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
362
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6959 kshitij.so 363
            "</tr>"+
6772 kshitij.so 364
            "</tbody>"+
365
            "</table>"+
366
            "<br>"+
6967 kshitij.so 367
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
368
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
369
    		"<br>"+
370
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
371
    		"</ul>"+
372
    		"<br>"+
373
    		"</div>"+
374
    		"<br><br>",
6453 kshitij.so 375
			onComplete: function(){
376
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
377
			}
378
    	});
379
	});
6245 kshitij.so 380
 
6792 vikram.rag 381
	$('a.mk_best_deal_detail').live('click', function(){
382
		var offerLinkHtml = '';
383
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 384
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 385
		}
386
		$.colorbox({
387
			width: "550px",
388
    		height: "300px",
389
    		inline: true,
390
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
391
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
392
    			'</p><span class="right">' + offerLinkHtml 
393
		});
394
	});
6453 kshitij.so 395
 
6792 vikram.rag 396
 
6245 kshitij.so 397
	$('#pickupstoreInfo').click(function(){
398
		$.colorbox({
399
    		width: "550px",
400
    		height: "370px",
401
    		inline: true,
402
    		href: "<h3>Frequently Asked Questions</h3><br />" +
7062 kshitij.so 403
		"<b style='color: black; cursor: default;'>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
404
		"<b style='color: black; cursor: default;'>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
405
		"<b style='color: black; cursor: default;'>Q)</b> How do i avail this facility ?<br /><br />" +
406
		"<b style='color: black; cursor: default;'>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
407
		"<b style='color: black; cursor: default;'>Q)</b> When will the product be available for pickup ?<br /><br />" +
408
		"<b style='color: black; cursor: default;'>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
6245 kshitij.so 409
 
410
			onComplete: function(){
6262 amit.gupta 411
				var ev = "Product Page";
6303 amit.gupta 412
				var label = window.location.pathname;
6264 amit.gupta 413
				if (label=="" || label=="#")
6261 amit.gupta 414
				{
6303 amit.gupta 415
					label = "";
6262 amit.gupta 416
					ev = "Home Page";
6261 amit.gupta 417
				}
6262 amit.gupta 418
				else if (label.indexOf("shipping") != -1){
419
					ev = "Shipping Page";
420
					var blkstr = [];
6263 amit.gupta 421
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 422
						blkstr.push(str);
423
					});
6303 amit.gupta 424
					label = blkstr.join(", ");
425
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
426
					ev = "Category Page";
427
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
428
					ev = "Product Page";
6262 amit.gupta 429
				}
6261 amit.gupta 430
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 431
			}
432
    	});
433
	});
4126 varun.gupt 434
 
5420 amit.gupta 435
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 436
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
437
		var widgetBox = $(this).siblings('.common-widget-content-area');
438
		var controlBox = $(this).siblings('.common-widget-control-bar');
439
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 440
 
4126 varun.gupt 441
		if (isColapsed)	{
442
			if(controlBox.length > 0)	{
443
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 444
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 445
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
446
				});
447
			} else	{
448
				$(widgetBox).slideDown();
449
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
450
			}
451
		} else	{
452
			$(widgetBox).slideUp(function(){
453
				$(controlBox).slideUp('fast');
454
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
455
			});
456
		}
457
		$(this).data('is_colapsed', !isColapsed);
458
	});
459
 
460
	/**
461
	 * Update count of products checked for comparison
462
	 **/
463
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 464
		updateCompareCount();
4126 varun.gupt 465
	});
466
 
467
	$("#research_compare").live('click', function(){
468
		var seldata = "";
5322 amit.gupta 469
		var prodnames = "";
4126 varun.gupt 470
		var tot = 1;
471
		var saprt = "";
472
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 473
		var haveSameProductType = true;
474
		var productType = null;
475
 
4126 varun.gupt 476
		$(par).each(function(){
4926 varun.gupt 477
 
478
			if(productType != null && productType != $(this).attr('producttype'))	{
479
				haveSameProductType = false;
480
			}
481
			productType = $(this).attr('producttype');
482
 
4126 varun.gupt 483
			if(tot == 1)	{
5358 amit.gupta 484
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 485
				seldata += "p" + tot + "=" + $(this).val();
486
			} else	{
487
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 488
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 489
			}
490
			tot ++;
491
		});
4984 varun.gupt 492
 
4926 varun.gupt 493
		if(! haveSameProductType)	{
494
			alert("Only products of same category can be compared");
495
		} else if(tot > 6)	{
4126 varun.gupt 496
			alert("Can compare upto five products only.");
497
		} else if(tot > 2)	{
5552 phani.kuma 498
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 499
		} else	{
500
			alert("Please select atleast two products");
501
		}
502
	});
503
 
504
	$("#research_delete").live('click', function(){
505
		var research_tot = $("#research_total").val();
506
		var seldata = [];
507
		var tot = 0;
508
		var saprt = "";
509
		var par = $('#myresearch').find('input[type=checkbox]:checked');
510
 
511
		$(par).each(function(){
512
			seldata.unshift($(this).val());
513
			tot ++;
514
		});
515
 
516
		if(tot > 0)	{
517
			var t = (research_tot * 1) - (tot * 1);
518
			$("#research_total").val(t);
519
 
520
			jQuery.ajax({
521
				type: "GET",
522
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
523
				success: function(msg)	{
524
					jQuery.each(seldata, function(intIndex, objValue){
525
						delete_from_storage_set("resitems", objValue);
526
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
527
							$(this).remove();
528
							if(t === 0)	{
529
								$("#research_default").css("display", "block");
530
							}
531
						});
532
					});
4984 varun.gupt 533
 
4922 varun.gupt 534
					//Updating the count
535
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 536
 
537
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
538
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
539
					}
4126 varun.gupt 540
				}
541
			});
542
		} else	{
543
			alert("Please select atleast one product");
544
		}
545
	});
546
 
547
	// No uid cookie
548
	if (!$.cookie("uid"))	{
549
		// No uid in storage
550
		if (!$.Storage.get("uid"))	{
551
			if (!$.Storage.get("resitems"))	{
552
				$.Storage.set("resitems", "[]");
553
			}
554
			if (!$.Storage.get("histitems"))	{
555
				$.Storage.set("histitems", "[]");
556
			}
557
		}
558
		else	{			// uid in storage : logout
559
			$.Storage.remove("uid");
560
			$.Storage.set("resitems", "[]");
561
			$.Storage.set("histitems", "[]");
562
		}
563
		load_research_widget();
564
		load_history_widget();
565
	}
566
	else	{				// With uid cookie
567
		var cookie = $.cookie("uid");
568
		// Just logged in merge storage items
569
		if (!$.Storage.get("uid"))	{
570
			$.Storage.set("uid", cookie);
571
			merge_history_items();
572
			load_research_items();
573
		}
574
		else	{
575
			// UID changed
576
			if ( cookie != $.Storage.get("uid"))	{
577
				$.Storage.set("uid", cookie);
578
				$.Storage.set("resitems", "[]");
579
				$.Storage.set("histitems", "[]");
580
				merge_history_items();
581
				load_research_items();
582
			}
583
			else	{		// Uid is same
584
				if (!$.Storage.get("resitems"))	{
585
					$.Storage.set("resitems", "[]");
586
					load_research_items();
587
				}
588
				else	{
589
					load_research_widget();
590
				}
591
 
592
				if (!$.Storage.get("histitems"))	{
593
					$.Storage.set("histitems", "[]");
594
					merge_history_items();
595
				}
596
				else	{
597
					load_history_widget();
598
				}
599
			}
600
		}
601
	}
4798 varun.gupt 602
 
603
	function load_research_items(){
604
		jQuery.ajax({
605
			type: "GET",
606
			url: "/myresearch",
607
			cache: false,
608
			success: function(json) {
609
			    $.Storage.set("resitems", json);
610
			    load_research_widget();
611
		    }
612
		});
613
	}
614
 
615
	function load_research_widget(){
616
		var myResearchWidgetContainer = $("#myresearch");
617
 
618
		if($(myResearchWidgetContainer).length == 0) {
619
			return;
620
		}
621
		var resitems = $.Storage.get("resitems");
622
 
623
		if (resitems == "[]") {
624
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
625
		      <tbody>\
626
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
627
		       </tbody>\
628
		      </table>';
629
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
630
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
631
			return;
632
		}
633
		var params = "/" + resitems;
634
 
635
		jQuery.ajax({
636
			type : "GET",
637
			url : "/myresearch" + params,
638
			cache: true,
639
			success : function(html) {
640
	   		    $("#myresearch").html(html);
641
	   			updateCompareCount();
642
 
643
			    // Product Title
644
			    $("#myresearch table td div a.truncate").each(function() {
645
						$(this).truncate({addtitle : true});
646
			    });
647
 
648
			    // Product Price
649
			    $("#myresearch table td div div.price").each(function() {
650
						$(this).truncate({addtitle : true});
651
				});
652
 
653
			    // Product Details
654
			    $("#myresearch table td div div.text").each(function() {
655
						$(this).truncate( {addtitle : true});
656
				});
657
		    }
658
		});
659
	}
7846 rajveer 660
});
661
 
7849 rajveer 662
function displayCod(item_id)	{
7846 rajveer 663
	$.colorbox({
7872 rajveer 664
		width: "400px",
665
		height: "200px",
7846 rajveer 666
		inline: true,
7873 rajveer 667
		href: "<ul style='list-style:inside; margin-left: 25px; text-align: justify; margin-right:12px; font-size:15px; line-height: 22px;'>"
7872 rajveer 668
			+ "Expected Delivery Date for "
7873 rajveer 669
			+"<li list-style:inside>Prepaid orders is " + $('#days_' + item_id).html() + "</li>"+
7879 rajveer 670
			"<li list-style:inside>Cash On Delivery orders is " + $('#coddays_' + item_id).html() + "</li>"+
7846 rajveer 671
    "</ul>",
672
    onComplete: function(){
673
	trackEventWithGA('Widget', 'COD Know More is clicked', '');
674
		}
675
	});
676
}